![Yay! Dance! Yay! :dance:](./images/smilies/dance.gif)
I especially use AHK Studio. But it doesn't work with Studio AHK-H.
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"""
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.
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.
loop Sleep as long as the thread's ahkgetvar property doesnt contain a property called variableCode: Select all
; wait until variable has been set.
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: