Sign in to follow this  
Followers 0
Regency

Making a Pixel Checksum True or false..

7 posts in this topic

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...

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

Yea.. I dont get that...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

Wrapping IsArray() is one solution.

Testing for @error is another.

Six of one.....


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0