Jump to content

search element on window


 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...