XTensionX Posted June 17, 2009 Share Posted June 17, 2009 i am using control send to press enter continuously on a application, and i wondering if its possible to use it on 2 application with the same title for example: pressing enter on 2 notepad opened with the same name. thanks Link to comment Share on other sites More sharing options...
Skruge Posted June 17, 2009 Share Posted June 17, 2009 Yes, you just have to use separate ControlSend calls and differentiate them by handle/instance/class/text. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
Andreik Posted June 17, 2009 Share Posted June 17, 2009 i am using control send to press enter continuously on a application, and i wondering if its possible to use it on 2 application with the same title for example: pressing enter on 2 notepad opened with the same name. thanksTry this example. There are 2 notepad windows and in everyone is send enter key. Press esc to quit. AutoItSetOption("WinTitleMatchMode",2) HotKeySet("{ESC}","Quit");PRESS ESC KEY TO QUIT Run("notepad.exe") Run("notepad.exe") While 1 $LIST = WinList("Notepad") If IsArray($LIST) Then For $INDEX = 1 To $LIST[0][0] ControlSend($LIST[$INDEX][1],"","Edit1","{ENTER}") Next EndIf Sleep(100) WEnd Func Quit() Exit EndFunc When the words fail... music speaks. Link to comment Share on other sites More sharing options...
XTensionX Posted June 18, 2009 Author Share Posted June 18, 2009 (edited) Try this example. There are 2 notepad windows and in everyone is send enter key. Press esc to quit. AutoItSetOption("WinTitleMatchMode",2) HotKeySet("{ESC}","Quit");PRESS ESC KEY TO QUIT Run("notepad.exe") Run("notepad.exe") While 1 $LIST = WinList("Notepad") If IsArray($LIST) Then For $INDEX = 1 To $LIST[0][0] ControlSend($LIST[$INDEX][1],"","Edit1","{ENTER}") Next EndIf Sleep(100) WEnd Func Quit() Exit EndFunc yup its working, is it possible to make it press enter at diferent time? like 1 press enter every 5sec and the other every 7sec i changed it slightly so it goes with what im trying to do AutoItSetOption("WinTitleMatchMode",2) HotKeySet("{ESC}","Quit");PRESS ESC KEY TO QUIT ShellExecute("C:\Users\Gamer\Desktop\Xtreme\Loade.exe") ShellExecute("C:\Users\Gamer\Desktop\Xtreme\Loade.exe") WinWaitActive ( "SS_Client" ) WinWaitActive ( "SS_Client" ) sleep ( 5000 ) While 1 $LIST = WinList("SS_Client") If IsArray($LIST) Then For $INDEX = 1 To $LIST[0][0] ControlSend($LIST[$INDEX][1],"","Edit1","{ENTER}") Next EndIf Sleep(100) WEnd Func Quit() Exit EndFunc and im not sure by putting winwaitactive twice would wait for both to load before it continues thanks Edited June 18, 2009 by XTensionX 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