Jump to content

Recommended Posts

Posted (edited)

Hello all. I have tried to remap shortcuts for some tools in Tufts VUE software. For instance, I have 'selection tool' - hotkey is 'S', and I want to remap it to 'Z', but I want to be able to enter the text (i don't want results like: Zunrize, Zorry or Zizter) inside the nodes, so I have add the rule (https://www.autoitscript.com/autoit3/docs/functions/MouseGetCursor.htm) Case MouseGetCursor = 5 (which means that cursor in text edit mode). My final code is:

HotKeySet("s", "zet")
While 1
WEnd
Func zet()
Switch @HotKeyPressed
  Case MouseGetCursor () = 2
    Send("z")
  Case MouseGetCursor () = 5
    Send("s")
EndSwitch
EndFunc

Or another approach

HotKeySet("s", "zet")
Func zet()
    If MouseGetCursor () = 2 Then
    Sleep ( 100 )
    Send("z")
    Else
    Sleep ( 100 )
    Send("s")
    EndIf
EndFunc

But none of this approaches doesn't work. Any help will be appreciated. Thanks!

Edited by fabis

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