What I believe would be a better approach is a script that loops until a key is pressed, then calls a function to do your outlook thing.
While 1
Sleep(10)
If _IsPressed($key) Then
FuncOutlookStuff()
EndIf
WEnd
Func FuncOutlookStuff()
; stuff
EndFunc ;==>FuncOutlookStuff
This is how I would have approached it, building in safeguards and other exits as appropriate.
Ok, I guess so ... it's really only a game, I guess. He's trying to set it up so it watches the screen and clicks at 10 or less. *shrug* Seems kind of e-peenish to me.
Yeah, that's for an AutoIt created GUI.
My following code is for a non AutoIt created GUI
If ControlCommand ( $str_Window, $str_WinText, $hctrl_ID, "IsChecked" ) then
ConsoleWrite("Checked" & @CRLF)
Else
ConsoleWrite("Not Checked" & @CRLF)
EndIf
Fill in proper values for the window, text and controlID/handle