DWoods Posted October 27, 2020 Share Posted October 27, 2020 I am wanting to create a script that once running it will continue to run until forcibly stopped or the server is restarted. where it will look for particular dialog boxes that contain specific text and select the option of Yes each time. I am new to using AutoIT and been trying to get my head round how everything works so if a script is available already that would be perfect. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 27, 2020 Developers Share Posted October 27, 2020 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team 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...
Nine Posted October 27, 2020 Share Posted October 27, 2020 There is certainly an already written script that is performing what you want, but you will need to search for it. But since it is quite an easy script to write, I would suggest you take a look at WinExists using special definition [CLASS:#32770]. If you find one then ControlSend a "^y" to it. Loop forever with a small Sleep(100) to give some air to the CPU. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
DWoods Posted October 30, 2020 Author Share Posted October 30, 2020 I have searched for scripts that have already been made and have found very little, from what I have found I have put together something but it is not working at all. here is the script I have so far. $Title = "Lexis Visualfiles (Press HELP to view stack trace)" If WinExists("[TITLE:$Title; CLASS:#32770;]") Then ControlClick("[CLASS:Button; INSTANCE:1; "^y"]") EndIf While 1 Sleep(100) Wend Any help at all would be perfect, and I will apologies in advance if I do not understand aspects that provided in comments, I am a novice to autoit so trying to learn bits as I go along and from what I read. Link to comment Share on other sites More sharing options...
Nine Posted October 30, 2020 Share Posted October 30, 2020 (edited) I'll give you a hand on this, try : Opt ("MustDeclareVars", 1) HotKeySet ("{ESC}", _Exit) Const $sTitle = "Lexis Visualfiles (Press HELP to view stack trace)" While True If WinExists("[TITLE:$sTitle; CLASS:#32770]") Then ControlSend("[TITLE:$sTitle; CLASS:#32770]", "", "", "!y") EndIf Sleep(100) Wend Func _Exit () Exit EndFunc Made I dyslexic typo, it should be "!y" (alt-y) instead of "^y" (ctrl-y). Read carefully help file about those functions that I used. If you still have problem, try practicing with an app that I can run (e.g. Notepad or Paint). And please use this tool, when you post code. Edited October 30, 2020 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
DWoods Posted October 30, 2020 Author Share Posted October 30, 2020 1 hour ago, Nine said: I'll give you a hand on this, try : Made I dyslexic typo, it should be "!y" (alt-y) instead of "^y" (ctrl-y). Read carefully help file about those functions that I used. If you still have problem, try practicing with an app that I can run (e.g. Notepad or Paint). And please use this tool, when you post code. Thanks for this, I will give it a try and update you. 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