Jump to content

ControlSend not working in background


 Share

Recommended Posts

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

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...