how to I can add array parameter ? Topic is solved

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
gameba
Posts: 18
Joined: 20 Mar 2018, 12:24

how to I can add array parameter ?

21 Jun 2018, 05:31

Hi, guys
Pls, help how to I can add array parameter ? I try below code but it isn't work
p/s I use AHK_H v1 64bit

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



if the array are not allow,so How do I assign array from main code into a thread?

Thanks!
HotKeyIt
Posts: 1648
Joined: 29 Sep 2013, 18:35
Contact:

Re: how to I can add array parameter ?  Topic is solved

21 Jun 2018, 14:30

You can pass the parameters as usual ..., 1 2 3 4, just make sure it is a string!
You can also pass an object reference and use the object itself:

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


If multiple threads need to access the object use CriticalObject instead!
gameba
Posts: 18
Joined: 20 Mar 2018, 12:24

Re: how to I can add array parameter ?

21 Jun 2018, 19:45

@HotKeyIt awesome. Thank you very much! :D
HotKeyIt
Posts: 1648
Joined: 29 Sep 2013, 18:35
Contact:

Re: how to I can add array parameter ?

22 Jun 2018, 07:36

Forgot to mention, you can also use named parameters in v2:

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

thread:=AhkThread("
(
msgbox A_Args.name "
``n" A_Args.version
Return

)"
, "name ahk version 1")

ESC::
ExitApp

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 1 guest