call script from POM

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Techworks
Posts: 27
Joined: 27 Oct 2008 23:15

call script from POM

Post by Techworks »

ok, the help menu says you can do this, but doesnt say what the syntax is???

I cant even get my one line POM to work

|"Compact MDB 97" *.mdb>open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact"

This doesnt show my heading when I right click on it, and I want to present 2 menu options as the following script file does:

"A97 Compact"
open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact";

"A2007 Compact"
open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>"" /compact";

So how do I associate my script file to the *.mdb file extension?


Thanks

Grant

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: call script from POM

Post by serendipity »

Techworks wrote:ok, the help menu says you can do this, but doesnt say what the syntax is???

I cant even get my one line POM to work

|"Compact MDB 97" *.mdb>open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact"

This doesnt show my heading when I right click on it ...
No, POM was never supposed to show on right-click, but will show when you double-click or press ctrl+alt+enter on a .mdb file.

admin
Site Admin
Posts: 66075
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: call script from POM

Post by admin »

serendipity wrote:
Techworks wrote:ok, the help menu says you can do this, but doesnt say what the syntax is???

I cant even get my one line POM to work

|"Compact MDB 97" *.mdb>open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact"

This doesnt show my heading when I right click on it ...
No, POM was never supposed to show on right-click, but will show when you double-click or press ctrl+alt+enter on a .mdb file.
Double-click will not show the POM, but do what's bold in the POM.

Indeed I would like a way to open the POM on right-click but no good idea up to now. I could pop it on right-clicking the _icon_ (as opposed to the _name_) but that will confuse many. Sure, could make it optional but... uaaah... I'd like something better.

@Techworks : there's also a toolbar button for "Open With".

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: call script from POM

Post by serendipity »

admin wrote:
serendipity wrote:
Techworks wrote:ok, the help menu says you can do this, but doesnt say what the syntax is???

I cant even get my one line POM to work

|"Compact MDB 97" *.mdb>open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact"

This doesnt show my heading when I right click on it ...
No, POM was never supposed to show on right-click, but will show when you double-click or press ctrl+alt+enter on a .mdb file.
Double-click will not show the POM, but do what's bold in the POM.
Too many mistakes today, I was actually trying to tell that if one has a script with menus in them and uses PFA then double-click will pop-up a list of menus. I guess this is what Techwork wants. I'll post a detailed answer to that.
admin wrote: Indeed I would like a way to open the POM on right-click but no good idea up to now. I could pop it on right-clicking the _icon_ (as opposed to the _name_) but that will confuse many. Sure, could make it optional but... uaaah... I'd like something better.
Maybe right-click combined with an accelerator?
Last edited by serendipity on 18 Nov 2008 18:19, edited 1 time in total.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: call script from POM

Post by serendipity »

Techworks wrote:ok, the help menu says you can do this, but doesnt say what the syntax is???

I cant even get my one line POM to work

|"Compact MDB 97" *.mdb>open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact"

This doesnt show my heading when I right click on it, and I want to present 2 menu options as the following script file does:

"A97 Compact"
open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact";

"A2007 Compact"
open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>"" /compact";

So how do I associate my script file to the *.mdb file extension?


Thanks

Grant
I understand that you have a script which pops up two menus "A97 Compact" and "A2007 Compact" and you want to pop those menus when you click on a mdb file. If that's right, then you have to do two things:
1) Put the scripts you have mentioned above into a textfile and name them say Compact.xys. Place this file inside XY's script folder. I guess these are those scripts:

Code: Select all

"A97 Compact"
     open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact";

"A2007 Compact"
     open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>"" /compact";
2) In the menu "Tools|List management|Portable files association" make a new entry and paste this code:
"Compact MDB" mdb>::load Compact
By the way that was with PFA and when you double-click a mdb file it will pop-up the above menus.
In POM you will have to include these scripts seperately in the list "Portable files association".

Code: Select all

|"Compact MDB 97" *.mdb>::open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact"

Code: Select all

|"Compact MDB 2007" *.mdb>::open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>"" /compact"
This will give menus when you click on the POM toolbar or on ctrl+alt+enter while a mdb file is selected.

Techworks
Posts: 27
Joined: 27 Oct 2008 23:15

Re: call script from POM

Post by Techworks »

sorry, I was incorrect about the right click. I meant activating the POM by the button.

But I've now got it working another way by setting up the PFA to call my script file on mdb's and overrule the windows association, and have open and compact menu options for Access 97 and 2007 in the one script file.

Works great. Now if I double click on an mdb file, it pops up a menu with:

A97 Open
A97 Compact
-----------------
A2007 Open
A2007 Compact

I've got the separator line to show greyed out, but its still "active" and I'd like it "inactive" if possible so the background doesn't change colour when the mouse is over it.

Here is my script file now
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"A97 Open"
open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>""";

"A97 Compact"
open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact";

"------------------------"
"A2007 Open"
open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>""";

"A2007 Compact"
open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>"" /compact";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So is there any way to have a separator line that's not active?

Cheers

Grant

admin
Site Admin
Posts: 66075
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: call script from POM

Post by admin »

Techworks wrote:So is there any way to have a separator line that's not active?
Sure: use a single - (hyphen) instead of many.

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: call script from POM

Post by serendipity »

Techworks wrote:sorry, I was incorrect about the right click. I meant activating the POM by the button.

But I've now got it working another way by setting up the PFA to call my script file on mdb's and overrule the windows association, and have open and compact menu options for Access 97 and 2007 in the one script file.

Works great. Now if I double click on an mdb file, it pops up a menu with:

A97 Open
A97 Compact
-----------------
A2007 Open
A2007 Compact

I've got the separator line to show greyed out, but its still "active" and I'd like it "inactive" if possible so the background doesn't change colour when the mouse is over it.

Here is my script file now
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"A97 Open"
open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>""";

"A97 Compact"
open """C:\Program Files\Office97Pro\Office\MSACCESS.EXE"" ""<curitem>"" /compact";

"------------------------"
"A2007 Open"
open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>""";

"A2007 Compact"
open """C:\Program Files\Office2007Pro\Office12\MSACCESS.EXE"" ""<curitem>"" /compact";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So is there any way to have a separator line that's not active?

Cheers

Grant
Yes, just use this
-
instead of
"--------------------------"

Techworks
Posts: 27
Joined: 27 Oct 2008 23:15

Re: call script from POM

Post by Techworks »

Great, works perfectly now

I just love XYplorer. Its just so flexible and customisable.

admin
Site Admin
Posts: 66075
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: call script from POM

Post by admin »

Techworks wrote:Great, works perfectly now

I just love XYplorer. Its just so flexible and customisable.
Great! :D I stole your example for the Tour: http://www.xyplorer.com/tour/index.php?page=pom#mdb

Post Reply