Search found 2131 matches

by HotKeyIt
21 Nov 2020, 07:41
Forum: AutoHotkey_H
Topic: RFC: AhkThread() usage + best practices suggestions Topic is solved
Replies: 8
Views: 164

Re: RFC: AhkThread() usage + best practices suggestions Topic is solved

I just tested and A_Args.1*1 is not necessary, normally it would convert string to number but this seems to happen anyway since a number is required.
by HotKeyIt
20 Nov 2020, 21:47
Forum: AutoHotkey_H
Topic: RFC: AhkThread() usage + best practices suggestions Topic is solved
Replies: 8
Views: 164

Re: RFC: AhkThread() usage + best practices suggestions Topic is solved

You do it via Parameters: __THREAD_A := AhkThread("threadA.ahk", "" (&STATE), true) and then object:=CriticalObject(A_Args.1*1)
by HotKeyIt
20 Nov 2020, 13:42
Forum: AutoHotkey_H
Topic: NOOB guide on how to use H ? Topic is solved
Replies: 7
Views: 220

Re: NOOB guide on how to use H ? Topic is solved

I see.
I will take a look and either create a v1 chm or make a unified version so it can be used for both and will have examples for both, v1 and v2.
by HotKeyIt
20 Nov 2020, 10:20
Forum: AutoHotkey_H
Topic: NOOB guide on how to use H ? Topic is solved
Replies: 7
Views: 220

Re: NOOB guide on how to use H ? Topic is solved

See difference:

Code: Select all

MsgBox % "a`nb"
MsgBox % "a``nb"
So if you use MsgBox % "a`nb" you will have not valid code!

Code: Select all

MsgBox "a
b"
by HotKeyIt
20 Nov 2020, 03:19
Forum: AutoHotkey_H
Topic: NOOB guide on how to use H ? Topic is solved
Replies: 7
Views: 220

Re: NOOB guide on how to use H ? Topic is solved

Don't forget #Persistent for your main thread, otherwise it will exit the program. Yes you are able to separate them but it affects performance and you need a reference to be able to call it #Persistent __THREAD_A := AhkThread(" ( #Persistent fun(a){ MsgBox `% ""From Thread:``n"" a } )") __THREAD_B ...
by HotKeyIt
19 Nov 2020, 19:42
Forum: AutoHotkey_H
Topic: NOOB guide on how to use H ? Topic is solved
Replies: 7
Views: 220

Re: NOOB guide on how to use H ? Topic is solved

All you need is the AutoHotkey.exe, simply replace yours (backup your current one!). If you don't know which one to use, start with the one that does not require vc runtime: 32-bit MT or 64-bit MT . From there all you need for multi-threading is AhkThread function: ahk1:=AhkThread("MsgBox thread 1")...
by HotKeyIt
10 Nov 2020, 18:59
Forum: AutoHotkey_H
Topic: About AHK_H - Downloads, Updates, Changes etc. v1 & v2
Replies: 17
Views: 14338

Re: AutoHotkey_H v2 - 2.108-H021

AHK_H v1.1.33.02-H001 wrote:
by HotKeyIt
10 Nov 2020, 18:52
Forum: Ask For Help
Topic: Duplicate class definition when launching Ahk2exe.ahk
Replies: 6
Views: 1857

Re: Duplicate class definition when launching Ahk2exe.ahk

Just tried to reproduce and it seems to work fine for me, can you check with latest release?
Try extracting to separate folder, probably there is a conflict with one of your own includes?
by HotKeyIt
05 Nov 2020, 12:12
Forum: Ask For Help
Topic: Process Thread teb address
Replies: 1
Views: 75

Re: Process Thread teb address

See http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FThread%2FNtQueryInformationThread.html http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/NT%20Objects/Thread/THREAD_INFORMATION_CLASS.html#ThreadBasicInformation For PEB s...
by HotKeyIt
31 Oct 2020, 19:41
Forum: Bug Reports
Topic: [a122] Force local mode. How to?
Replies: 5
Views: 283

Re: [a122] Force local mode. How to?

Simply disable warning:

Code: Select all

#Warn LocalSameAsGlobal, Off
by HotKeyIt
28 Sep 2020, 20:17
Forum: Development
Topic: Bad source code file in error messages
Replies: 3
Views: 242

Re: Bad source code file in error messages

Do you have example for brocken file path?
I can't imagine how the function would get lost, example code would be helpful.
by HotKeyIt
28 Sep 2020, 20:12
Forum: Ask For Help
Topic: setworkingdir in one thread breaks includes in other thread
Replies: 2
Views: 167

Re: setworkingdir in one thread breaks includes in other thread

There is only one working directory per process, and you should avoid changing it. See https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setcurrentdirectory Multithreaded applications and shared library code should not use the SetCurrentDirectory function and should avoid using r...
by HotKeyIt
22 Sep 2020, 18:57
Forum: Ask For Help
Topic: How do I reuse a thread? Topic is solved
Replies: 5
Views: 301

Re: How do I reuse a thread? Topic is solved

Code: Select all

#Persistent
ahkdll:=AhkThread(0)
MySub:
	ahkdll.ahktextdll("SoundPlay,*-1")
	Random,randomvar,1000,2000
	settimer,MySub,% randomvar
return
by HotKeyIt
21 Sep 2020, 11:58
Forum: Ask For Help
Topic: How do I reuse a thread? Topic is solved
Replies: 5
Views: 301

Re: How do I reuse a thread? Topic is solved

Are you using the latest version, it works fine for me.
by HotKeyIt
25 Aug 2020, 01:40
Forum: Scripts and Functions
Topic: ScriptGuard: Helps Protect Compiled Scripts from Decompilation
Replies: 26
Views: 1924

Re: ScriptGuard: Helps Protect Compiled Scripts from Decompilation

@guest3456 ScriptGuard2 will definitely not work with H, but ScriptGuard1 should work if the resource name is changed in the script above to that used in the H version of Ahk2Exe. @HotKeyIt could confirm? Cheers AFAIK yes. @TAC109 well as far as i know, the script is not stored in plaintext in AHK_...
by HotKeyIt
15 Aug 2020, 15:39
Forum: AutoHotkey_H
Topic: AHK_H v2 code conflicts in master download
Replies: 5
Views: 2061

Re: AHK_H code conflicts in master download

Yes, that will be fixed in next merge, unfortunately don't have much time currently.

Go to advanced search