Zack Posted October 27, 2010 Share Posted October 27, 2010 hello how do i Run my program unlimited times if it's name is Example.exe? Link to comment Share on other sites More sharing options...
HavikTech Posted October 27, 2010 Share Posted October 27, 2010 Hi Zack, Welcome to AutoIt Script Forums. Here is an example on how to do it. $name = "Example.exe" If @ScriptName = $name Then While 1 Some_Function() Sleep(100) WEnd EndIf Func Some_Function() ;function code goes here... EndFunc Link to comment Share on other sites More sharing options...
Zack Posted October 27, 2010 Author Share Posted October 27, 2010 cant get it Link to comment Share on other sites More sharing options...
HavikTech Posted October 27, 2010 Share Posted October 27, 2010 (edited) You have to use If Statement to check if the required executable matched with the script name, after that you can use a While loop to run your function inside it.Check the help file, there is detailed information about everything.Press F1 in SciTE... Edited October 27, 2010 by HavikTech Link to comment Share on other sites More sharing options...
Zack Posted October 27, 2010 Author Share Posted October 27, 2010 I asked for running another program Example.exe is some installed software in my laptop not autoit script itself Link to comment Share on other sites More sharing options...
MrMitchell Posted October 27, 2010 Share Posted October 27, 2010 I asked for running another programExample.exe is some installed software in my laptopnot autoit script itselfIt wasn't exactly very clear in your first post. Anyway, what have you got so far? Link to comment Share on other sites More sharing options...
Varian Posted October 27, 2010 Share Posted October 27, 2010 The script offered only required a small step to fit your needs, not a giant leap...$name = "C:\Example.exe" If FileExists($name) Then While 1 RunWait($name) Sleep(100) WEnd EndIfLet's think a little for ourselves 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