Hello I want to call a function that receives parameters when a hotkey is pressed. Here is a simplified version. When key is pressed, gives "Too many parameters" execution error. Please explain why the error and show the code that will work.
Code: Select all
#singleInstance force
#requires AutoHotkey v2.0-b
; tests function object binding with hotkeys.
; doObject := do.bind("z")
doObject := func("do").bind("z")
hotkey "^+a", doObject
return
do(a) {
msgBox a
return
}