Search found 1096 matches

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

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: 177

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: 179503

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: 2144

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: 370

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: 370

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: 140

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: 283

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: 750

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: 523

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: 620

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: 620

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: 707

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: 707

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: 707

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: 711

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: 1558

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: 670

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
by TAC109
30 Nov 2023, 16:19
Forum: Scripts and Functions (v1)
Topic: ScriptGuard: Helps Protect Compiled Scripts from Decompilation
Replies: 54
Views: 18798

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

@kaka2
If you want to compress the compiled program, you can select any appropriate .exe file as the base file; in other words, if a v1 .bin base file is selected it won’t run if compressed.

Cheers
by TAC109
29 Nov 2023, 17:59
Forum: Ask for Help (v1)
Topic: Regex help - how to escape \E ? Topic is solved
Replies: 22
Views: 1558

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

You could just forget about the \Q....\E format and just escape the relevant characters in the needle : RegExEsc(Needle) { Loop Parse, % "\.*?+[{|()^$" Needle := StrReplace(Needle, A_LoopField, "\" A_LoopField) return Needle } MsgBox % RegExEsc("\.*?+[{|()^$abcde\.*?+[{|()^$") ; Proof of concept Che...

Go to advanced search