Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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?

Posted (edited)

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
Posted

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

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
×
×
  • Create New...