And if you comment "sleep 2000" then only Sub2 will work
Code: Select all
#Persistent
SetTimer,Sub1,-1
sleep 2000
SetTimer,Sub2,-1
return
Sub1:
Loop
{
tooltip sub1
sleep 500
}
return
Sub2:
Loop
{
tooltip sub2
sleep 100
}
return
Code: Select all
#Persistent
SetTimer,Sub1,-1
sleep 2000
SetTimer,Sub2,-1
return
Sub1:
Loop
{
tooltip sub1
sleep 500
}
return
Sub2:
Loop
{
tooltip sub2
sleep 100
}
return
Code: Select all
#Persistent
Critical ;prevents the timers from interrupting this thread
SetTimer , Sub1 , 500
SetTimer , Sub2 , 100
Sleep 2000
Critical , Off ;normally this isn't needed, but I recall experiencing a strange issue specifically relating to Critical in the autoexec section
return
Sub1:
Critical ;prevents Sub2 from interrupting it on the minute chance it happens to fire during this thread
Tooltip Sub1
return
Sub2:
Critical ;prevents Sub1 from interrupting it on the minute chance it happens to fire during this thread
Tooltip Sub2
return
Users browsing this forum: Araphen, mikeyww, Peiya, ShatterCoder, sofista and 305 guests