Anyone had success with compiling scripts in v2?

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Ursi
Posts: 18
Joined: 16 Oct 2018, 14:11
Contact:

Anyone had success with compiling scripts in v2?

21 Oct 2018, 01:41

The website says you can use Ahk2Exe.exe to compile AHK2 scripts, but when I try, I get errors for using v2 syntax. I'm using v2 base files so I'm not sure what's going on.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 05:51

tested with Unicode 64-bit.bin from v2 a100 and Ahk2Exe.exe from v1 1.1.30, compiled without any errors. what errors are u getting?
Ursi
Posts: 18
Joined: 16 Oct 2018, 14:11
Contact:

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 11:43

Turns out Ahk2Exe doesn't support v2 block comments.
User avatar
JoeWinograd
Posts: 2200
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 11:45

Hi Ursi,
Yes, you can use Ahk2Exe.exe, but it must have the V2 .bin file, either Unicode 32-bit.bin or Unicode 64-bit.bin, and if you want 64-bit, you must copy Unicode 64-bit.bin to AutoHotkeySC.bin, otherwise it will copy Unicode 32-bit.bin to it. Regards, Joe
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 12:01

what does the comment look like
User avatar
JoeWinograd
Posts: 2200
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 12:14

Ursi wrote:
21 Oct 2018, 11:43
Turns out Ahk2Exe doesn't support v2 block comments.
Block comments work fine in V2, when running from both source code and compiled code, but only if the /* and */ symbols appear at the beginning of a line (same as in V1). Regards, Joe
Ursi
Posts: 18
Joined: 16 Oct 2018, 14:11
Contact:

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 20:17

JoeWinograd wrote:
21 Oct 2018, 12:14
Ursi wrote:
21 Oct 2018, 11:43
Turns out Ahk2Exe doesn't support v2 block comments.
Block comments work fine in V2, when running from both source code and compiled code, but only if the /* and */ symbols appear at the beginning of a line (same as in V1). Regards, Joe
That's why I meant when I said they don't support v2 block comments. v2 allows you to put the */ at the end of a line.
User avatar
JoeWinograd
Posts: 2200
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 20:45

OK, there's a difference between V1 and V2 in the ending symbols (*/). Here's what the Version 2.0-a100-52515e2 doc says:
In addition, the /* and */ symbols can be used to comment out an entire section, but only if the symbols appear at the beginning of a line (or for */, the beginning or end)
Here's what the Version 1.1.30.00 doc says:
In addition, the /* and */ symbols can be used to comment out an entire section, but only if the symbols appear at the beginning of a line
But are you saying that the beginning (/*) and ending (*/) block comment symbols work in source code and do not work when compiled with Ahk2Exe.exe using a V2 .bin file?
Ursi
Posts: 18
Joined: 16 Oct 2018, 14:11
Contact:

Re: Anyone had success with compiling scripts in v2?

21 Oct 2018, 22:49

JoeWinograd wrote:
21 Oct 2018, 20:45
But are you saying that the beginning (/*) and ending (*/) block comment symbols work in source code and do not work when compiled with Ahk2Exe.exe using a V2 .bin file?
Thas is precisely what I'm saying. Looking at the source code, I'm pretty sure I've made a version that works with v2 block comments (it was just some minor adjustments to ScriptParser.ahk. I'll edit this later when I make the fork (github is being weird right now) and include it.
coffee
Posts: 133
Joined: 01 Apr 2017, 07:55

Re: Anyone had success with compiling scripts in v2?

22 Oct 2018, 01:15

Use flipeador's ahk2exe remake and see if it works for you (if you can make out the spanish). He's a mod here on the forum. He has fincs' directives and a bunch of other stuff. Fincs' is basically vaporware at this point.
https://github.com/flipeador/Ahk2Exe
User avatar
JoeWinograd
Posts: 2200
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Anyone had success with compiling scripts in v2?

22 Oct 2018, 03:58

Ursi wrote:Thas is precisely what I'm saying. Looking at the source code, I'm pretty sure I've made a version that works with v2 block comments (it was just some minor adjustments to ScriptParser.ahk. I'll edit this later when I make the fork (github is being weird right now) and include it.
Got it...thanks for the update.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Jeffmuvans, Umbracinis and 37 guests