Melba23,
Yes you are right. It is a limited solution. I guess there is no way around proper error handling (I prefer it myself as well); however, I wanted to show Red-Steel an example I found. I mean, we must understand that sometimes we just want to run and make a simple script due to work deadline and the like.
Red-Steel,
Following is an example of error handling (at least it works for me);
; Activate XOnline App
Opt('wintitlematchmode', 2)
WinActivate("App - Agent")
Sleep(500)
; Triger search
Send("^f")
Sleep(500)
Send("@")
Sleep(500)
Send("{ENTER}")
Sleep(500)
;Find , in Chrome, the higlighted @ sign, orange pixel
$OrangePixel = PixelSearch(390, 170, 1540, 280, 0xff9632)
If $OrangePixel = "AutoIt.Error" Then
; Handling the error, if color not found
ToolTip("", "")
Else
MouseMove($OrangePixel[0], $OrangePixel[1], 0)
EndIf
;Find , in Chrome, the higlighted @ sign, yellow pixel
$YellowPixel = PixelSearch(390, 170, 1540, 280, 0xffff00)
If $YellowPixel = "AutoIt.Error" Then
ToolTip("", "")
Else
MouseMove($YellowPixel[0], $YellowPixel[1], 0)
EndIf
Sleep(1000)
; Copy e-mail from XOnline App. Click at the current mouse position.
MouseClick($MOUSE_CLICK_SECONDARY)
Sleep(500)
Send("e")
Sleep(1000)
I trust someone will find it useful at some point.