DarkBoost Posted June 10, 2009 Share Posted June 10, 2009 I have a GUI with a Save Button and have set a Hotkey so when the user will press CTRL + S it will run the Function associated with this. I added &Save so that there is an underscore below the S and in test mode this will be displayed but then fails to display when running the compiled EXE. Any ideas what is happening ? Example: HotkeySet("(^s)", "_save"); user press CTRL + S to execute _save function GUICtrlCreateButton("&Save", 20, 20, 50, 20); display button with underscore below letter "S" Link to comment Share on other sites More sharing options...
ResNullius Posted June 10, 2009 Share Posted June 10, 2009 Any ideas what is happening ?Well, since you haven't provided enough of your script to reproduce the problem, and since the following code works, I dunno, it must be something else? HotKeySet("^s", "_save"); user press CTRL + S to execute _save function GUICreate("test") GUICtrlCreateButton("&Save", 20, 20, 50, 20); display button with underscore below letter "S" GuiSetState() Do Sleep(10) Until GuiGetmsg() = -3 Func _save() MsgBox(0, "", "Save") EndFunc PS: Your HotKeySet() statement is malformed: you don't need the brackets inside the quotes. "^s" not "(^s)" Link to comment Share on other sites More sharing options...
DarkBoost Posted June 10, 2009 Author Share Posted June 10, 2009 Through various tests have discovered that the underscore is designed with the Menu Items in mind rather than the Buttons as the underscore only appears to be displayed for me in the Complied EXE when the user clicks ALT which generally is how users will access the Menu Items. So a work around is I send({ALT}) after the buttons have been created and problem solved. 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