Regency Posted October 31, 2007 Posted October 31, 2007 PixelSearch(603,200,655,215,9175040,"",2) how would i make a script make a Msg box IF this is true, and then if it is not have it repeat a groupe of lines in the script. How would i tell if it was true or false...
Blue_Drache Posted October 31, 2007 Posted October 31, 2007 Return Value Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y) Failure: Sets @error to 1 if color is not found. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
Moderators SmOke_N Posted October 31, 2007 Moderators Posted October 31, 2007 PixelSearch(603,200,655,215,9175040,"",2) how would i make a script make a Msg box IF this is true, and then if it is not have it repeat a groupe of lines in the script. How would i tell if it was true or false...Wrap IsArray() around PixelSearch() then do = 1, it will return true or false:MsgBox(0,0,IsArray(PixelSearch(603,200,655,215,9175040,"",2)) = 1) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Regency Posted October 31, 2007 Author Posted October 31, 2007 Wrap IsArray() around PixelSearch() then do = 1, it will return true or false:MsgBox(0,0,IsArray(PixelSearch(603,200,655,215,9175040,"",2)) = 1) #include <IE.au3> $oIE=_IECreate("http://www.themafianetwork.net/jail.aspx?") _IELoadWait($oIE) WinSetState("TheMafiaNetwork - National Jail - Microsoft Internet Explorer", "", @SW_MAXIMIZE) WinSetState("TheMafiaNetwork - National Jail - Microsoft Internet Explorer", "", @SW_MINIMIZE) For $var = 0 To 100 Step 1 _IELoadWait($oIE) _IELinkClickByText ($oIE, "Break") _IELoadWait($oIE) _IENavigate($oIE,"http://www.themafianetwork.net/jail.aspx?", 1) Next If MsgBox(0,0,IsArray(PixelSearch(603,200,655,215,9175040,"",2)) = 1)Then Exit If MsgBox(0,0,IsArray(PixelSearch(603,200,655,215,9175040,"",2)) = 0) Then This is what I have. I dont know how to make it repeat the whole For Expression if the pixel search comes back false.. Anyones help?
Moderators SmOke_N Posted October 31, 2007 Moderators Posted October 31, 2007 (edited) Search the term loop... Example:While IsArray(PixelSearch(......info....)) = 0 Sleep(10);CPU rest ;Stuff to perform while the PixelColor is not found WEnd Edited October 31, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Blue_Drache Posted November 1, 2007 Posted November 1, 2007 Wrapping IsArray() is one solution. Testing for @error is another. Six of one..... Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
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