Jump to content

Recommended Posts

Posted (edited)

how do i make a hotkey only work inside my app?

so far i have been using this:

HotKeySet("^a", "HotKey_MakeLocal"); Ctrl+a

Func HotKey_MakeLocal()
    If WinActive("GUI_title") Then
;Rest of the code
    EndIf
EndFunc

but then Ctrl+a wont work in other apps. how do i make it work in my app to do what i want as well as in other apps to do what they were set to do?

Edited by fabianenos
Posted

the GUISetAccelerators is not working. the compiler says that it is an invalid command. any clue to why this is happening. i am using version 3.2.10.0

while looking in the manual i found a way of unsetting hotkeys for a while and i tried this and it worked.

HotKeySet("^a", "HotKey_MakeLocal")

Func HotKey_MakeLocal()
    If WinActive("GUI_title") Then
    ; rest of the code
    Else
        HotKeySet("^a")
        Send("^a")
        HotKeySet("^a", "HotKey_MakeLocal")
    EndIf
EndFunc
  • 1 month later...
Posted

@fabianenos

i know this post is a month old...

You will need 3.2.11.3 (beta and higher) to use that function

another way is for example (70 = F1)

If _IsPressed("70") And WinActive("Program Title") Then Function()

But it could be detected as a keylogger

Best regards,Emiel Wieldraaijer

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
×
×
  • Create New...