Jump to content
Sign in to follow this  
andy09

Running Autoitscript in the "background"?

Recommended Posts

andy09

Hi,If I have a simple loop with the following code inside that is repeated. It activated a window. naviagtes throught the menus with ALT+(letter) commands using SEND, and then saving the file:

CODE
WinActivate("program", "")

sleep(500)

Send("!te")

sleep(100)

WinwaitActive("Save As")

Send ("C:\test.xls")

Send("{ENTER}")

Send("!y")

sleep(500)

etc etc

Now, is there a way of doing all this in the background, that is without seeing the windows pop up etc during the operation?

Sort of "invisible" so that I can work other thing on the computer while the script i running.

Best regards

ANders

Share this post


Link to post
Share on other sites
andy09

Thanks,

Allthough, I find it ward understanding what's the best way indentification of windows to be addressed.

WIth the autoit window finder, what's the best way of identification? (TExt, controlID ClassnameNN etc)?

Share this post


Link to post
Share on other sites
andy09

Hi again,

I get confused about what names to copy from the autoit window finder into

Text

Id

etc

in ControlSend() statement.

COuld anybody clearify what to use?

Share this post


Link to post
Share on other sites
Varian

Controlsend( "Window Title", "Window Text", "Control ID", "Command' [, ""]) The bracketed part is optional/dependent on the command used...Also, remember to set the Opt("winTitleMatchMode", mode) first to correspond to way in which you will match the window

Edited by Varian

Share this post


Link to post
Share on other sites
James

Ok if you look at the Notepad example:

ControlSend("Untitled", "", "Edit1", "This is a line of text in the notepad window")

And now look at the AutoIt Window Tool and click the Notepad text box you will see that under the control tab and the "ClassnameNN" value is "Edit1" which is what the example shows.

To use more than one property value you can use this:

ControlSend("Untitled", "", "[CLASS:Edit; INSTANCE:1]", "This is a line of text in the notepad window")

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.