Jump to content

Pixel detection beep


Recommended Posts

  • Moderators

AchterlijkeVleugel,

Welcome to the AutoIt forum. :)

What code have you tried that has not worked? :huh:

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

  • Moderators

AchterlijkeVleugel,

If, as it seems, you are completely new to AutoIt (and possibly coding in general), I recommend reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) as this will help you enormously. You should also look at this excellent tutorial - you will find other tutorials in the Wiki (the link is at the top of the page). :)

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

AchterlijkeVleugel,

If, as it seems, you are completely new to AutoIt (and possibly coding in general), I recommend reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) as this will help you enormously. You should also look at this excellent tutorial - you will find other tutorials in the Wiki (the link is at the top of the page). :)

M23

Yep u are right i am new to coding ;) but i think i will understand it if someone explains me which rectangle they are referring to, i am not trying to rush learning auto it or something. :D

Link to comment
Share on other sites

When Pixel searching you consider the space on the screen a grid and you want to search a section of the screen.

Is pixel searching the only way you can do what you need? Have you tried seeing if you can directly interact with the control your dealing with? Look at the AutoIt Window Info tool. If you are dealing with a web based window, then you can use the IE tools. (IE commands are in the help file)

Edited by YogiBear
Link to comment
Share on other sites

When Pixel searching you consider the space on the screen a grid and you want to search a section of the screen.

Is pixel searching the only way you can do what you need? Have you tried seeing if you can directly interact with the control your dealing with? Look at the AutoIt Window Info tool. If you are dealing with a web based window, then you can use the IE tools. (IE commands are in the help file)

ty vm ;) how can i make this script keep repeating itself though?

its not a web based window.

Edited by AchterlijkeVleugel
Link to comment
Share on other sites

  • Moderators

AchterlijkeVleugel,

Screen coordinates start from 0,0 at top-left and then increse as you move right/down. So you need the coordinates of the points at teh corner of the rectangle in which you are interested to feed into the PixelSearch function. Her is an example:

Screen

  0    5    10   15   20   25   30
  |    |    |    |    |    |    |
0 #-----------------------------#
1 |                             |
2 |                             |
3 |    #---------#              |
4 |    |         |              |
5 |    | Rect    |              |
6 |    |         |              |
7 |    #---------#              |
8 |                             |
9 |                             |
10#-----------------------------#

The coordinates of the 4 corners are:

Top-left:     5,3
Top-right:    15,3
Bottom-left:  5,7
Bottom-right: 15,7

So the parameters you need are:
Left:   5
Top:    3
Right:  15
Bottom: 7
All clear? :)

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

AchterlijkeVleugel,

Screen coordinates start from 0,0 at top-left and then increse as you move right/down. So you need the coordinates of the points at teh corner of the rectangle in which you are interested to feed into the PixelSearch function. Her is an example:

Screen

  0    5    10   15   20   25   30
  |    |    |    |    |    |    |
0 #-----------------------------#
1 |                             |
2 |                             |
3 |    #---------#              |
4 |    |         |              |
5 |    | Rect    |              |
6 |    |         |              |
7 |    #---------#              |
8 |                             |
9 |                             |
10#-----------------------------#

The coordinates of the 4 corners are:

Top-left:     5,3
Top-right:    15,3
Bottom-left:  5,7
Bottom-right: 15,7

So the parameters you need are:
Left:   5
Top:    3
Right:  15
Bottom: 7
All clear? :)

M23

 

very clear ;) how do i make the beep last until the pixel is not active anymore?

Link to comment
Share on other sites

  • Moderators

AchterlijkeVleugel,

How about writing some code to detect the pixel first - then we can move onto the other aspects of the script you need to understand. ;)

So - over to you to write some code that will detect the pixel. :)

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

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