th3ownerer Posted December 1, 2009 Share Posted December 1, 2009 HI. I am new to Autoit and just want to make a simple script which switches to a program and then clicks a button every 15 minutes Please can anyone help me Link to comment Share on other sites More sharing options...
water Posted December 1, 2009 Share Posted December 1, 2009 (edited) Please have a look at Winactivate, WinWaitActive, Sleep and ControlClick. To get the ControlId of the button please use the AutoIT tool WindowInfo. Something like: HotKeySet("+!q", "Quit") ; HotKey to end the script Ctrl+Alt+Q WinActivate("Here goes the Window title") WinWaitActive() While 1 Sleep(900000) ControlClick("Here goes the Window title","",ControlId) Wend Func Quit() Exit 0 EndFunc Edited December 1, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
th3ownerer Posted December 1, 2009 Author Share Posted December 1, 2009 (edited) does wait win active force the computer to go to that window?? also i need to click a button in the browser not a windows button so I'll need like a OCR or something and then make it read the button Edited December 1, 2009 by th3ownerer Link to comment Share on other sites More sharing options...
th3ownerer Posted December 1, 2009 Author Share Posted December 1, 2009 and thanks for the help till now Link to comment Share on other sites More sharing options...
th3ownerer Posted December 1, 2009 Author Share Posted December 1, 2009 (edited) or i could wait for the windows to become active after about 15 mins and then press enter how could i do this??? Edited December 1, 2009 by th3ownerer Link to comment Share on other sites More sharing options...
water Posted December 1, 2009 Share Posted December 1, 2009 does wait win active force the computer to go to that window??WinActivate activates the WindowWinWaitActive just makes sure the Window is active before doing any actions with the window.also i need to click a button in the browser not a windows buttonThere is an UDF available to handle all kind of IE things (please see the help file: User Defined Functions -> IE Management).What function to use depends on the type of link/button/image you want to click. Please see _IELinkClickByIndex or _IELinkClickByText My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
th3ownerer Posted December 1, 2009 Author Share Posted December 1, 2009 i use firefox Link to comment Share on other sites More sharing options...
water Posted December 1, 2009 Share Posted December 1, 2009 Even worse There is an UDF for FF as well.As I 've never worked with AutoIT and FF my expertise (if any) ends here. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
th3ownerer Posted December 1, 2009 Author Share Posted December 1, 2009 ummm how to loop this Link to comment Share on other sites More sharing options...
jvanegmond Posted December 1, 2009 Share Posted December 1, 2009 ummm how to loop thisSee the first reply by water. Note the while loop and the long sleep. github.com/jvanegmond 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