stonheng Posted June 16, 2018 Share Posted June 16, 2018 Hello, I have limited programming experience and am looking to automate a fairly simple task as follows: 1) make an application active (I don't need it to automatically open the application) 2) Enter a key stroke (such as Control-F2) to start a process 3) Pause for a short period of time (say 3 seconds) 4) Then hit the Enter key; pause again (3 seconds) 5) Repeat step 4 several more times (but the length of pause may vary in a few spots) I would appreciate any help to do this. And if possible it would be great to get the full step by step instructions because I am starting from zero knowledge of AutoIt. Link to comment Share on other sites More sharing options...
Earthshine Posted June 16, 2018 Share Posted June 16, 2018 (edited) you should really read and understand the help file because everything you've mentioned is in there. it's supposed to be 'teach a person to fish' method here. we are here to assist you with your script which may be based on help file examples. Or you may get lucky and someone will do it for you for your requirement number one look at WinWaitActive function for starting Edited June 16, 2018 by Earthshine TheXman 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
stonheng Posted June 16, 2018 Author Share Posted June 16, 2018 I understand and appreciate your response. As an active member in other forums, I do understand the frustration of people posting questions such as mine. I would definitely be up for learning to fish if I anticipated having additional needs for this type of automation. But in my situation that is really not the case. So its a bit hard to justify learning the whole programming language just to do this one thing. So was hoping someone could walk me through how to do it if its not too much trouble. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 16, 2018 Moderators Share Posted June 16, 2018 And he did just that. Look at WinWaitActive in the help file, it has examples to show you how it works. You have to put forth at least a modicum of effort; we don't support the whole "do it for me because I don't want it now" mentality. To that point, what is the application you're trying to automate. There may well be a better way. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
stonheng Posted June 16, 2018 Author Share Posted June 16, 2018 The application is not a very well known app. It's called HCFR and is used for video calibration. Here is what I have been able to piece together so far. On the right track? WinWaitActive("HCFR.exe") Send("{F2}") Send("{Enter}") Sleep, 7000Send("{Enter}") Sleep, 7000Send("{Enter}") Sleep, 3000Send("{Enter}") Sleep, 3000 Etc Link to comment Share on other sites More sharing options...
Zedna Posted June 16, 2018 Share Posted June 16, 2018 Activate("Title of your app") WinWaitActive("Title of your app") Send("^{F2}") ; Ctrl+F2 Send("{Enter}") Sleep(7000) ; 7 seconds Send("{Enter}") Sleep(7000) Send("{Enter}") Sleep(3000) Send("{Enter}") Sleep(3000) ; ... stonheng 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
stonheng Posted June 16, 2018 Author Share Posted June 16, 2018 Thanks! It worked. The only change I had to make is to use WinActivate vs. Activate that wasn't recognized as a function. 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