how to add user options for xyplorer script?

Discuss and share scripts and script files...
kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

how to add user options for xyplorer script?

Post by kotlmg »

i have the following xyplorer working script.

Code: Select all

OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer.exe"" <items>";
OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayerOld.exe"" <items>";
OpenWith """C:\Program Files (x86)\DAUM\PotPlayer\PotPlayerMini.exe"" <items>";
OpenWith "C:\Program Files\Mythicsoft\FileLocator Pro\FileLocatorPro.exe";
i want for the above code, when the mouse is brought on the above script in category window, user should get the following options/selectionss as
Kmplayer
KmplayerOld
Potplayer
FileLocator.

can someone please help me in constructing the above code.

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

Re: how to add user options for xyplorer script?

Post by admin »


kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: how to add user options for xyplorer script?

Post by kotlmg »

i tried the method suggested by you and also executing the code for category itself. i am attaching the screen shots.
i don't want to display the longest names. i want to display them as
Kmplayer
KmplayerOld
Potplayer
FileLocator
winmount.
To see the attached files, you need to log into the forum.

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

Re: how to add user options for xyplorer script?

Post by admin »

kotlmg wrote:i tried the method suggested by you...
Really?

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

Re: how to add user options for xyplorer script?

Post by serendipity »

See help>Scripting>Multiline scripts:

Code: Select all

"KMPlayer"
    OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer.exe"" <items>";
"KMPlayerOld"
   OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayerOld.exe"" <items>";
"PotPlayerMini"
   OpenWith """C:\Program Files (x86)\DAUM\PotPlayer\PotPlayerMini.exe"" <items>";
"FileLocatorPro"
   OpenWith "C:\Program Files\Mythicsoft\FileLocator Pro\FileLocatorPro.exe";

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

Re: how to add user options for xyplorer script?

Post by admin »

So you all prefer to ignore the link I posted (http://www.xyplorer.com/release_11.00.h ... ownButtons) that makes all of this so much easier. Well, your choice. :roll:

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: how to add user options for xyplorer script?

Post by kotlmg »

thanks a lot. the code is perfectly working.

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

Re: how to add user options for xyplorer script?

Post by serendipity »

admin wrote:So you all prefer to ignore the link I posted (http://www.xyplorer.com/release_11.00.h ... ownButtons) that makes all of this so much easier. Well, your choice. :roll:
But his code uses <items> to open selected items in list, which i don't think smart dropdown buttons support, do they?

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: how to add user options for xyplorer script?

Post by kotlmg »

serendipity,
i am using the following script to mount iso files using winmount software. by default files are mounted to drive Z.
OpenWith "C:\Program Files\WinMount\WinMount.exe";

now i want all the files in the Z drive to be played by kmplayer using the following script.

OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer.exe"" <items>";

can you please combine both the codes into one script so that when i run the script mounting and afterwards playing by kmplayer should start automatically.

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

Re: how to add user options for xyplorer script?

Post by serendipity »

kotlmg wrote:serendipity,
i am using the following script to mount iso files using winmount software. by default files are mounted to drive Z.
OpenWith "C:\Program Files\WinMount\WinMount.exe";

now i want all the files in the Z drive to be played by kmplayer using the following script.

OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer.exe"" <items>";

can you please combine both the codes into one script so that when i run the script mounting and afterwards playing by kmplayer should start automatically.
Just put those scripts one below other and they will be processed sequentially. If mounting takes time then add a wait command between those lines of code. Eg:

Code: Select all

"Mount and Play with KM"
    OpenWith "C:\Program Files\WinMount\WinMount.exe";
    wait(2000); // wait 2 seconds
    OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer.exe"" <items>";

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: how to add user options for xyplorer script?

Post by kotlmg »

in the above code items should be replaced with Z drive. since i have not selected items in z drive, i want to send entire z drive as a parameter. i don't know how to show the drive z as a parameter. can you please add the entire drive as selection?

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

Re: how to add user options for xyplorer script?

Post by serendipity »

kotlmg wrote:in the above code items should be replaced with Z drive. since i have not selected items in z drive, i want to send entire z drive as a parameter. i don't know how to show the drive z as a parameter. can you please add the entire drive as selection?
Well, you should have provided me with command-line switches, like mentioned here:
http://www.winmount.com/command.html

going by that the first line could be something like:

Code: Select all

OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:Z:\";

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: how to add user options for xyplorer script?

Post by kotlmg »

your code is superb. it is working. now the code is modified as follows.

Code: Select all

"Mount and Play with KM1"
   OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:Y:\";
   wait(2000); // wait 2 seconds
   OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer1.exe""Y:";

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

Re: how to add user options for xyplorer script?

Post by serendipity »

kotlmg wrote:your code is superb. it is working. now the code is modified as follows.

Code: Select all

"Mount and Play with KM1"
   OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:Y:\";
   wait(2000); // wait 2 seconds
   OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer1.exe""Y:";
Glad it works.

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: how to add user options for xyplorer script?

Post by kotlmg »

how to unmount the drive using the following command line code.

1) unmount the assigned disk
winmount -unmount:X

2) unmount all disks
winmount -unmountall

sorry, i have used the following code and it is working.

Code: Select all

"Un mount all !!!"
    $app = "C:\Program Files\WinMount\WinMount.exe";
    run """$app"" -unmountall";

Post Reply