Page 1 of 1

Why this throws an error message...?

Posted: 17 Aug 2010 18:36
by SkyFrontier

Code: Select all

::focus "p2"; goto "%tmp%"; selfilter "*.tmp"; #804
If I just

Code: Select all

goto "%tmp%"; selfilter "*.tmp"; #804
everything runs fine. But I need this code to get %tmp% content - invisibly, if possible (ie without leaving current panel nor going to it in the other) - WITHOUT leaving the current pane I'm in.
Any help, please...?

Re: Why this throws an error message...?

Posted: 17 Aug 2010 18:54
by serendipity
SkyFrontier wrote:

Code: Select all

::focus "p2"; goto "%tmp%"; selfilter "*.tmp"; #804
If I just

Code: Select all

goto "%tmp%"; selfilter "*.tmp"; #804
everything runs fine. But I need this code to get %tmp% content - invisibly, if possible (ie without leaving current panel nor going to it in the other) - WITHOUT leaving the current pane I'm in.
Any help, please...?
Try this:

Code: Select all

//confirm before copying
  Msg "Are you you want to copy contents of <br>%temp% <br>to <br><get path 2>?",1;
//copy to pane 2 *.tmp files from %temp% folder
  copyto "<get path 2>", "%temp%\*.tmp";

Re: Why this throws an error message...?

Posted: 17 Aug 2010 19:06
by SkyFrontier

Code: Select all

copyto "<get path 2>", "%temp%\*.tmp";
hmmmm... that's universal enough to what I have in mind!
Thanks, Serendipity!
THIS did the trick!:

Code: Select all

copyto "<get path 1>", "%tmp%\*.tmp";
EDIT: forgot to update.
Ninja style:

Code: Select all

copyto "<curpath>", "%tmp%\*.ext";
-don't forget: you can specify extensions for it (*.tmp or *.exe, for instance) and hardcode the path replacing "%tmp%" with "...any\place\you like\" or any Script/Environment variables that applies to your case.

Re: Why this throws an error message...?

Posted: 17 Aug 2010 19:19
by SkyFrontier
...although I'd like to have a deep thought on the question itself, as it seems that the scripting function is broken somewhere...
It OPENS the TMP directory and stops there, when it should simply continue the copy of files...

Re: Why this throws an error message...?

Posted: 17 Aug 2010 19:29
by serendipity
SkyFrontier wrote:...although I'd like to have a deep thought on the question itself, as it seems that the scripting function is broken somewhere...
It OPENS the TMP directory and stops there, when it should simply continue the copy of files...
Works for me. Maybe the tmp file you are copying is in use. I got a message that an application is accessing a tmp file which i skipped and it copied alright from there.

Re: Why this throws an error message...?

Posted: 17 Aug 2010 19:52
by SkyFrontier
Weird, weird... But I narrowed down the problem a bit:
If I launch the script with Pane 2 active, it works.
From Pane 1, it doesn't.
-since it's a "focus "p2"" problem, at least I'd expect the problem to show in an opposite situation, ie, launching it with P1 active it should work because the script starts asking focus to go to the other pane!

Re: Why this throws an error message...?

Posted: 17 Aug 2010 20:49
by serendipity
SkyFrontier wrote:Weird, weird... But I narrowed down the problem a bit:
If I launch the script with Pane 2 active, it works.
From Pane 1, it doesn't.
-since it's a "focus "p2"" problem, at least I'd expect the problem to show in an opposite situation, ie, launching it with P1 active it should work because the script starts asking focus to go to the other pane!
Well the script I posted does not have the command "focus" at all. Are you referring to the script you posted or to my script?

Re: Why this throws an error message...?

Posted: 17 Aug 2010 21:10
by SkyFrontier
Serendipity:
Are you referring to the script you posted or to my script?
Yep - my dumb sequence of commands... ("script"... hah!)
But be aware that I'm just trying to raise a potential problem on the commands themselves...