Jump to content
Sign in to follow this  
phenomxx4

Run a vbs file and an exe file at the same time

Recommended Posts

phenomxx4

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?

Share this post


Link to post
Share on other sites
JLogan3o13

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?


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
phenomxx4
Posted (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 by phenomxx4

Share this post


Link to post
Share on other sites
JLogan3o13

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

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
phenomxx4

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

Share this post


Link to post
Share on other sites
phenomxx4

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?

Share this post


Link to post
Share on other sites
JamesSmith001
Posted (edited)

I can run both at a time, for me it's not a problem but I don't know the correct code. I  want the script run process 1 and after it started he run my vbs script. 

visit https://printerchatsupport.co.uk/epson-printer-support/   to know the code of the process.

Edited by JamesSmith001

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×