Sign in to follow this  
Followers 0
AchterlijkeVleugel

Pixel detection beep

33 posts in this topic

#1 ·  Posted (edited)

Hey guys

 i basically want my script to detect a pixel(or more) and make a beep sound until the pixel is gone, but when the pixel is gone i wanna repeat this. help?

ty vm

Edited by AchterlijkeVleugel

Share this post


Link to post
Share on other sites



AchterlijkeVleugel,

Welcome to the AutoIt forum. :)

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

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

This can be done with the PixelSearch and Beep functions. There is example code for each function in the Help file.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Ty vm ;)

I haven't tried anything yet since i don't really understand the pixel detection function 

Share this post


Link to post
Share on other sites

This can be done with the PixelSearch and Beep functions. There is example code for each function in the Help file.

What about searching a part of a image with which function can i do that?

Share this post


Link to post
Share on other sites

can anyone maybe explain this to me?

left left coordinate of rectangle. top top coordinate of rectangle. right right coordinate of rectangle. bottom bottom coordinate of rectangle.

i copied this from the pixel search page in the help file

what do they mean?

Share this post


Link to post
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


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

mmm special membername you selected ....  ;)

mm lol :P

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

The rectangle referred to is the image that is being checked.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

What program are you trying to automate?  Perhaps we can help better if we have an idea as to what you're using it for?  There may be much easier ways to do it.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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

Share this post


Link to post
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

1 person likes this

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

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?

Share this post


Link to post
Share on other sites

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


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

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