Search found 299 matches

by pneumatic
01 Dec 2019, 06:53
Forum: Ask For Help
Topic: About WinExist Topic is solved
Replies: 4
Views: 431

Re: About WinExist Topic is solved

Just do If WinExist("Paper level_")

Because SetTitleMatchMode is 1 by default

1: A window's title must start with the specified WinTitle to be a match.
2: A window's title can contain WinTitle anywhere inside it to be a match.
3: A window's title must exactly match WinTitle to be a match.
by pneumatic
01 Dec 2019, 06:46
Forum: Ask For Help
Topic: ExitCode Topic is solved
Replies: 7
Views: 942

ExitCode Topic is solved

I'm trying to use ExitCode to control how my script exits. Is this how ExitCode is intended to be used, or are there scenarios where ahk posts its own unpredictable ExitCode, say for example if ahk encounters some runtime error and wants to quit? In other words, is ExitCode completely under my contr...
by pneumatic
01 Dec 2019, 02:49
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 8879

Re: AHK Script Encryption Topic is solved

For large scripts (eg. 40,000 lines) decryption on exe launch is slow. Around 3-4 seconds with CPU pegged at 100% on an i7-4790k. That was on Win10 btw. On Win7 I'm finding it only adds ~1 second load time, which is totally fine. No third party antivirus installed on either. edit: but on my Win7 la...
by pneumatic
01 Dec 2019, 00:56
Forum: Bug Reports
Topic: If statement changes contents of var
Replies: 14
Views: 5509

If statement changes contents of var

int1 := "12345678901234567890" ;20 digits - 1 longer than ahk can handle for ints, but quotes should mean it's treated as a string int2 := int1 msgbox % int1 . "`n" . int2 https://i.lensdump.com/i/iY5Rci.png If (int1 := "12345678901234567890"){ int2 := int1 msgbox % int1 . "`n" . int2 } https://i.l...
by pneumatic
30 Nov 2019, 21:17
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 8879

Re: AHK Script Encryption Topic is solved

Another approach might be to compress your exe with a modified UPX which obfuscates its decompression to fool the payload method used by the ahk decompiler tool.

https://dl.packetstormsecurity.net/papers/general/Using_UPX_as_a_security_packer.pdf
by pneumatic
30 Nov 2019, 01:57
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 8879

Re: AHK Script Encryption Topic is solved

Can you tell us more about this? There are 2 ways I know of. First is to generate an encrypted hash of the exe using jNizM's encryption library, store it on disk, then on program launch compare the encrypted hash of the exe to the one on disk. Other way is to use Windows signtool to digitally sign ...
by pneumatic
29 Nov 2019, 23:30
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 8879

Re: AHK Script Encryption Topic is solved

So I managed to recompile AHK_H in VS2017 with a custom encryption password. It works! But ultimately I might not use it. Here's why... 1. For large scripts (eg. 40,000 lines) decryption on exe launch is slow. Around 3-4 seconds with CPU pegged at 100% on an i7-4790k. On a low spec system (eg. dual ...
by pneumatic
29 Nov 2019, 22:29
Forum: Ask For Help
Topic: Script not compatible with compression / encryption
Replies: 5
Views: 2514

Re: Script not compatible with compression / encryption

HotKeyIt wrote:
29 Nov 2019, 20:44
This has been fixed now.
Thanks, fixed on my systems too :thumbup:
by pneumatic
29 Nov 2019, 17:14
Forum: Wish List
Topic: Execution continues after Reload command
Replies: 11
Views: 2434

Re: Execution continues after Reload command

On an i7-4790k I get ~200 FileAppends after Reload. A_TickCount doesn't change, so it's < 15.6ms or whatever the system time slice is. #Persistent OnExit , Exit SetTimer , Reload , -1 return Reload: MsgBox , About to Reload Reload ExitApp return Exit: loop FileAppend , % A_TickCount . "`n" , Debug.t...
by pneumatic
29 Nov 2019, 17:03
Forum: Wish List
Topic: Execution continues after Reload command
Replies: 11
Views: 2434

Re: Execution continues after Reload command

To make sure no code is executed after the RELOAD command: just add EXITAPP statement next As mentioned, ExitApp jumps to OnExit routine, which can be interrupted by the new script instance spawned by Reload. This is what was happening to my script; I have some DllCalls in my OnExit routine which w...
by pneumatic
29 Nov 2019, 06:19
Forum: Ask For Help
Topic: Script not compatible with compression / encryption
Replies: 5
Views: 2514

