No way to do it with current macro language, but if the code you want to execute can be rewritten in javascript, you can use its normal delayed-looping functions (whatever they are; I don't know much js). The Reload macro (the last one in macros.cfg) might help you.
function pause(numberMillis) {
var now = new Date();
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if (now.getTime() > exitTime)
return;
}
}
I haven't touched KM's macros, but Anurag Jain's code looks suspiciously like the Javascript language. If it is Javascript, there are the setTimeout and the setInterval functions.
It is possible to create a loop using functions instead of using a while loop, or for loop. The function just repeats it's self at the end of it, and i added a delay to it repeating it's self. This is one of my most logical pieces of work. We never have to use loops again because you can just use functions! ROFL
It is possible to create a loop using functions instead of using a while loop, or for loop. The function just repeats it's self at the end of it, and i added a delay to it repeating it's self. This is one of my most logical pieces of work. We never have to use loops again because you can just use functions! ROFL
Hoping this will help you...
Function sleep(seconds) from module time is pretty much the best. Remember seconds is a float so you can delay 0.5 seconds.
Python Syntax (Toggle Plain Text)
1.import_time
2.
3.print "Hello ..."
4.print "are you"
5.print "... there!"
Edited 1 time(s). Last edit at 01/25/2012 06:53PM by reena19_lko.