Search found 1098 matches

by TAC109
22 Mar 2024, 18:07
Forum: Ask for Help (v2)
Topic: Migrating custom compiler to v2 Topic is solved
Replies: 9
Views: 162

Re: Migrating custom compiler to v2 Topic is solved

To compile a script as v2 you can specify a v2 base file in your Run statement, e.g. '/Base C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe'. Alternative methods of specifying a base file to be used for compilation are: Run the Ahk2Exe GUI and select a v2 default base file and press 'save as default...
by TAC109
19 Mar 2024, 15:44
Forum: Ask for Help (v1)
Topic: Hide everything "autohotkey" from a script
Replies: 3
Views: 129

Re: Hide everything "autohotkey" from a script

You can try my ScriptGuard, link is in my signature.

You can change the compiled program's icons by using the compiler directives AddResource and SetMainIcon.

Edit: Also compressing the compiled script with UPX or Mpress will further obscure the code.

Cheers
by TAC109
15 Mar 2024, 20:13
Forum: Scripts and Functions (v1)
Topic: Upcoming Ahk2Exe Changes (2024)
Replies: 626
Views: 181111

Re: Upcoming Ahk2Exe Changes (2024)

Update 1.1.37.01c1, 16 March 2024
  • Send parameter errors to stdout/stderr if in /Silent mode.
  • Prevent compression when compiling Ahk2Exe.
See this post for download details.
by TAC109
27 Feb 2024, 00:05
Forum: Ask for Help (v1)
Topic: works fine as .ahk but bugs when an exe Topic is solved
Replies: 9
Views: 178

Re: works fine as .ahk but bugs when an exe Topic is solved

The error message shown does not relate to the code you posted. Can you double check that you compiled the correct source.

Cheers
by TAC109
11 Feb 2024, 18:55
Forum: Scripts and Functions (v1)
Topic: Upcoming Ahk2Exe Changes (2024)
Replies: 626
Views: 181111

Re: Upcoming Ahk2Exe Changes (2024)

Update - 1.1.37.01c0, 12 February 2024
  • Rationalise detection of major AHK version.
  • Enhance for MS Store version.
See this post for download details.
by TAC109
29 Jan 2024, 23:01
Forum: Ask for Help (v1)
Topic: auto delete script after 7 days ? Topic is solved
Replies: 22
Views: 2169

Re: auto delete script after 7 days ? Topic is solved

You can use this code in your main script after it has decided that it is time to delete the script or .exe file: MsgBox The compiled .exe ; For testing ; Must be compiled with an .exe base file ;@Ahk2Exe-Base ..\AutoHotkeyU32.exe, %A_ScriptName~\.[^\.]+$%_1 if A_IsCompiled ; Code to delete the runn...
by TAC109
27 Jan 2024, 16:20
Forum: Ask for Help (v1)
Topic: how to get the name of the script ? Topic is solved
Replies: 3
Views: 377

Re: how to get the name of the script ? Topic is solved

The code I posted in my previous reply handles script names of up to 39 characters, including the extension (.ahk). If the names are likely to be longer than this, extend the line marked 'A random string' with some more random characters and also extend the duplicate string in the code with the same...
by TAC109
26 Jan 2024, 18:11
Forum: Ask for Help (v1)
Topic: how to get the name of the script ? Topic is solved
Replies: 3
Views: 377

Re: how to get the name of the script ? Topic is solved

