---- Posted March 1, 2018 Share Posted March 1, 2018 I have a script that uses pixelsearch to find a color in a very small space on the screen... Is it possible to use an input box so that I could change the dimensions for the pixelsearch everytime it starts by making the inputs into a variables to plug into the script and become the pixelsearch dimensions? Link to comment Share on other sites More sharing options...
BatMan22 Posted March 1, 2018 Share Posted March 1, 2018 1 hour ago, ---- said: I have a script that uses pixelsearch to find a color in a very small space on the screen... Is it possible to use an input box so that I could change the dimensions for the pixelsearch everytime it starts by making the inputs into a variables to plug into the script and become the pixelsearch dimensions? If I am understanding your question correctly.. It's very easy to do.. Start below. #include <Array.au3> Example() Func Example() ; Places the input box in the top left corner displaying the characters as they ; are typed. Local $sX = InputBox("Enter X Start Coordinates", "Enter X Start Coordinates", "0") Local $sX2 = InputBox("Enter X End Coordinates", "Enter X End Coordinates", "1000") Local $sY = InputBox("Enter Y Start Coordinates", "Enter Y Start Coordinates", "0") Local $sY2 = InputBox("Enter Y End Coordinates", "Enter Y End Coordinates", "1000") Local $where = PixelSearch($sX, $sY, $sX2, $sY2, 0xFF0000) ; Searches for red in the coordinates you give it. _ArrayDisplay($where) EndFunc Link to comment Share on other sites More sharing options...
---- Posted March 2, 2018 Author Share Posted March 2, 2018 Thanks! It worked perfectly Link to comment Share on other sites More sharing options...
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