Modify ↓
Opened 6 months ago
Closed 6 months ago
#4050 closed Bug (No Bug)
In Version 3.3.16.1, Calling a function with default parameters from HotKeySet fails.
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.16.1 | Severity: | None |
| Keywords: | declaration default argument HotKeySet | Cc: |
Description
Try this code:
HotKeySet("+!i", "AAAB")
Func AAAB($bxShow = True)
ConsoleWrite("Version " & @AutoItVersion & @CRLF)
If $bxShow Then
ConsoleWrite("Shift-Alt-i pressed. Use Ctrl-Alt-Del to use keyboard.")
EndIf
Keyboard(False, "AAAB")
EndFunc
While True
Sleep(5000)
AAAB()
WEnd
Func Keyboard($b, $s)
EndFunc
You can see the call to AAAB succeed from the While loop, but if you use ALT-Shift-i, you get an error.
Attachments (1)
Change History (2)
by , 6 months ago
| Attachment: | HotKeySetDefaultArgError.png added |
|---|
comment:1 by , 6 months ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Just read the help
The called function can not be given parameters. They will be ignored.
Note:
See TracTickets
for help on using tickets.

screenshot of error in SciTE.