This script uses BinMod to inject the script name into the compiled exe: ;@Ahk2Exe-PostExec BinMod.exe "%A_WorkFileName%" ;@Ahk2Exe-Cont "1:dnakdjtgbdbzvwhehrfbshbdir8362ydfncmdlsa ; A random string ;@Ahk2Exe-Cont :%A_ScriptName%`,RANDOM" ;@Ahk2Exe-ExeName New_Name_Compiled AhkName := StrSplit("dnak...
by TAC109
24 Jan 2024, 17:24
Forum: Ask for Help (v2)
Topic: How to get handle of RCDATA in compiled script?
Replies: 1
Views: 141

Re: How to get handle of RCDATA in compiled script?

I'm not able to spend much time on this, but you can get some ideas from studying how Ahk2Exe handles a similar task. Refer to Ahk2Exe.ahk on GitHub, lines 252-273 and 136-141, etc. Although Ahk2Exe is written in AutoHotkey v1.1 this code should be easily translatable into v2.

Cheers
by TAC109
31 Dec 2023, 17:09
Forum: AutoHotkey Development
Topic: Load time warnings not captured by /ErrorStdOut
Replies: 0
Views: 285

Load time warnings not captured by /ErrorStdOut

lexikos Version 2 has the additional facility to report warnings at load time as well as errors. Unfortunately these warnings are not captured by the switch /ErrorStdOut, and in this case the exit code is zero. This means that if a script generates warnings Ahk2Exe is unaware of this fact and canno...
by TAC109
30 Dec 2023, 18:17
Forum: Ask for Help (v2)
Topic: Capture a scripts PID when it starts, gives wrong PID Topic is solved
Replies: 11
Views: 776

Re: Capture a scripts PID when it starts, gives wrong PID Topic is solved

Alternatively see here and scroll down to Run *Launch.

Cheers
by TAC109
29 Dec 2023, 17:31
Forum: Ask for Help (v2)
Topic: Entire Unparsed A_Args? Topic is solved
Replies: 10
Views: 525

Re: Entire Unparsed A_Args? Topic is solved

Not sure I fully understand what is required, but this is what I use to capture all arguments to a string. Each argument will become enclosed by double-quotes, which should be ok as these will be stripped off by the OS when passed to another app. The problem of a parameter ending with a back-slash (...
by TAC109
28 Dec 2023, 15:49
Forum: Ask for Help (v2)
Topic: AutoHotKey64 syntax conflict with Ahk2Exe compiler
Replies: 5
Views: 625

Re: AutoHotKey64 syntax conflict with Ahk2Exe compiler

You should be selecting a v2 base file, such as 'v2.0.10 U64 AutoHotkey64.exe'. Also ensure that Ahk2Exe is installed correctly. If your installation is non-standard see here for the correct directory structure to follow. If you require me to further diagnose this problem you will need to supply mor...
by TAC109
27 Dec 2023, 16:10
Forum: Ask for Help (v2)
Topic: AutoHotKey64 syntax conflict with Ahk2Exe compiler
Replies: 5
Views: 625

Re: AutoHotKey64 syntax conflict with Ahk2Exe compiler

Check that you are selecting a v2 base file for your compile.

If you are compiling through a VS extension, you will need to initially set up your default details by running the Ahk2Exe GUI, selecting the default base file you wish to use for your compilations, and pressing the 'Save' button.

Cheers
by TAC109
19 Dec 2023, 20:59
Forum: Ask for Help (v2)
Topic: About Ahk2Exe cmdline
Replies: 8
Views: 714

Re: About Ahk2Exe cmdline

@miyake Are you typing this into a command prompt window? or issuing an Autohotkey RunWait command? or something else?

You need to be more specific.

Edit: Also show the details of any error message.
by TAC109
19 Dec 2023, 19:24
Forum: Ask for Help (v2)
Topic: About Ahk2Exe cmdline
Replies: 8
Views: 714

Re: About Ahk2Exe cmdline

@miyake How are you running the command? Please show your complete code.

Thanks
by TAC109
19 Dec 2023, 18:11
Forum: Ask for Help (v2)
Topic: About Ahk2Exe cmdline
Replies: 8
Views: 714

Re: About Ahk2Exe cmdline

The 'verbose' keyword is part of the '/silent' parameter, thus does not have a leading '/'. This use of Ahk2Exe will not generate any stderr output, so just use an stdout redirection.

Code: Select all

Ahk2Exe /in myscript.ahk /out myscript.exe /silent verbose > output.txt
Cheers
by TAC109
04 Dec 2023, 19:35
Forum: Scripts and Functions (v1)
Topic: AutoHotkey Compiler
Replies: 4
Views: 744

Re: AutoHotkey Compiler

This compiler is based around and includes the old Ahk2Exe version 1.1.23.05 which was released 26 March 2016. There have been many updates to the compiler since then, including the addition of Compiler Directives and the ability to compile v2 scripts. I had to turn off Microsoft Defender Antivirus ...
by TAC109
03 Dec 2023, 17:53
Forum: Ask for Help (v1)
Topic: Regex help - how to escape \E ? Topic is solved
Replies: 22
Views: 1568

Re: Regex help - how to escape \E ? Topic is solved

mikeyww As RegExEsc() is expected to be used to process part of the Needle parameter of RegExMatch or RegExReplace it seemed more logical to name the parameter of RegExEsc, 'Needle'. andymbody Some things to keep in mind for your AutoHotkey 'processing comment' project: The comment character has to...
by TAC109
30 Nov 2023, 16:35
Forum: Ask for Help (v1)
Topic: Script Issue: send personalized messages to customers arriving from chat Topic is solved
Replies: 11
Views: 685

Re: Script Issue: send personalized messages to customers arriving from chat Topic is solved

Leo46 wrote:
30 Nov 2023, 15:31
I tried as you indicated, installed the correct version, …
Please note that when posted code starts with:

Code: Select all

#Requires AutoHotkey v1.1.33
this means that the code needs v1.1.33 or a later v1.1 version. It is not necessary to revert back to v1.1.33 if you have a later v1.1 version installed.

Cheers

Go to advanced search