How to install AutoHotkey_H v2-alpha ? Topic is solved

Ask for help, how to use AHK_H, etc.
Tobor D
Posts: 10
Joined: 07 Apr 2017, 20:35

How to install AutoHotkey_H v2-alpha ?

27 Jul 2018, 03:13

Hello.
Can you explain me how to install AutoHotkey_H v2-alpha?
What i did: deleted old Ahk.
Extract AutoHotkey v2 then extract AutoHotkey_H v2-alpha.

Trying to use example command

Code: Select all

NewThread "MsgBox Message from thread."
And it goes nothing. Just quick error message but instantly disappeared.

I`d add #Persistent in the begining then it shows me error:
"Ambiguous or invalid use of ".
Specifically: .) ..."

I`d check ahk version:
"A_Ahkversion : 2.0-alpha"

Also compile does`nt work although i replace it from ahkdll-v2-release-master\Compiler folder

it work but when i compiling script it gives wrong result.
It must shows ahk version, but it shows just string "A_Ahkversion".
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: How to install AutoHotkey_H v2-alpha ?

27 Jul 2018, 13:46

the example is not tailored to v2 syntax. when you do:

Code: Select all

NewThread "MsgBox Message from thread."
the new script is spawned with the following contents:

Code: Select all

MsgBox Message from thread.
As u can tell, in this context, Message from and thread. are all uninitialized variables and the . is an accessor, lacking its expected property or method, hence the ambiguous use.
what u need to do(at least one way of doing it) is add some quotes and escape them, to make the spawned script v2 syntax compliant:

Code: Select all

NewThread "MsgBox `"Message from thread.`""
that said, command syntax is for the most part discouraged and you'd also need to shove #Persistent somewhere in either your master or slave script to prevent the msgbox from disappearing rightaway
Tobor D
Posts: 10
Joined: 07 Apr 2017, 20:35

Re: How to install AutoHotkey_H v2-alpha ?

27 Jul 2018, 21:56

swagfag, Thank you very much.
In this case which docs i must follow? I used https://hotkeyit.github.io/v2/docs/AutoHotkey.htm
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: How to install AutoHotkey_H v2-alpha ?

28 Jul 2018, 08:20

for general syntax and ahk usage related queries refer to the ahk_l v2 docs. I use the _H docs solely as a reference for _H functions.
That said if youre gonna be using newly implemented features, its worth checking what degree of parity is kept between releases: https://github.com/HotKeyIt/ahkdll-v2-r ... its/master
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: How to install AutoHotkey_H v2-alpha ?

28 Jul 2018, 09:23

Correct, ahk_h v2 docs are not up to date, use them for ahk_h functions only for the moment as swagfag suggested.
Tobor D
Posts: 10
Joined: 07 Apr 2017, 20:35

Re: How to install AutoHotkey_H v2-alpha ?

28 Jul 2018, 12:44

HotKeyIt, but what about compile?
Also compile does`nt work although i replace it from ahkdll-v2-release-master\Compiler folder

it works but when i compiling script it gives wrong result.
It must shows ahk version, but it shows just string "A_Ahkversion".
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: How to install AutoHotkey_H v2-alpha ?  Topic is solved

28 Jul 2018, 15:33

Compiling works fine, did you copy v2 AutoHotkey_H.exe to compile folder and renamed it to Ahk2Exe.exe?
Probably this will help: https://autohotkey.com/boards/viewtopic.php?t=50347

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 23 guests