paul1149 Posted February 1, 2010 Share Posted February 1, 2010 Hi, Is there some way to assign a hotkey to a control button? I'm trying to eliminate mousework. Thanks, Paul Behold, I will allure her, I will lead her into the wilderness and speak tenderly to her - Ho. 2.14 Link to comment Share on other sites More sharing options...
Yashied Posted February 1, 2010 Share Posted February 1, 2010 Look at GUISetAccelerators(). My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
paul1149 Posted February 1, 2010 Author Share Posted February 1, 2010 Look at GUISetAccelerators(). That looks perfect. Can you tell me what I'm doing wrong with this statement? Example from Help file works fine here: ; Set accelerators for Ctrl+y and Ctrl+n Dim $AccelKeys[2][2]=[["^y", $YesID], ["^n", $NoID]] GUISetAccelerators($AccelKeys) But my code: Dim $AccelKeys[3][3]=[["y", $YesID], ["n", $NoID]], ["{ESC}", $ExitID] GUISetAccelerators($AccelKeys) yields this error: AutoIt Error --------------------------- Line 72 (File "C:\util\AutoIt\MyScripts\File rename - lower case.au3"): Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID]], ["{ESC}", $ExitID] Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID]], ^ ERROR Error: No variable given for "Dim", "Local", "Global", "Struct" or "Const" statement. I'd like to get the Esc key in there as well. Obviously I'm missing the boat on arrays somehow! Thanks, p. Behold, I will allure her, I will lead her into the wilderness and speak tenderly to her - Ho. 2.14 Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2010 Developers Share Posted February 1, 2010 Something like: Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID], ["{ESC}", $ExitID]] SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
paul1149 Posted February 1, 2010 Author Share Posted February 1, 2010 Something like: Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID], ["{ESC}", $ExitID]] I think I tried that, but trying it again Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID]], ["{ESC}", $ExitID] brings me the same error. Thanks, p. Behold, I will allure her, I will lead her into the wilderness and speak tenderly to her - Ho. 2.14 Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2010 Developers Share Posted February 1, 2010 (edited) Why do you have AGAIN the double square brackets in the wrong place?Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID]], ["{ESC}", $ExitID] Edited February 1, 2010 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
paul1149 Posted February 1, 2010 Author Share Posted February 1, 2010 Why do you have AGAIN the double square brackets in the wrong place? Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID]], ["{ESC}", $ExitID] That was the problem. The solution looks like this: Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID], ["{ESC}", $ExitID]] Thanks, p. Behold, I will allure her, I will lead her into the wilderness and speak tenderly to her - Ho. 2.14 Link to comment Share on other sites More sharing options...
Developers Jos Posted February 1, 2010 Developers Share Posted February 1, 2010 That was the problem. The solution looks like this: Dim $AccelKeys[3][2]=[["y", $YesID], ["n", $NoID], ["{ESC}", $ExitID]] Thanks, p. Isn't that more or less what I posted? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
paul1149 Posted February 1, 2010 Author Share Posted February 1, 2010 Isn't that more or less what I posted? It looks exactly right. I was so focused on the array parameters that I didn't even notice the double brackets. Behold, I will allure her, I will lead her into the wilderness and speak tenderly to her - Ho. 2.14 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