Why this throws an error message...?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Why this throws an error message...?

Post 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...?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

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

Post 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";

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

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

Post 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.
Last edited by SkyFrontier on 20 Aug 2010 20:31, edited 1 time in total.
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

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

Post 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...
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

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

Post 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.

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

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

Post 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!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

serendipity
Posts: 3360
Joined: 07 May 2007 18:14
Location: NJ/NY

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

Post 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?

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

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

Post 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...
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Post Reply