WaitMs> wait in milliseconds

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1062
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

WaitMs> wait in milliseconds

Post by Grovkillen » Tue Jun 18, 2024 11:02 am

I find myself using

Code: Select all

Wait>{100/1000}
to wait for 100 milliseconds. Why I use the equation you may wonder, well that's because MacroScheduler uses the decimal of the local system and I cannot know if

Code: Select all

Wait>0.1
will work. Forcing the decimal symbol isn't a fool proof solution either. COMMA seems to be used instead of DECIMAL_SEPARATOR?

Wouldn't it be good if we had a WaitMs command which only accepts integers?

I know that we cannot be sure that the actual wait period is equal to the wait milliseconds set but I just want to be sure to have the wait working no matter the local system's settings.
Last edited by Grovkillen on Tue Jun 18, 2024 4:24 pm, edited 1 time in total.
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
Grovkillen
Automation Wizard
Posts: 1062
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: WaitMs> wait in milliseconds

Post by Grovkillen » Tue Jun 18, 2024 4:23 pm

I have now replaced all my Wait commands with the

Code: Select all

LibFunc>Kernel32,Sleep,Sres,100
function that JRL demoed here: viewtopic.php?f=9&t=10672&p=47640

This one works great so far, will test it for a few days and make it permanent in my scripts until we get a native command.
Let>ME=%Script%

Running: 15.0.24
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts