Sign in to follow this  
Followers 0
Wacken

Send to any window ?

3 posts in this topic

#1 ·  Posted (edited)

I have a little script that Sends key commands.

I do not use anything in the script that uses winhandles. No winactivate or anything remotely like it. I actually tried using that in the first place and thought it was the cause of the problem so i removed it. 

The problem is; when there are multiple clients active, it only works on the most recent opened client. 

I cannot understand this since i am not even telling what client the the commands should be send to. I just want them to be send to the active window, allowing me to activate a different window when i want while the script is running.

It does work on unrelated different windows or even the desktop. As soon as i close the clients and go to desktop, it keeps activating windows help. It just wont let me choose multiple clients of 1 window.

Why ?

HotKeySet("{HOME}", "Terminate")

HotKeySet("{F12}", "Start")
 
While 1
   $x = 1
WEnd
 
Func Start()
    While $go = 1
        Send("{F1}")
        Sleep(100)
    Wend
Endfunc
 
Func Terminate()
    $go = 0
EndFunc 
Edited by Wacken

Share this post


Link to post
Share on other sites



to expand on JohnOne's answer:

if other applications have those hotkeys assigned autoit can't make use of them, so those functions won't ever be activated.

your best bet is to try to use modifier keys (such as !^+, etc... check the Send() help)

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