I've been trying to make a script where at specific minutes every hours, something happen. I've tried to add a loop so it can always check if it is now at the right minute of the hour. I tested the loop with a mouse click and it worked, I'm pretty sure the problem is when combining the if statement with a loop. I've been stuck for 1 hours trying to think of a way to fix it or find another way to do it.
^!p::
time:
formattime, time, , mm tt
loop
{
if (Time = "59 am")
{
goto action1
}
if (Time = "45 am")
{
goto action2
}
if (Time = "03 am")
{
goto action3
}
}
Return
action3:
{
msgbox, test
}
return
action2:
{
msgbox, test2
}
return
action1:
{
msgbox, test3
}
return
Esc::ExitApp ; Exit script with Escape key