timing conflict in a x32Win10ProV22H2 batch file

Started by Sebastian42, April 21, 2024, 06:26:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sebastian42

Two versions of a batch file and their results :

Start "" "C:\Program Files\ToggleTaskbarAutohide\ToggleTaskbarAutohide.exe"
Start "" "C:\Program Files\Macro Express Pro 6\MeProc.exe" /ASaveDeskTopView
Start "" "C:\Program Files\ToggleTaskbarAutohide\ToggleTaskbarAutohide.exe"


The third line takes effect before the second is finished.

Start "" "C:\Program Files\ToggleTaskbarAutohide\ToggleTaskbarAutohide.exe"
Start "" "C:\Program Files\Macro Express Pro 6\MeProc.exe" /ASaveDeskTopView
timeout 1
Start "" "C:\Program Files\ToggleTaskbarAutohide\ToggleTaskbarAutohide.exe"


The CMD window that handles the timeout gets caught in the snip, thus spoiling it.

How to get a delay without the CMD window ?  I have tried 'wait' - it is no better.




Lisa_maree

Hi Sebastian

As this is a syn-tech question using  Macro express it may be an idea to ask on their forums.

https://www.macros.com/knowledge-base/how-do-i-run-a-batch-file-with-macro-express/
You have not lived today until you have done something for someone who can never repay you."
― John Bunyan

TheWaffle

You don't need the start command. You can just run the program from the batch file.


"C:\Program Files\ToggleTaskbarAutohide\ToggleTaskbarAutohide.exe"
"C:\Program Files\Macro Express Pro 6\MeProc.exe" /ASaveDeskTopView
"C:\Program Files\ToggleTaskbarAutohide\ToggleTaskbarAutohide.exe"



It may also be useful to do some error handling with a conditional.
For more info see here:
https://ss64.com/nt/syntax-conditional.html