Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Compare to current pixel after 15 seconds, restarts function if match
- DetectCrash(StartLabel, crashcontrol)
- {
- global
- PixelGetColor, FII, 1278, 306, RGB
- msgbox, comparison pixel retrieved
- if (crashcontrol == FII)
- {
- if IsLabel(StartLabel)
- goto %StartLabel%
- }
- Fn := Func("DetectCrashControl").Bind(StartLabel)
- SetTimer, % Fn, -15000
- return
- }
- ;Get a pixel as control for crash testing
- DetectCrashControl(StartLabel)
- {
- global
- PixelGetColor, FOO, 1278, 306, RGB
- if IsLabel(StartLabel)
- {
- Fn := Func("DetectCrash").Bind(StartLabel, FOO)
- SetTimer, % Fn, -15000
- msgbox, control pixel obtained
- }
- return
- }
- ;Kill Timers
- TimerKill(StartLabel)
- {
- global
- Fn := Func("DetectCrash").Bind(StartLabel, FOO) ;Probably something wrong in this part
- SetTimer, % Fn, Off
- Fn := Func("DetectCrashControl").Bind(StartLabel)
- SetTimer, % Fn, Off
- return
- }
- Ads() ;Sample function
- {
- global
- AdsStart:
- DetectCrashControl("AdsStart")
- (...) ;Function stuff
- TimerKill(AdsStart)
- return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement