Jump to content

Control button hotkey


paul1149
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...