Jump to content

Way of differentiating between control focus?


Recommended Posts

What I am looking to do is have hot keys assigned to windows explorer that only activate when text(edit control) is not in focus. I noticed that there are different control class names that show with the windows info tool. Whenever text is selected the control name is edit. Whenever anything else is in focus in an explorer window then it is usually a different control like syslistview32. Is there a method I can use to call the class name of the control in focus so that I can program the hotkeys to differentiate between the controls?

Thanks, Ron

Link to comment
Share on other sites

HotKeySet("{F9}", "_exit")

SplashTextOn("Control Focus Info",'',150,50,850,650)

While 1
    $a = ControlGetFocus("","")
    ControlSetText("Control Focus Info", "", "Static1", $a)
;~  TraySetToolTip($a)
    Sleep(250)
WEnd

Func _exit()
    SplashOff()
    HotKeySet("{F9}")
    Exit
EndFunc

Link to comment
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
 Share

  • Recently Browsing   0 members

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