AhkExported()

Auto Hotkey

AhkExported

Retrieves an object to control main thread (AutoHotkey.exe) same way as in AhkThread.

OutputVar := AhkExported()
Function Example: AhkExe := AhkExported()

Parameters

OutputVar

The name of the variable in which to store the AutoHotkey.exe object.
Using this object we can call all AutoHotkey.exe functions using object syntax.

General Remarks

Scripts compiled with AutoHotkeySC.bin cannot use ahkExec, addFile and addScript functions.

Methods
ahkFunction Call a function via SendMessage method.
ahkPostFunction Call a function via PostMessage method (does not wait until function returns).
ahkExecuteLine Executes script from given line pointer.
ahkLabel Goto (PostMessage) or Gosub (SendMessage) a Label.
ahkFindFunction Find a function and return its pointer.
ahkFindLabel Find a label and return its pointer.
addFile Add and optionally execute additional script/code from file.
addScript Add and optionally execute additional script/code from text/memory/variable.
ahkExec Execute some script/code from text/memory/variable temporarily.
ahkassign Assign a value to variable or pointer of variable.
ahkgetvar Retrieve a value from a variable.
ahkPause Pause Script.

Related

AutoHotkey.dll, AhkThread, Objects, DllCall

Examples

AhkExe:=AhkExported()
Msgbox % AhkExe.ahkgetvar("A_IsCompiled") ; Check if Script is compiled e.g. from AutoHotkey.dll script