Page 1 of 1

How to transform OpenWith into Run?

Posted: 25 Jun 2010 15:35
by zer0
Chaps,

I wonder if one kind soul would help me out with this script

Code: Select all

Set($cf,<curfolder>);
   Set($cp,<curpath>);
   Set($nn,<date yyyymmddhhnnss>);
   new "$nn-temp", dir;
   OpenWith("""C:\Program Files (x86)\WinRAR\WinRAR.exe"" e -- *.rar * $nn-temp", "s");
   Msg("Press OK when WinRAR is finished.",1);
   GoTo("<curpath_s>\$nn-temp");
   Sel(a);
   Rename(b,$cf);
   Focus(L);
   MoveTo("..\..");
   #523;
   #523;
   Rename(b,$nn,"$cp");
   SelFilter($nn, d, Name);
   Focus(L);
   delete 1, 0, ;
I would like for the OpenWith line to use Run with an appropriate switch, so that I don't have to prompt (and wait) for the extraction to complete. Thanks a bunch! :D

Re: How to transform OpenWith into Run?

Posted: 25 Jun 2010 20:42
by Stefan
I don't know if i understood this correct, you mean for one selected archive?

Try if this works:
store the selected archive name into an var and use this $var instead of *.rar

Code: Select all

Set($cf,<curfolder>);
   $curitem = "<curitem>";   //   <================ only selected archive
   Set($cp,<curpath>);
   Set($nn,<date yyyymmddhhnnss>);
   new "$nn-temp", dir;
   //OpenWith("""C:\Program Files (x86)\WinRAR\WinRAR.exe"" e -- *.rar * $nn-temp", "s");
    run """C:\Program Files (x86)\WinRAR\WinRAR.exe"" e -- $curitem * $nn-temp",,1;   //   <===== extract  only selected archive
    //run """C:\Program Files (x86)\WinRAR\WinRAR.exe"" e -- *.rar * $nn-temp",,1;   //   <= extract all *.rar files in current folder to one common folder
   //Msg("Press OK when WinRAR is finished.",1);
   GoTo("<curpath_s>\$nn-temp");
   Sel(a);
   Rename(b,$cf);
   Focus(L);
   MoveTo("..\..");
   #523;
   #523;
   Rename(b,$nn,"$cp");
   SelFilter($nn, d, Name);
   Focus(L);
   delete 1, 0, ;

Re: How to transform OpenWith into Run?

Posted: 26 Jun 2010 11:29
by zer0
Nice one Stefan, that's exactly what I was after. My mouse will be able to take a breather now and then :lol: