cyberalau3 Posted February 8, 2016 Share Posted February 8, 2016 Is it possible to exit a AutoIt exe script then automatically restart the same script? Thanks in advance cyberalau3 Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 8, 2016 Share Posted February 8, 2016 Could ShellExecute/Run() your exe then exit, or create a .bat file that watches the current execution of your exe and waits till it's closed, then restart the exe. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 8, 2016 Moderators Share Posted February 8, 2016 @cyberalau3 if you need to perform repeatable steps, then you should be putting those steps in a function. You can then call that function as many times as needed, without all this stopping and relaunching mess. If you provide some actual info regarding what you're trying to accomplish, we can certainly assist you further. "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...
cyberalau3 Posted February 8, 2016 Author Share Posted February 8, 2016 I have a small backup utility that I wrote and have 2 monitors. My wife has only one but I wanted it to run on my 2nd monitor and on her PC with only 1 monitor. I can get all the windows and so forth to show on my 2nd monitor by using negative horizontal positions. I have a text file that I investigate when I first start the application to see if it wants to run on my second monitor or on my wife's primary monitor. But at times I want to run it on either my 1st or 2nd monitors. So I have a option to switch from 1st to 2nd and vice versa, but when I do switch, I have to exit then manually restart for the change to take effect. I thought if I could just automate the exit and restart it would be smoother. Hope this helps. I know a little about DOS batch files so I will try your approach. Thanks so much for your suggestion and I will try to do this myself. Just a old fart that still loves to do this kind of stuff. Thanks much cyberalau3 Link to comment Share on other sites More sharing options...
AutoBert Posted February 8, 2016 Share Posted February 8, 2016 When you know how to switch between monitors, make a func which switches on runtime. 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