run command after time xx

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

run command after time xx

Post by swan_x »

i need to run one script:

Code: Select all

run "D:\app.exe"
but after time 5 sec to run my script.

and another, run app1, wait 5sec, run app2. i have try this but not work:

Code: Select all

run "D:\app01.exe"; wait 5000; "D:\app02.exe";
how to? tanxs to everybody.

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: run command after time xx

Post by highend »

By reading the help file about run...
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

Re: run command after time xx

Post by swan_x »

my problem is second program. not run. i have:

Code: Select all

run "D:\heic0407b.jpg" wait 5000 "D:\app.exe"

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: run command after time xx

Post by highend »

Your problem is run^^
One of my scripts helped you out? Please donate via Paypal

swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

Re: run command after time xx

Post by swan_x »

i don't understand. please write a simple example.

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: run command after time xx

Post by highend »

I just don't get it. What exactly doesn't work here?

Code: Select all

    $start = now("msecs");
    run '"<path with spaces>\app1.exe"';
    wait 5000;
    run '"<path with spaces>\app2.exe"';
    e "Time: " . now("msecs") - $start . " msecs";
It clearly shows that it waits 5000+ ms...
One of my scripts helped you out? Please donate via Paypal

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: run command after time xx

Post by PeterH »

At first I thought this is a typo :whistle:
Then I found e is an alias for command echo. :shock: Didn't know that! :oops:

And it seems it's the very only XY-command having an alias? Is that correct?
Win11 Pro 223H2 Gerrman

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: run command after time xx

Post by highend »

No, e.g. gpc -> getpathcomponent
One of my scripts helped you out? Please donate via Paypal

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: run command after time xx

Post by PeterH »

Ah - when you say it I remember gpc() :roll:

These are different formats of XY-documentation:
Echo-command defines e explicit as an alias. (That's what I've searched for.)
gpc() is shown as a second form for getpathcomponent - but without describing/naming that an 'alias'.
Win11 Pro 223H2 Gerrman

swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

Re: run command after time xx

Post by swan_x »

yes, work!
tanxs for your help. regards.

Post Reply