senatorwolf Posted September 20, 2010 Share Posted September 20, 2010 while 1==1 ControlSend("Untitled - Notepad", "", "", "l") sleep(100) WEnd I am trying to get ControlSend to send Notepad keystrokes while it is either minimized or not that active window, currently neither will work, however if it is the active window then it will start to receive the keys. Soon as I click on another window it stops receiving keystrokes, and when I make it active again it starts receiving again. I tried this with other applications and ended up with the same results. I am Admin on this cpu running Windows 7 64-bit. I noticed to for whatever reason, when the script is running sometimes it will randomly start turning my caps key on or off(very annoying ><). Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 20, 2010 Share Posted September 20, 2010 Be more specific about the window and especially the control you are sending to: HotKeySet("{ESC}", "_Quit") while 1 ControlSend("[CLASS:Notepad; Title:Untitled - Notepad]", "", "[CLASS:Edit; INSTANCE:1]", "l") sleep(1000) WEnd Func _Quit() Exit EndFunc Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
senatorwolf Posted September 20, 2010 Author Share Posted September 20, 2010 Be more specific about the window and especially the control you are sending to: HotKeySet("{ESC}", "_Quit") while 1 ControlSend("[CLASS:Notepad; Title:Untitled - Notepad]", "", "[CLASS:Edit; INSTANCE:1]", "l") sleep(1000) WEnd Func _Quit() Exit EndFunc When i use your controlsend it works, thanks =) Link to comment Share on other sites More sharing options...
seandisanti Posted September 20, 2010 Share Posted September 20, 2010 When i use your controlsend it works, thanks =)for notepad i typically use ControlSetText rather than even ControlSend, because it's instant, and you don't have to worry about the cursor getting moved and screwing up your send 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