Hypertrophy Posted October 5, 2009 Posted October 5, 2009 heres what i did and its not showing a msgbox()... AdlibEnable("myadlib") ;... Exit Func myadlib() If WinActive("Error") Then Else msgbox(0,"","") EndIf EndFunc
dantay9 Posted October 5, 2009 Posted October 5, 2009 You need to loop the script so it doesn't exit while using adlib. AdlibEnable("myadlib") While 1 WEnd Exit Func myadlib() If WinActive("Error") Then Else msgbox(0,"","") EndIf EndFunc
TurionAltec Posted October 5, 2009 Posted October 5, 2009 I'd fire a sleep in there so you don't kill the CPU AdlibEnable("myadlib") While 1 sleep(2000) WEnd Exit Func myadlib() If WinActive("Error") Then Else msgbox(0,"","") EndIf EndFunc
dantay9 Posted October 5, 2009 Posted October 5, 2009 It was just an example. Sleep is always great in a loop. I almost never go without a sleep. If I need a tight loop, but still don't want to kill the CPU, I use Monoceres' script here.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now