Posted: 24 Jun 2008 20:05
Here's the screenshot of the script window, maybe I messed up copy/paste:


Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/

Code: Select all
Set(%cf%,<curfolder>);
Set(%cp%,<curpath>);
Set(%nn%,<date yyyymmddhhnnss>);
OpenWith("""C:\program files\winrar\winrar.exe"" e -- *.rar * %nn%-temp\", "s");
Msg("Press OK when WinRAR is finished.",1);
GoTo("<curpath_s>\%nn%-temp");
Sel(a);
Rename(bat,%cf%);
Focus(L);
MoveTo("..\..");
#523;
#523;
Rename(bat,%nn%,,"%cp%");
SelFilter(%nn%, d, Name);
Focus(L);
#169;
I'm not sure I understand exactly what you're asking but try changingivan wrote:TheQwerty, this works great!
I don't even mind the prompt asking me to click when WinRAR finishes. However, there is one hiccup. I extract from a folder that's on Desktop, but upon extraction and confirmation it expands my folder tree and goes to C:\Documents and Settings\username\Desktop. Although this is correct but I am wondering if there is any way to keep the focus on the Desktop the way I have? Cheers
Code: Select all
GoTo("<curpath>\%nn%-temp")Code: Select all
GoTo("<curpath_s>\%nn%-temp")

The change I mentioned in the last post seems to fix that for me, does it not work for you?ivan wrote:So, while they are technically the same, they are also different if you know what I mean.
Yep, that did the trick. Of course the next step would be to ask if it's possible not to have the prompt about WinRAR finishing but if there's no way around then i'll settle for what I have, thank you very much.TheQwerty wrote:The change I mentioned in the last post seems to fix that for me, does it not work for you?ivan wrote:So, while they are technically the same, they are also different if you know what I mean.
You could split the script into two parts and execute one to start extraction and the other to do the moving and cleaning.ivan wrote:Yep, that did the trick. Of course the next step would be to ask if it's possible not to have the prompt about WinRAR finishing but if there's no way around then i'll settle for what I have, thank you very much.
Now there is an idea for him to think aboutTheQwerty wrote:But to do it all within XY sans prompt you'll have to come up with a way for Don to handle pausing the script until the extraction is completed and wait till it's implemented.
Walk it step by step (= use stepping mode) and see which particular command takes that long. There is no delay as far as I know, and I should know...ivan wrote:Here's an interesting question: what factors influence how fast a script can run?
The thing is that I just timed this script and from the moment I click OK (to confirm that WinRAR has finished) to the point when I'm asked if I want to put the folder in recycle bin all of 8 and a bit seconds go by. Now I'm wondering if there's intentional delay there and if so then can it be adjusted? If it's not a delay then why does it take 8 seconds to rename a file, move it up a tree and prompt for deletion?
Code: Select all
GoTo("<curpath_s>\%nn%-temp");
Sel(a);
Rename(bat,%cf%);
Focus(L);
MoveTo("..\..");
#523;
#523;
Rename(bat,%nn%,,"%cp%");
SelFilter(%nn%, d, Name);
Focus(L);
#169;
Step through the section using step:ivan wrote:As I said, the part between me clicking OK after WinRAR finishes extraction and when I get a prompt to move the folder to Recycle Bin is one that takes by far the longest time (obviously excluding the extraction time because XYplorer can't influence that), so this section:
takes over 8 seconds to execute. I am simply wondering why that is and if there's anything I can do to reduce this period of time.Code: Select all
GoTo("<curpath_s>\%nn%-temp"); Sel(a); Rename(bat,%cf%); Focus(L); MoveTo("..\.."); #523; #523; Rename(bat,%nn%,,"%cp%"); SelFilter(%nn%, d, Name); Focus(L); #169;
Code: Select all
Step;
GoTo("<curpath_s>\%nn%-temp");
Sel(a);
Rename(bat,%cf%);
Focus(L);
MoveTo("..\..");
#523;
#523;
Rename(bat,%nn%,,"%cp%");
SelFilter(%nn%, d, Name);
Focus(L);
#169;
Code: Select all
Rename(bat,%nn%,,"%cp%");I did not follow this thread (been coding...ivan wrote:I "stepped" through the script and this is the part that takes several seconds (the majority of those 8 overall, I'd say)
If the command in that script is a time-consuming one then it's ok, but it can be influenced by any factors that I can do something about then it's worth a try.Code: Select all
Rename(bat,%nn%,,"%cp%");