Hello. I like the features of AHK-H. AHK-L I'm new. I want to develop with AHK-H, but I don't know where to start. Which editors can I use?
I especially use AHK Studio. But it doesn't work with Studio AHK-H.
Starting with AHK-H
Re: Starting with AHK-H
Put the AHK_H executable (x64w\Autohotkey.exe) alongside your .ahk file, then rename it to the same as your .ahk file, then run the executable.
x64w\Autohotkey.exe = 64-bit unicode
Win32w\Autohotkey.exe = 32-bit unicode
x64a\Autohotkey.exe = 64-bit ansi
Win32a\Autohotkey.exe = 32-bit ansi
_MT versions are some kind of portable versions which don't require the AutoHotkey.dll file to be alongside, and also doesn't require user to have installed Visual C++ runtimes from Microsoft. But dll features may not work properly.
I just use Notepad++, so I can't help you with a dedicated editor.
x64w\Autohotkey.exe = 64-bit unicode
Win32w\Autohotkey.exe = 32-bit unicode
x64a\Autohotkey.exe = 64-bit ansi
Win32a\Autohotkey.exe = 32-bit ansi
_MT versions are some kind of portable versions which don't require the AutoHotkey.dll file to be alongside, and also doesn't require user to have installed Visual C++ runtimes from Microsoft. But dll features may not work properly.
I just use Notepad++, so I can't help you with a dedicated editor.
Re: Starting with AHK-H
You can simply replace your AutoHotkey.exe with AHK_H one (backup yours before)
You can use any editor you like.
MT_ version does not require microsoft redistributable.
You can use any editor you like.
MT_ version does not require microsoft redistributable.
Re: Starting with AHK-H
I just wanted to run the simple example. But I'm taking errors.
Code: Select all
ahkdll:=AhkThread("Msgbox `% variable:=`"Thread`"") ; Loads the AutoHotkey module and starts the script.
While !ahkdll.ahkgetvar.variable
Sleep 50 ; wait until variable has been set.
MsgBox % ahkdll.ahkgetvar.variable ; Display content of variable in thread
ahkthread_free(ahkdll),ahkdll:="" ; Stop execution in thread and free resources.
Script Exited, ExitCode: 2
E:\IDELER\AHK-Studio-master\* (6) : ==> The following variable name contains an illegal character:
"Thread"""
Re: Starting with AHK-H
Code: Select all
; v1
ahkdll:=AhkThread("Msgbox `% variable:=""Thread""") ; Loads the AutoHotkey module and starts the script.
While !ahkdll.ahkgetvar.variable
Sleep 50 ; wait until variable has been set.
MsgBox % ahkdll.ahkgetvar.variable ; Display content of variable in thread
ahkthread_free(ahkdll),ahkdll:="" ; Stop execution in thread and free resources.
Re: Starting with AHK-H
I thank you. Can you explain what the while cycle is doing?swagfag wrote: ↑15 Dec 2019, 13:47`" is a v2 exclusive way of escaping quoted quotesCode: Select all
; v1 ahkdll:=AhkThread("Msgbox `% variable:=""Thread""") ; Loads the AutoHotkey module and starts the script. While !ahkdll.ahkgetvar.variable Sleep 50 ; wait until variable has been set. MsgBox % ahkdll.ahkgetvar.variable ; Display content of variable in thread ahkthread_free(ahkdll),ahkdll:="" ; Stop execution in thread and free resources.
Re: Starting with AHK-H
its explained already?
loop Sleep as long as the thread's ahkgetvar property doesnt contain a property called variableCode: Select all
; wait until variable has been set.
Re: Starting with AHK-H
If you are using AHK_H v1, you will find that AHK Studio is quite compatible. This is because AHK_H v1 is a superset of AHK_L v1, and built on top of it. The few problems that I've seen have been:
1) AHK_H help files are not compatible with AHK_L
Meaning you primarily would use/configure for the AHK_L v1 help file, then use the AHK_H v2 file as a supplement (for extra features/keywords). This is because HotKeyIt focuses on updating AHK_H v2 documentation and not AHK_H v1, and only referring to his additional features.
The AHK_H v2 documentation is for both AHK_H v1 and AHK v2, which can be confusing. For greater clarity, it would probably be better (wish list) if HotKeyIt would make this clear, that the present AHK_H help file is referring to additional feature present in both AHK_H v1 and v2. And if syntax is different between his added features/keywords between the versions, he can simply show the distinction in the examples. Thus, there would be a combined AHK_H v1 and v2 help document.
Since AHK Studio is written in AutoHotkey (AHK_L v1), it can be modified by AutoHotkey users to open the AHK_H help file too or you can build a supplemental script that monitors for AHK_H keywords and opens the AHK_H help document when pressing a key of your choice. Like, F1 for AHK_L v1 help and F8 for AHK_H help.
2) Make sure the AHK_H lib folder has all the correct files
If your AHK_H lib folder is missing files, then the user can experience odd errors which causes confusion, when using AHK Studio. In addition, the AHK_H user might have also compiled AHK_H incorrectly or oddly, so are getting unexpected results. However, such problems are not the fault of AHK Studio, but are based on actions taken by the user.
Who is online
Users browsing this forum: No registered users and 31 guests