DynaCall - change order of parameters

Ask for help, how to use AHK_H, etc.
User avatar
trismarck
Posts: 506
Joined: 30 Sep 2013, 01:48
Location: Poland

DynaCall - change order of parameters

29 Nov 2013, 15:06

AutohotkeyH Documentation wrote:You can change order of parameters using an object declaration. So in following example when calling the function first parameter is wParam and second Msg.

DynaCall("SendMessage",["t=tuitt",3,2],hwnd,WM_ACTIVATE:=0x06)


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Also, what happens if I change the order of _some_ (but not all) parameters, i.e.: in the above example, if I'd use [3,2], what happens when I pass fifth and sixth parameter to DynaCall()? (are parameters, whose order was not changed, ignored, or, is there a default behavior defined for the order of _order-unspecified_ parameters? i.e. [3,2] -> [3,2,1,4].
User avatar
trismarck
Posts: 506
Joined: 30 Sep 2013, 01:48
Location: Poland

Re: DynaCall - change order of parameters

29 Nov 2013, 15:40

Right, so I've misunderstood the documentation. When I change the order of parameters, the order changes not for DynaCall(), but for the dynaToken object:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Further tests reveal that if I don't specify indices of _all_ parameters in the parameter order array, unspecified indices are appended to the array from the smallest index to the largest index (intuitive):
  • ["ui=tssui", 3, 2] really means:
  • ["ui=tssui", 3, 2, 1, 4]

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 3 guests