Sign in to follow this  
Followers 0
senatorwolf

ControlSend not working in background

4 posts in this topic

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 ><).

Share this post


Link to post
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

Share this post


Link to post
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 =)

Share this post


Link to post
Share on other sites

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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
Sign in to follow this  
Followers 0