goldenedge Posted March 29, 2013 Posted March 29, 2013 Im trying to make a bot to click an image at a certain spot currently right now it will find the image and click on it but not in a certain location. Here is the code im using While 1 Global $iX, $iY $search = _WaitForImageSearch("C:\Users\joey\Desktop\autoit stuff\test\12.png", 60, 1, $iX, $iY, 0) If $search = 1 Then Sleep(1000) MouseClick("left", $iX, $iY, 1, 1) Sleep(500) ExitLoop EndIf WEnd the image (12.png) is 335 x 83 px and i need it to click at 302 x 69 Any suggestions?
water Posted March 29, 2013 Posted March 29, 2013 Which program do you try to automate? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
goldenedge Posted March 29, 2013 Author Posted March 29, 2013 (edited) autoit v3 the file extension is .au3 or are you talking about what im using it for? Edited March 29, 2013 by goldenedge
water Posted March 29, 2013 Posted March 29, 2013 What I mean is: Why do you want to search for an image and then click on it in a specific location? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Bert Posted March 29, 2013 Posted March 29, 2013 Im trying to make a bot to click an image at a certain spot currently right now it will find the image and click on it but not in a certain location. Here is the code im using While 1 Global $iX, $iY $search = _WaitForImageSearch("C:\Users\joey\Desktop\autoit stuff\test\12.png", 60, 1, $iX, $iY, 0) If $search = 1 Then Sleep(1000) MouseClick("left", $iX, $iY, 1, 1) Sleep(500) ExitLoop EndIf WEnd the image (12.png) is 335 x 83 px and i need it to click at 302 x 69 Any suggestions? Yes - seeing how you used the word "Bot" and you want to click an image this strongly leads me to believe you are trying to automate a game which is against forum rules. Now, if you are not doing this, then I would suggest you be MUCH more forth coming on what is the NAME OF THE PROGRAM you wish for AutoIt to run for you. Right now you are on unstable ground. The Vollatran project My blog: http://www.vollysinterestingshit.com/
water Posted March 29, 2013 Posted March 29, 2013 YogiBear, please be patient I wanted the user to tell us what kind of bot he tries to write. Now he is warned My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Bert Posted March 29, 2013 Posted March 29, 2013 I'm being very patient. If the chap doesn't respond to what we ask for then I will know I'm correct. I would rather be wrong though. The Vollatran project My blog: http://www.vollysinterestingshit.com/
goldenedge Posted March 29, 2013 Author Posted March 29, 2013 Im trying to have a script that will take pictures such as a screen shot of my desktop and click on it then open up the things inside i don't have a definite use for it yet since i haven't been able to figure this part out but i may use it to click on certain fields on a website or have it check things for me on my own personal website but i would need it to be able to click images in a certain area
Bert Posted March 29, 2013 Posted March 29, 2013 The Vollatran project My blog: http://www.vollysinterestingshit.com/
water Posted March 29, 2013 Posted March 29, 2013 Me too My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
goldenedge Posted March 29, 2013 Author Posted March 29, 2013 Okay well how about this aside from the monitoring of my website i would also like to create a script to regulate my grades for school but the website my school uses is all based on images all but the grades so it would need to be able to click on specific parts in order to view my grades then later i can have it take a screenshot and send it to me as for my website in the home page there is a banner which has 2 parts to it the website itself and then the forum but its all in one picture and then the script can check for other various things
jdelaney Posted March 29, 2013 Posted March 29, 2013 (edited) run-on sentences make concepts hard to grasp.Everything but the grades are images?Use the _IE* functions, and a tool that can read into the DOM object (IE developer tools) to find what to search for.Screenshots would help back-up your claim Edited March 29, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Bert Posted March 31, 2013 Posted March 31, 2013 run-on sentences make concepts hard to grasp.Everything but the grades are images?Use the _IE* functions, and a tool that can read into the DOM object (IE developer tools) to find what to search for.Screenshots would help back-up your claimagreed The Vollatran project My blog: http://www.vollysinterestingshit.com/
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