Sign in to follow this  
Followers 0
eug2b

search element on window

6 posts in this topic

Hello. It is necessary for me to find an element in an active window

(Pink color in this case is a background, the picture very small).

Help to be defined what functions correctly to use for search.

search.bmp

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello. It is necessary for me to find an element in an active window

(Pink color in this case is a background, the picture very small).

Help to be defined what functions correctly to use for search.

$coord = PixelSearch( 0, 0, 20, 300, 0xFF00FF, 50)

If Not @error Then

MsgBox(0, "X and Y are:", $coord[0] & "," & $coord[1])

MouseMove($coord[0],$coord[1],100)

EndIf

I cant see why this doesn't work on my pc but it should... maybe its cause im using a not so popular mouse driver...

Edited by System238

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites

eug2b,

Welcome to the AutoIt forum. :>

If this is the only area of the window that uses these particular colours then use PixelSearch to look for the specific colours.

If there is a lot of text in this colour, then you could:

- Use PixelCheckSum - but this could be a bit long-winded

- Use this DLL to search.

What window do you want to search? :unsure:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I want to use it for game, during that moment when in a window of my game there is a sign as on a picture,

it is necessary to stop a carried out cycle. Nevertheless I tend to use of PixelCheckSum.

It would be desirable more in detail, whether I can make the checksum cache of the image of a symbol and check the set area on coincidence.

Edited by eug2b

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I want to use it for game, during that moment when in a window of my game there is a sign as on a picture,

it is necessary to stop a carried out cycle. Nevertheless I tend to use of PixelCheckSum.

It would be desirable more in detail, whether I can make the checksum cache of the image of a symbol and check the set area on coincidence.

Troll

Whats with game automation on this forum...

Edit: Now you're just being creepy dude...

Edited by System238

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

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