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: dscotese@… 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)

HotKeySetDefaultArgError.png (19.8 KB ) - added by dscotese 6 months ago.
screenshot of error in SciTE.

Download all attachments as: .zip

Change History (2)

by dscotese, 6 months ago

screenshot of error in SciTE.

comment:1 by J-Paul Mesnage, 6 months ago

Resolution: No Bug
Status: newclosed

Just read the help

The called function can not be given parameters. They will be ignored.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.