Code: Select all
run """<xy>"" /ini=XYplorer_Gallery.ini ""$MenuCaller"" /script=""::loadlayout('thumbs');""";Code: Select all
run """<xy>"" /ini=XYplorer_Gallery.ini ""$MenuCaller"" /script=""::loadlayout('thumbs');""";Code: Select all
zip_extract("<xyscripts>\$zipname", "<xydata>", "XYplorer.ini");
#190;//restart without saveHi Peter, sure that's another possibility. As in the first post, I start the new instance of XYplorer with a /ini=modified.ini, but you could go one step further I suppose and terminate the original one. Quite a while ago, I setup a keyboard shortcut to terminate the second instance using: if(get("instance") == "2") {exit n}, but I'm not sure how I'd "automatically" in scripting terminate the original (1st) instance. The second instance comes up and becomes the active instance of XY. Is there a way within XY scripting to single out the original instance to close it without making in active? The SC exit modes only work on the active instance. In most of the situations I have, I want the original instance to stay open anyway. My original post question was written more because I a bit surprised that there isn't a "iniload" type SC without going through a load file dialog box. Thanks.PeterH wrote: ...couldn't you, instead of loading some ini into the current XY, start a new XY with the wanted ini, and terminate the current?
Code: Select all
if(gettokenindex("XYplorer.exe*",runret(<<<HEREDOC
"cmd" /c "tasklist /nh /FI "Imagename eq XYplorer.exe""
HEREDOC
),"<crlf>","wc") > "1") { echo "Instances of XY are greater than 1";}Code: Select all
if (gettokenindex("XYplorer.exe*", runret("cmd /c tasklist /FI ""Imagename eq XYplorer.exe"" /NH"), "<crlf>", "wc") > 1) { echo "Instances of XY are greater than 1"; }
Code: Select all
$a = runret("cmd /c tasklist /FI ""Imagename eq XYplorer.exe"" /NH");
text $a;