bggashnik Posted November 19, 2007 Share Posted November 19, 2007 I realise that HotKeySet function is valid for all other windows while the script is running.When I run the program and just enter an url in the address bar of my browser the HotKeySet function for ENTER button activates in the script.How can i avoid this? Link to comment Share on other sites More sharing options...
Gestalt Posted November 19, 2007 Share Posted November 19, 2007 I realise that HotKeySet function is valid for all other windows while the script is running.When I run the program and just enter an url in the address bar of my browser the HotKeySet function for ENTER button activates in the script.How can i avoid this?Change your script to use Alt+Enter instead. Or Ctrl+Enter or Shift+Enter, etc. Link to comment Share on other sites More sharing options...
Nahuel Posted November 19, 2007 Share Posted November 19, 2007 I find that pretty annoying too, but it's very useful most of the times. I don't know if there's an easier/more efficient way of doing it, but this is what I thought:#include <GUIConstants.au3> $Form1 = GUICreate("My Gui", 349, 174, 208, 128) GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit If WinActive($Form1) Then HotKeySet("a","hello") Else HotKeySet("a") EndIf WEnd Func hello() MsgBox(0,"","hello") EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now