AchterlijkeVleugel Posted October 8, 2013 Share Posted October 8, 2013 (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 October 8, 2013 by AchterlijkeVleugel Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 8, 2013 Moderators Share Posted October 8, 2013 AchterlijkeVleugel,Welcome to the AutoIt forum. What code have you tried that has not worked? M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 8, 2013 Share Posted October 8, 2013 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. Link to comment Share on other sites More sharing options...
AchterlijkeVleugel Posted October 8, 2013 Author Share Posted October 8, 2013 Ty vm I haven't tried anything yet since i don't really understand the pixel detection function Link to comment Share on other sites More sharing options...
AchterlijkeVleugel Posted October 8, 2013 Author Share Posted October 8, 2013 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? Link to comment Share on other sites More sharing options...
AchterlijkeVleugel Posted October 8, 2013 Author Share Posted October 8, 2013 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? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 8, 2013 Moderators Share Posted October 8, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Developers Jos Posted October 8, 2013 Developers Share Posted October 8, 2013 mmm special membername you selected .... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
AchterlijkeVleugel Posted October 8, 2013 Author Share Posted October 8, 2013 mmm special membername you selected .... mm lol Link to comment Share on other sites More sharing options...
AchterlijkeVleugel Posted October 8, 2013 Author Share Posted October 8, 2013 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. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 8, 2013 Share Posted October 8, 2013 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. Link to comment Share on other sites More sharing options...
Bert Posted October 8, 2013 Share Posted October 8, 2013 (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 October 8, 2013 by YogiBear The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 8, 2013 Share Posted October 8, 2013 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 Link to comment Share on other sites More sharing options...
AchterlijkeVleugel Posted October 8, 2013 Author Share Posted October 8, 2013 (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 October 8, 2013 by AchterlijkeVleugel Link to comment Share on other sites More sharing options...
Bert Posted October 8, 2013 Share Posted October 8, 2013 Use a while loop. look for "while" in the help file The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 8, 2013 Moderators Share Posted October 8, 2013 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: 7All clear? M23 SorryButImaNewbie 1 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Bert Posted October 8, 2013 Share Posted October 8, 2013 http://www.autoitscript.com/autoit3/docs/keywords/While.htm The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
AchterlijkeVleugel Posted October 8, 2013 Author Share Posted October 8, 2013 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 More sharing options...
somdcomputerguy Posted October 8, 2013 Share Posted October 8, 2013 Here's another link that you may find helpful - http://www.autoitscript.com/autoit3/docs/ - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 8, 2013 Moderators Share Posted October 8, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now