Re: Script not compatible with compression / encryption

Also does not run on my Win7 machine, but gives this error

Image

Works fine without compression.
by pneumatic
29 Nov 2019, 06:06
Forum: Ask For Help
Topic: Script not compatible with compression / encryption
Replies: 5
Views: 2514

Re: Script not compatible with compression / encryption

I don't think it's my script which is the problem, as I've found some other scripts won't run either. For example try compiling Ahk2Exe - with compression it doesn't run either. Could someone please test this so I can rule out my system as the cause. Procedure: 1. Download latest AHK_H from here: ht...
by pneumatic
29 Nov 2019, 05:32
Forum: Ask For Help
Topic: Script not compatible with compression / encryption
Replies: 5
Views: 2514

Re: Script not compatible with compression / encryption

I've whittled it down to 50 lines, where I can modify a few of the lines and then it runs, but there's no logic to it. For example I can either change a multiline DllCall into one line, and it will run. But if I add another IF block after it, then it fails again.
by pneumatic
29 Nov 2019, 02:50
Forum: Ask For Help
Topic: Script not compatible with compression / encryption
Replies: 5
Views: 2514

Script not compatible with compression / encryption

I am using the default Unicode 64-bit .bin file, v1.1.32.0 (current version). If I make a simple MsgBox Hello World script, it compiles with compression and encryption enabled (password=AutoHotkey) and runs just fine. If I try the same with my large 40,000 line script, it compiles successfully, I la...
by pneumatic
29 Nov 2019, 01:50
Forum: Ask For Help
Topic: VarSetCapacity vs AHK_L
Replies: 11
Views: 3788

VarSetCapacity vs AHK_L

The difference to main AutoHotkey is that #NoEnv is set by default and VarSetCapacity keeps memory in variable when capacity is changed. I'm porting my script from _L to _H and going through all my VarSetCapacitys to ensure they are compatible with the above rule. Which way is better: VarSetCapacit...
by pneumatic
28 Nov 2019, 17:47
Forum: Wish List
Topic: Execution continues after Reload command
Replies: 11
Views: 2434

Re: Execution continues after Reload command

This is the workaround I'm currently using. ExitRoutine("But don't ExitApp at the end") Reload ExitRoutine("Don't do routine, just go straight to ExitApp") The documentation is not to blame for this, as it does state that Reload will interrupt the OnExit routine. My suggestion was only to inform the...
by pneumatic
28 Nov 2019, 02:35
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6120

Re: Excessive page faults with Process,Exist

For what it's worth, I ended up just using WinGet: MyProcessDetectionList := ["C:\Program Files\App1\App1.exe" , "C:\Program Files\App2\App2.exe" , "C:\Program Files\App3\App3.exe"] DetectHiddenWindows On ;Off = CPU saver WinGet , WinList , List loop % WinList { WinGet , ThisProcessPath , ProcessPat...
by pneumatic
28 Nov 2019, 02:27
Forum: Wish List
Topic: Execution continues after Reload command
Replies: 11
Views: 2434

Execution continues after Reload command

edit: to moderators, I should have posted this in the " Suggestions on documentation improvements " - sorry. MsgBox About to reload Reload FileAppend , After reload , Debug.txt return The documentation should mention that execution will continue after the Reload command for an unpredictable amount o...
by pneumatic
27 Nov 2019, 22:16
Forum: Ask For Help
Topic: Compiling .bin in Visual Studio 2015
Replies: 1
Views: 191

Re: Compiling .bin in Visual Studio 2015

Oh, is it like this maybe? Self-contained|Win32 -> AutoHotkeySC.bin = Unicode 32-bit.bin and AutoHotkeySC.bin in GitHub release Self-contained|x64 -> AutoHotkeySC.bin = Unicode 64-bit.bin in GitHub release Self-contained(mbcs)|Win32 -> AutoHotkeySC.bin = ANSI 32-bit.bin in GitHub release Self-contai...
by pneumatic
27 Nov 2019, 21:58
Forum: Ask For Help
Topic: Compiling .bin in Visual Studio 2015
Replies: 1
Views: 191

Compiling .bin in Visual Studio 2015

Hello Is it possible to compile Unicode 64-bit.bin in Visual Studio? I have successfully compiled the 32-bit and 64-bit projects, but the only .bin file they generate is AutoHotkeySC.bin . https://i.imgur.com/F5OsOKH.png I am not sure if my script will be compatible with this as a lot of my code ass...

Go to advanced search