andy09 Posted February 4, 2009 Share Posted February 4, 2009 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: CODEWinActivate("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 More sharing options...
James Posted February 4, 2009 Share Posted February 4, 2009 ControlSend(). Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
andy09 Posted February 4, 2009 Author Share Posted February 4, 2009 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 More sharing options...
James Posted February 4, 2009 Share Posted February 4, 2009 You can use more than one (I think) so that you are absolutley sure. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
andy09 Posted February 4, 2009 Author Share Posted February 4, 2009 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? Link to comment Share on other sites More sharing options...
Varian Posted February 4, 2009 Share Posted February 4, 2009 (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 February 4, 2009 by Varian Link to comment Share on other sites More sharing options...
James Posted February 4, 2009 Share Posted February 4, 2009 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") Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now