Sign in to follow this  
Followers 0
Albert789

lauching command in backgroud

2 posts in this topic

Hello all,

Sorry to ask the question.

I looked at the search option and documentation but I am still failing.

What I am successfully doing:

Run("mydosapplication.exe") (the dos application do not accept any input - we have to be inside the dosapplication in order to begin to receive options)

Send("action 1") (internal command to the dos application)

Send("{enter}") (in order to send the action to the dos application)

Send("action 2") (internal command to the dos application)

Send("{enter}") (in order to send the action to the dos application)

Send("{exit}") (in order to leave the dos application)

I cannot do this thing in a bat or whatever, as when launching my application I am on the application an I can give any input parameter. I have to send them after being in the dos application (so no bat)

Then compile, and launch the .exe with scheduled task manager.

So it is working.

But I want to do the same thing in the background.

I do not want to see my dos application. I do not want to see the action I am sending to the dos application.

I want everything to be performed on the background, without being logged in the server.

So , I tried

Run("mydosapplication.exe", "", @SW_HIDE)

ControlSend ("mydosapplication.exe", "", "action 1")

ControlSend("mydosapplication.exe", "", "{ENTER}")

ControlSend ("mydosapplication.exe", "", "action 2")

ControlSend("mydosapplication.exe", "", "{ENTER}")

ControlSend("mydosapplication.exe", "", "{exit}")

But it is not working.

Can you please help me on this point ?

Thank you.

Share this post


Link to post
Share on other sites



I have found that @SW_HIDE can break the functionality of an application. I would suggest running it without the @SW_HIDE and use WinMove to move the window out of sight.


#include <ByteMe.au3>

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  
Followers 0