phenomxx4 Posted June 1, 2018 Share Posted June 1, 2018 i have a problem with one of my script,i try to run an exe file and vbs file under a specific if condition i tried Run('"process.exe" "1.vbs"') but this doesn't work,any ideas? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 1, 2018 Moderators Share Posted June 1, 2018 I guess I am unsure what you are trying to do. AutoIt is not multi-threaded, so it is not going to be able to run multiple processes at the same time. Why do you need to run the executable and the vbscript at the same time, rather than one after the other? "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...
phenomxx4 Posted June 1, 2018 Author Share Posted June 1, 2018 (edited) I can run one after the other,for me it's not a problem but i dont know the correct code to do this Edited June 1, 2018 by phenomxx4 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 1, 2018 Moderators Share Posted June 1, 2018 Well, that brings up the question of what you're trying to accomplish. Where possible, you do not want to mix languages. It would be best to convert the vbscript to autoit. As far as the executable, is this a system exe or a compiled script? The more you can share about your end goal, the more assistance we can provide phenomxx4 1 "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...
phenomxx4 Posted June 1, 2018 Author Share Posted June 1, 2018 okay man,i have this piece of code If $idleTimer > 60000 And Not ProcessExists("process1.exe") Then Run("process1.exe") ElseIf $idleTimer < 60001 And ProcessExists("f.exe") Then Run("process2.exe") i want the script run process 1 and after it started he run my vbs script. (test.vbs) this is the code of test.vbs: Dim sh Set sh = WScript.CreateObject("WScript.Shell") sh.run "cmd /K statistics.exe & exit", 0 ,false Set sh = Nothing Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 1, 2018 Moderators Share Posted June 1, 2018 So instead of the vbscript, just use the run command against statistics.exe... "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...
phenomxx4 Posted June 1, 2018 Author Share Posted June 1, 2018 yes but i want to run statistics.exe in hide mode,this is the reason i use a vbscript. i can run statistics.exe in hidden mode with autoit? 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