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
}