Jump to content
Sign in to follow this  
paul1149

Control button hotkey

Recommended Posts

Yashied
paul1149

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
Jos

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     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
paul1149

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
Jos

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     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  

×