Page 1 of 3

how to add user options for xyplorer script?

Posted: 07 Sep 2012 16:32
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.

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 16:42
by admin

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 17:00
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.

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 17:06
by admin
kotlmg wrote:i tried the method suggested by you...
Really?

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 17:08
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";

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 17:13
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:

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 17:15
by kotlmg
thanks a lot. the code is perfectly working.

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 17:26
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?

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 18:13
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.

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 18:29
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>";

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 18:35
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?

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 18:51
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:\";

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 19:03
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:";

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 19:04
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.

Re: how to add user options for xyplorer script?

Posted: 07 Sep 2012 19:12
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";