Jump to content

Running Autoitscript in the "background"?


andy09
 Share

Recommended Posts

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

Link to comment
Share on other sites

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)?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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")
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...