Loop (and create a countdown) on a var created from args
Posted: 13 Jan 2019, 14:48
I am starting my ahk script from a python scrip with an argument "number" (which is an integer but set as a string variable):
Then in the ahk script I need to create a Tooltip that countdown from the time set in the args. If Number is set to 15 I should then see 15, 14,... 3,2,1...
But I don't see this, I literally see "15 - A_Index"
Any idea how to solve this? Thanks for your help!
Here is my script:
Code: Select all
subprocess.call([path_ahk_exe, path_ahk_script_countdown, number])
But I don't see this, I literally see "15 - A_Index"
Any idea how to solve this? Thanks for your help!
Here is my script:
Code: Select all
Number := %0% , Number += 0 ; convert text to number
Loop %Number%
{
ToolTip, % %Number% - A_Index ; if you just use A_Index it starts at 1 2 3 etc
Sleep 1000
}
Tooltip, 0