Jump to content
Sign in to follow this  
rmclaug4

Way of differentiating between control focus?

Recommended Posts

rmclaug4

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

Share this post


Link to post
Share on other sites
Zedna

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

Share this post


Link to post
Share on other sites
rmclaug4

:) This is exactly what I was looking for. Perfect.

Thank you!@!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.