Arghh, yes, you are right. Sorry. The Smart Dropdown Buttons don't do OpenWith.serendipity wrote:But his code uses <items> to open selected items in list, which i don't think smart dropdown buttons support, do they?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.
how to add user options for xyplorer script?
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: how to add user options for xyplorer script?
FAQ | XY News RSS | XY X
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: how to add user options for xyplorer script?
"Smart Dropdown Buttons", it seams i had forgotten them. Good feature.
Just tested and seen that it doesn't works with an single line.
An second entry is needed, and if it is only an hyphen.
Just FYI, maybe that is an unwanted behavior?
.
Just tested and seen that it doesn't works with an single line.
An second entry is needed, and if it is only an hyphen.
Just FYI, maybe that is an unwanted behavior?
.
-
admin
- Site Admin
- Posts: 66300
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: how to add user options for xyplorer script?
See Help:Stefan wrote:"Smart Dropdown Buttons", it seams i had forgotten them. Good feature.
Just tested and seen that it doesn't works with an single line.
An second entry is needed, and if it is only an hyphen.
Just FYI, maybe that is an unwanted behavior?
.
Note that at least two items are needed to form a valid Smart Dropdown Button.
FAQ | XY News RSS | XY X
-
kotlmg
- Posts: 321
- Joined: 30 Jun 2010 17:14
Re: how to add user options for xyplorer script?
finally, i have learnt xyplorer script to mount, unmount and play files after mounting with xyplorer script.
the code is as follows.
the code is as follows.
Code: Select all
"Mount to which drive"
$app = "C:\Program Files\WinMount\WinMount.exe";
// end(recase("<curext>", "lower") != "iso"), "No ISO file selected, script ends.";
end( strpos("iso|bin|nrg|daa|cdi", "<curext>") == -1 ), "No ISO file selected, script ends.";
$iso = quote("<curitem>");
//inputselect(header, listdata, [separator=|], [style=1], [cancel], [width=600], [height=400], [windowcaption])
$drive = inputselect("Mount as which drive?<crlf>$iso", Z|Y|W|V|U|T,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
//tab([operation], [data], [index])
tab("new", $drive:);
"Mount to which drive and Play with KMPlayer"
$app = "C:\Program Files\WinMount\WinMount.exe";
// end(recase("<curext>", "lower") != "iso"), "No ISO file selected, script ends.";
end( strpos("iso|bin|nrg|daa|cdi", "<curext>") == -1 ), "No ISO file selected, script ends.";
$iso = quote("<curitem>");
//inputselect(header, listdata, [separator=|], [style=1], [cancel], [width=600], [height=400], [windowcaption])
$drive = inputselect("Mount as which drive?<crlf>$iso", Z|Y|W|V|U|T,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
//tab([operation], [data], [index])
tab("new", $drive:);
OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer1.exe""$drive:";
"Un mount which drive"
$app = "C:\Program Files\WinMount\WinMount.exe";
//unmount <drive|all>: Unmount image file.
//Example: unmount drive F: .
//Command: piso unmount F:
$drive = inputselect("Unmount which drive?", Z|Y|W|V|U|T,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
//run
run """$app"" -unmount:$drive:";
"Un mount all !!!"
$app = "C:\Program Files\WinMount\WinMount.exe";
run """$app"" -unmountall";
-
kotlmg
- Posts: 321
- Joined: 30 Jun 2010 17:14
Re: how to add user options for xyplorer script?
serendipity, can you give the xyplorer script for the following command lines.
1. Mount compressed file(s) or folder(s)
Command: winmount -m [file path] [-drv:disk letter or path] [-NoWriteback:] [-attach:]
Introduction:
-drv: mount files to disk or path (Not necessary)
-NoWriteback: read only (Not necessary)
-attach: mount using filter drive. Filter drive meas mounting to an exist path.
[file path] can be quoted with whole path, relative path or default
Examples:
1) mount compressed file
winmount -m "E:\test.mou" -drv:Z:\abc
2) mount folder
winmount -m "E:\test" -drv:Z:\abc
3) mount muti files or folders (seperate paths with space)
winmount -m "E:\test.mou" "E:\test.rar" "E:\test.zip" -drv:Z:\abc
Appropriate for *.mou,*.rar,*.zip or folder
2. Mount CD/DVD file(s)
Command: winmount -m [file path] [-drv:disk] [-NoWriteback:] [-attach:]
Example: winmount -m "E:\test.iso" -drv:Z:\abc
Appropriate for *.iso, *.bin, *.cue, *.ccd, *.mds, *.mdf, *.nrg,, *.img, *.isz, *.ape, *.flac, *.wv
Also appropriate for *.wim, *.wmt
3. Mount muti partition file(s)
Command: winmount -m HDD_file [-drv:disk] [-Part:partition number(0,1...)] [-NoWriteback:]
Introduction: -Part:partion number,0 is the first partition, 1 is the second partition
Example: winmount -m Win2003.vhd -part:2
Appropriate for *.vhd, *.vdi, *.vmdk
4. Mount new blank disk
Command: winmount -drv:X -sectors: disk size
0x400000=2G, 0x200000=1G
Example: winmount -drv:X -sectors:0x400000
5. Quick mount
Command: winmount -M [file path] -attach: -drv:disk
Example: winmount -M E:\test.mou -attach: -drv:E
6. unmount
1) unmount the assigned disk
winmount -unmount:X
2) unmount all disks
winmount -unmountall
7. Compression
Command: winmount -C [file list] [-o:target file]
Introduction:
-o:assign the target file, can be whole path, relative path or default.
Example: winmount -C "E:\test" "E:\test.txt" -o:E:\test.zip
Appropriate for *.mou, *.zip, *. 7z
8. Decompression
Command: winmount -E [compressed file list] [-o:target folder]
Example:winmount -E "E:\test.zip" "E:\test.mou" -o:E:\
Appropriate for *.mou, *.zip, *.rar, *.7z
9. Smart-extraction
Command: winmount -E [compressed file list] "-s:target folder"
Example: winmount -E "E:\test.zip" "E:\test.mou" “-s:E:\test”
10. Convert
Command: winmount -T [compressed file]
Example: winmount -T E:\test.rar
Appropriate for *.rar, *.zip, *.7z
1. Mount compressed file(s) or folder(s)
Command: winmount -m [file path] [-drv:disk letter or path] [-NoWriteback:] [-attach:]
Introduction:
-drv: mount files to disk or path (Not necessary)
-NoWriteback: read only (Not necessary)
-attach: mount using filter drive. Filter drive meas mounting to an exist path.
[file path] can be quoted with whole path, relative path or default
Examples:
1) mount compressed file
winmount -m "E:\test.mou" -drv:Z:\abc
2) mount folder
winmount -m "E:\test" -drv:Z:\abc
3) mount muti files or folders (seperate paths with space)
winmount -m "E:\test.mou" "E:\test.rar" "E:\test.zip" -drv:Z:\abc
Appropriate for *.mou,*.rar,*.zip or folder
2. Mount CD/DVD file(s)
Command: winmount -m [file path] [-drv:disk] [-NoWriteback:] [-attach:]
Example: winmount -m "E:\test.iso" -drv:Z:\abc
Appropriate for *.iso, *.bin, *.cue, *.ccd, *.mds, *.mdf, *.nrg,, *.img, *.isz, *.ape, *.flac, *.wv
Also appropriate for *.wim, *.wmt
3. Mount muti partition file(s)
Command: winmount -m HDD_file [-drv:disk] [-Part:partition number(0,1...)] [-NoWriteback:]
Introduction: -Part:partion number,0 is the first partition, 1 is the second partition
Example: winmount -m Win2003.vhd -part:2
Appropriate for *.vhd, *.vdi, *.vmdk
4. Mount new blank disk
Command: winmount -drv:X -sectors: disk size
0x400000=2G, 0x200000=1G
Example: winmount -drv:X -sectors:0x400000
5. Quick mount
Command: winmount -M [file path] -attach: -drv:disk
Example: winmount -M E:\test.mou -attach: -drv:E
6. unmount
1) unmount the assigned disk
winmount -unmount:X
2) unmount all disks
winmount -unmountall
7. Compression
Command: winmount -C [file list] [-o:target file]
Introduction:
-o:assign the target file, can be whole path, relative path or default.
Example: winmount -C "E:\test" "E:\test.txt" -o:E:\test.zip
Appropriate for *.mou, *.zip, *. 7z
8. Decompression
Command: winmount -E [compressed file list] [-o:target folder]
Example:winmount -E "E:\test.zip" "E:\test.mou" -o:E:\
Appropriate for *.mou, *.zip, *.rar, *.7z
9. Smart-extraction
Command: winmount -E [compressed file list] "-s:target folder"
Example: winmount -E "E:\test.zip" "E:\test.mou" “-s:E:\test”
10. Convert
Command: winmount -T [compressed file]
Example: winmount -T E:\test.rar
Appropriate for *.rar, *.zip, *.7z
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: how to add user options for xyplorer script?
Sorry kotlmg, but no, that's a huge list. I don't mean to be rude or something, I think I have given you enough pointers of how to do this. The rules are pretty much the same. Please read help>Scripting commands reference>openwith and run.
If you run into errors for anything specific, i'd be happy to help.
If you run into errors for anything specific, i'd be happy to help.
-
kotlmg
- Posts: 321
- Joined: 30 Jun 2010 17:14
Re: how to add user options for xyplorer script?
it's ok. i will try the code.
-
kotlmg
- Posts: 321
- Joined: 30 Jun 2010 17:14
Re: how to add user options for xyplorer script?
i tried the following code. it is not working. even though it is not showing any errors, the desired output is not gettin generated. am i missing some thing in the following code?.
Code: Select all
"Decompress"
// $app = "C:\Program Files\WinMount\WinMount.exe";
$destination = inputfolder( ,select destination folder to move to);
// winmount -E [compressed file list] [-o:target folder]
// run """$app"" -E<items> -o:$destination";
OpenWith """C:\Program Files\WinMount\WinMount.exe""-E<items> -o:$destination:";
-
PeterH
- Posts: 2827
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: how to add user options for xyplorer script?
- some " " missing in parameters?
- did you try to analyse code in step mode?
- did you try to analyse code in step mode?
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: how to add user options for xyplorer script?
Maybe try:kotlmg wrote:i tried the following code. it is not working. even though it is not showing any errors, the desired output is not gettin generated. am i missing some thing in the following code?.Code: Select all
"Decompress" // $app = "C:\Program Files\WinMount\WinMount.exe"; $destination = inputfolder( ,select destination folder to move to); // winmount -E [compressed file list] [-o:target folder] // run """$app"" -E<items> -o:$destination"; OpenWith """C:\Program Files\WinMount\WinMount.exe""-E<items> -o:$destination:";
Code: Select all
//Get items names as "item1" "item2" etc
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
// run """$app"" -E<items> -o:$destination";
OpenWith """C:\Program Files\WinMount\WinMount.exe""-E$items -o:$destination:";
-
kotlmg
- Posts: 321
- Joined: 30 Jun 2010 17:14
Re: how to add user options for xyplorer script?
your suggestion helpd me towrite the following winmount package.
Code: Select all
"Mount to which drive"
$app = "C:\Program Files\WinMount\WinMount.exe";
//inputselect(header, listdata, [separator=|], [style=1], [cancel], [width=600], [height=400], [windowcaption])
$drive = inputselect("Mount as which drive?<crlf>$iso", Z|Y|W|V|U|T|S|R|Q|P|O|N|M|L|K|J|I|H|G,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
//tab([operation], [data], [index])
tab("new", $drive:);
"Quick Mount"
$app = "C:\Program Files\WinMount\WinMount.exe";
//inputselect(header, listdata, [separator=|], [style=1], [cancel], [width=600], [height=400], [windowcaption])
$drive = inputselect("Mount as which drive?<crlf>$iso", Z|Y|W|V|U|T|S|R|Q|P|O|N|M|L|K|J|I|H|G,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
// winmount -M [file path] -attach: -drv:disk
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -M <items> -drv:$drive:";
wait(2000); // wait 2 seconds
//tab([operation], [data], [index])
tab("new", $drive:);
"Mount to which drive and Play with KMPlayer"
$app = "C:\Program Files\WinMount\WinMount.exe";
// end(recase("<curext>", "lower") != "iso"), "No ISO file selected, script ends.";
//inputselect(header, listdata, [separator=|], [style=1], [cancel], [width=600], [height=400], [windowcaption])
$drive = inputselect("Mount as which drive?<crlf>$iso", Z|Y|W|V|U|T|S|R|Q|P|O|N|M|L|K|J|I|H|G,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
//tab([operation], [data], [index])
tab("new", $drive:);
OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer1.exe""$drive:";
"Un mount which drive"
$app = "C:\Program Files\WinMount\WinMount.exe";
//unmount <drive|all>: Unmount image file.
//Example: unmount drive F: .
//Command: piso unmount F:
$drive = inputselect("Unmount which drive?", Z|Y|W|V|U|T|S|R|Q|P|O|N|M|L|K|J|I|H|G,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
//run
run """$app"" -unmount:$drive:";
"Un mount all !!!"
$app = "C:\Program Files\WinMount\WinMount.exe";
run """$app"" -unmountall";
"Compress"
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
OpenWith """C:\Program Files\WinMount\WinMount.exe""-C$items";
"Decompress"
//Get items names as "item1" "item2" etc
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
$destination = inputfolder( ,select destination folder to move to);
// run """$app"" -E<items> -o:$destination";
OpenWith """C:\Program Files\WinMount\WinMount.exe""-E$items -o:$destination:";
// winmount -E [compressed file list] "-s:target folder"
"Smart Extraction"
//Get items names as "item1" "item2" etc
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
$destination = inputfolder( ,select destination folder to move to);
// winmount -E [compressed file list] "-s:target folder"
OpenWith """C:\Program Files\WinMount\WinMount.exe""-E$items -s:$destination:";
"Convert"
//Get items names as "item1" "item2" etc
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
// winmount -T [item1]
OpenWith """C:\Program Files\WinMount\WinMount.exe""-T$items";
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: how to add user options for xyplorer script?
Glad that helped.kotlmg wrote:your suggestion helpd me towrite the following winmount package.
-
binocular222
- Posts: 1423
- Joined: 04 Nov 2008 05:35
- Location: Win11, Win10, 100% Scaling
Re: how to add user options for xyplorer script?
Great script. I just added minor improvement:
+ Add label to caption so that each function can be called directly via address bar or Custom Toolbar Button, for example: ::load "MountISO", "Mount"
+ When select drive to mount, only unused drives are shown
+ If selected file is not ISO, then the error message is displayed in statusbar instead of a dialog (less obstrusive)
P.S: What's the difference between "Mount as which drive" and "quick mount"?
+ Add label to caption so that each function can be called directly via address bar or Custom Toolbar Button, for example: ::load "MountISO", "Mount"
+ When select drive to mount, only unused drives are shown
+ If selected file is not ISO, then the error message is displayed in statusbar instead of a dialog (less obstrusive)
Code: Select all
"Mount to : Mount"
$app = "E:\2System\Virtual drive\WinMount\WinMount.exe";
$AllDrive = C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z ;
$CurrentDrives = replace(get("drives"), ":\") . |;
$Position = 0;
$Drive = C;
While($Drive != ""){
$Drive = substr($CurrentDrives,$Position,2);
$AllDrive = replace($AllDrive,$Drive);
$Position = $Position + 2;
};
If( strpos("iso|bin|nrg|daa|cdi", "<curext>") == -1 ) {Status "Not image file", ,"stop"; end 1};
Else
{
$drive = inputselect("Currently selected item:<crlf><curitem>", $AllDrive,,2,,650,450, "Select drive letter for new Virtual Drive");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """E:\2System\Virtual drive\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
tab("new", $drive:);
}I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
-
kotlmg
- Posts: 321
- Joined: 30 Jun 2010 17:14
Re: how to add user options for xyplorer script?
hello binocular222,
thanks for your appreciation. there is no difference between quick mount and mount to drive. i have modified my code taking your code into account.
thanks for your appreciation. there is no difference between quick mount and mount to drive. i have modified my code taking your code into account.
Code: Select all
"Mount to : Mount"
$app = "C:\Program Files\WinMount\WinMount.exe";
$AllDrive = C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z ;
$CurrentDrives = replace(get("drives"), ":\") . |;
$Position = 0;
$Drive = C;
While($Drive != ""){
$Drive = substr($CurrentDrives,$Position,2);
$AllDrive = replace($AllDrive,$Drive);
$Position = $Position + 2;
};
If( strpos("iso|bin|nrg|daa|cdi|zip|rar", "<curext>") == -1 ) {Status "Not image file", ,"stop"; end 1};
Else
{
$drive = inputselect("Currently selected item:<crlf><curitem>", $AllDrive,,2,,650,450, "Select drive letter for new Virtual Drive");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
tab("new", $drive:);
}
"QuickMount : Quick"
$app = "C:\Program Files\WinMount\WinMount.exe";
$AllDrive = C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z ;
$CurrentDrives = replace(get("drives"), ":\") . |;
$Position = 0;
$Drive = C;
While($Drive != ""){
$Drive = substr($CurrentDrives,$Position,2);
$AllDrive = replace($AllDrive,$Drive);
$Position = $Position + 2;
};
If( strpos("iso|bin|nrg|daa|cdi|zip|rar", "<curext>") == -1 ) {Status "Not image file", ,"stop"; end 1};
Else
{
$drive = inputselect("Currently selected item:<crlf><curitem>", $AllDrive,,2,,650,450, "Select drive letter for new Virtual Drive");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
//OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -M <items> -drv:$drive:";
wait(2000); // wait 2 seconds
tab("new", $drive:);
}
"Play with KMPlayer"
$app = "C:\Program Files\WinMount\WinMount.exe";
$AllDrive = C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z ;
$CurrentDrives = replace(get("drives"), ":\") . |;
$Position = 0;
$Drive = C;
While($Drive != ""){
$Drive = substr($CurrentDrives,$Position,2);
$AllDrive = replace($AllDrive,$Drive);
$Position = $Position + 2;
};
If( strpos("iso|bin|nrg|daa|cdi|zip|rar", "<curext>") == -1 ) {Status "Not image file", ,"stop"; end 1};
Else
{
$drive = inputselect("Currently selected item:<crlf><curitem>", $AllDrive,,2,,650,450, "Select drive letter for new Virtual Drive");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """C:\Program Files\WinMount\WinMount.exe"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
//tab([operation], [data], [index])
tab("new", $drive:);
OpenWith """C:\Program Files (x86)\The KMPlayer\KMPlayer1.exe""$drive:";
"Un mount which drive"
$app = "C:\Program Files\WinMount\WinMount.exe";
//unmount <drive|all>: Unmount image file.
//Example: unmount drive F: .
//Command: piso unmount F:
$drive = inputselect("Unmount which drive?", Z|Y|W|V|U|T|S|R|Q|P|O|N|M|L|K|J|I|H|G,,2,,650,250, "XYplorer piso");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
//run
run """$app"" -unmount:$drive:";
"Un mount all : UnMountAll"
$app = "C:\Program Files\WinMount\WinMount.exe";
run """$app"" -unmountall";
"Compress"
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
OpenWith """C:\Program Files\WinMount\WinMount.exe""-C$items";
"Decompress"
//Get items names as "item1" "item2" etc
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
$destination = inputfolder( ,select destination folder to move to);
// run """$app"" -E<items> -o:$destination";
OpenWith """C:\Program Files\WinMount\WinMount.exe""-E$items -o:$destination:";
// winmount -E [compressed file list] "-s:target folder"
"Smart Extraction"
//Get items names as "item1" "item2" etc
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
$destination = inputfolder( ,select destination folder to move to);
// winmount -E [compressed file list] "-s:target folder"
OpenWith """C:\Program Files\WinMount\WinMount.exe""-E$items -s:$destination:";
"Convert"
//Get items names as "item1" "item2" etc
$char= chr(34);
$items = $char.get ("SelectedItemsPathNames", "$char $char").$char;
// winmount -T [item1]
OpenWith """C:\Program Files\WinMount\WinMount.exe""-T$items";
-
binocular222
- Posts: 1423
- Joined: 04 Nov 2008 05:35
- Location: Win11, Win10, 100% Scaling
Re: how to add user options for xyplorer script?
Another minor clean-up:
Instead of repeating "C:\Program Files\WinMount\WinMount.exe" twice in each sub-script, you can define either (1) a permanent variable or (2) a global variable. It's easier in case you need to change the path. I demonstrate method (2):Refer here:http://www.xyplorer.com/xyfc/viewtopic. ... 445#p80444
btw: Winmount support a lot more file extension than your original script. I changed it to iso|bin|nrg|daa|cdi|cue|ccd|mds|mdf|img|isz
Instead of repeating "C:\Program Files\WinMount\WinMount.exe" twice in each sub-script, you can define either (1) a permanent variable or (2) a global variable. It's easier in case you need to change the path. I demonstrate method (2):
Code: Select all
"_Variable"
Global $Winmount;
$Winmount = "C:\Program Files\WinMount\WinMount.exe"
"Mount to : Mount"
Load "*", "_Variable";
Global $Winmount;
$AllDrive = C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z;
$UsedDrives = replace(get("drives"), ":\") . |;
$Position = 0;
$Drive = C;
While($Drive != ""){
$Drive = substr($UsedDrives,$Position,2);
$AllDrive = replace($AllDrive,$Drive);
$Position = $Position + 2;
};
If( strpos("iso|bin|nrg|daa|cdi|cue|ccd|mds|mdf|img|isz", "<curext>") == -1 ) {Status "Not image file", ,"stop"; end 1};
Else
{
$drive = inputselect("Currently selected item:<crlf><curitem>", $AllDrive,,2,,650,450, "Select drive letter for new Virtual Drive");
end(strlen($drive) > 1), "Please select only one check box, script ends.";
OpenWith """$Winmount"" -m <items> -drv:$drive:";
wait(2000); // wait 2 seconds
tab("new", $drive:);
}btw: Winmount support a lot more file extension than your original script. I changed it to iso|bin|nrg|daa|cdi|cue|ccd|mds|mdf|img|isz
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488
XYplorer Beta Club