Sign in to follow this  
Followers 0
paul1149

Control button hotkey

9 posts in this topic




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.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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? :D

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  
Followers 0