My only other idea, which i am not sure where to look, or how to do it is .... "DO" ABC "UNTIL" DEF "OR UNTIL" X timer (ie 10 mins expires) original thread http://www.autoitscript.com/forum/index.php?showtopic=39393 but the topic changed after it was answered. Func cycle()
Sleep(150000)
Send("{F1}") ;turn off then back on
MouseMove(851, 647)
Sleep(5000)
If (PixelGetColor(851, 647) > 10000000) Then empty()
Sleep(500)
MouseMove(1704,82) ; target 1
MouseDown("left")
MouseUp("left")
Send("{F1}")
If (PixelGetColor(1509, 62) = 0) Then target()
Sleep(11000)
Send("{F2}") ;turn off then back on
MouseMove(851, 647)
Sleep(5000)
If (PixelGetColor(851, 647) > 10000000) Then empty()
Sleep(500)
MouseMove(1591,70) ; target 2
MouseDown("left")
MouseUp("left")
Send("{F2}")
If (PixelGetColor(1509, 62) = 0) Then target()
Sleep(11000)
Send("{F3}") ;turn off then back on
MouseMove(851, 647)
Sleep(5000)
If (PixelGetColor(851, 647) > 10000000) Then empty()
Sleep(500)
MouseMove(1493,77) ; target 3
MouseDown("left")
MouseUp("left")
Send("{F3}")
If (PixelGetColor(1509, 62) = 0) Then target()
Sleep(500)
cycle()
EndFunc Just looking to add a "if" 10 minutes pass "Then empty()" just not sure how to set up the timer or add the second varable.