Jump to content
Sign in to follow this  

How to implement İsOBject function of ACTool in Autoit?

Recommended Posts



I first found ACtool in internet for macro writing then later AUTOIT. I found AUTOIT it more flexible-useful-advanced. ACTool has a function that i could not find it in AUTOIT implemeneted.(May be it is somewhere but i am not patient enough :idea:.

What I am trying to do is to write a function which compares pixel color values of a square (or rectengular) area on the screen with the values defined in the script and returns TRUE or FALSE (Like it is imlemented in ACtool).

This functionality is implemented in ACtool as follows:

// Define the Pixel and color values of an area as object

Object SomeObject // Test at coords 1387, 855



End Object

//Check object at given screen coordinates

isOBject SomeObject at 1387, 855

// Code... if object is present


// Code... if object is not there


Can you help me to implement the above functionality in AUTOIT? (Script samles appriciated)

Thank You.

Share this post

Link to post
Share on other sites


Welcome to the AutoIt forum. :idea:

Two possible ways to do what you want:

- 1. Use an array to hold the colours of the pixels. Then use PixelGetColor in a loop to read the current colours - if they match, the object you are looking for is there.

- 2. Use PixelCheckSum on the area when it contains the object you want and store the result. Then use PixelCheckSum on the area again - if you get the same value, the object you are looking for is there.

See which one is easier for you. :)


P.S. No script samples - I am not patient enough. :(

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


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

or, if you know what color you are looking for and the only time that color appears is for your condition, you could do a pixelsearch in your area for that color until found.



My Android cat and mouse game

We're gonna need another Timmy!

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