Jump to content

Recommended Posts

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
Posted

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)

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
  • Recently Browsing   0 members

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