Dtvscrotes Posted November 2, 2007 Share Posted November 2, 2007 (edited) I'm trying to set it up so i can type in two separate programs at the same time. hotkeyset("r","pressr") func pressr() send ("r"); active untitled notepad controlsend("Different-notepad","","edit1","r") endfunc thats what i got but it doesnt work for me plz help Edited November 2, 2007 by Dtvscrotes Link to comment Share on other sites More sharing options...
Regency Posted November 2, 2007 Share Posted November 2, 2007 I'm trying to set it up so i can type in two separate programs at the same time. hotkeyset("r","pressr") func pressr() send ("r"); active untitled notepad controlsend("Different-notepad","","edit1","r") endfunc thats what i got but it doesnt work for me plz help Look up the ID's and Class with Autoit Tool and Use the Command Send Option Link to comment Share on other sites More sharing options...
weaponx Posted November 2, 2007 Share Posted November 2, 2007 2 instances of Notepad will both contain Edit Instance 1. Link to comment Share on other sites More sharing options...
weaponx Posted November 2, 2007 Share Posted November 2, 2007 This will send the string to ALL notepad windows. $list = WinList ("[CLASS:Notepad]") For $X = 1 to $list[0][0] ControlSend ( $list[$X][1], "","[CLASSNN:Edit1]", "TEST") Next Link to comment Share on other sites More sharing options...
Dtvscrotes Posted November 2, 2007 Author Share Posted November 2, 2007 (edited) This is a bit closea but still not sure hotkeyset("r","pressr") While 1 Sleep(10) WEnd func pressr() send ("a"); active untitled notepad sleep(50) ;<-------------------------------------------------this helps alot(add sleep, send/sleep/controlsend) AutoItSetOption("WinTitleMatchMode", 4) $handle = WinGetHandle("classname=Notepad", "") ControlSend($handle, "", "Edit1", "logger") Endfunc Edited November 2, 2007 by Dtvscrotes 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