OnMessage() MaxThreads parameter limited by "#MaxThreads"?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User
Posts: 407
Joined: 26 Jun 2017, 08:12

OnMessage() MaxThreads parameter limited by "#MaxThreads"?

28 Dec 2018, 22:33

Hi,

I noticed that OnMessage() MaxThreads parameter is limited by "#MaxThreads"?

Is that supposed to be like that? Is there any workaround to make OnMessage() MaxThreads parameter self-dependent and not limited by "#MaxThreads"?

Code: Select all

	;onMessage() does not work if function requires more than 4 parameters


#MaxThreads, 5		;10 is default / max allowed 255

OnMessage(0x201, "Test", 1000)		;1000 is limited by "#MaxThreads" above / 0x201, left mouse down

Gui, Add, Text,, Left Click anywhere in this window.

Gui, Show, w300 h200

return

GuiClose:	;______ gui close _____
ExitApp


Test(a, b, c, d)	;________ Test(Function) ___________
{
static count := 0, l := 0

tooltip, % "count - " ++count " - " l

sleep, 5000

    ;msgbox %  a " - " b " - " c " - " d " - " e

tooltip, % "count - " count " - " ++l
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mstrauss2021, peter_ahk, Spawnova, william_ahk, zephyrus2706 and 355 guests