Creates a script from main script that can be passed to AutoHotkey.dll, BinRun or DynaRun.
OutputVar := CreateScript(Script , ScriptPath, Password)
Function Example: MyScript := CreateScript("a:=1`nStart:End`nfun{}")
The name of the variable in which to store the created script.
Label or function in main Script to include.
Syntax for including label is tartingLabelName:EndingLabelName
Syntax for including function is FunctionName{}
The base script to use, default for not compiled: A_ScriptFullPath.
Password used to compile in Ahk2Exe.
You can have any code between included labels and functions. Script is also loaded from Resource if A_IsCompiled.
AutoHotkey.dll, BinRun, DynaRun
DynaRun(CreateScript("
(
Gui:=GuiCreate()
Gui.Add("Button","","Click me to Test Label and Function").OnEvent("Click","Button")
Gui.OnEvent("Close","GuiClose")
Gui.Show()
Return
fun{}
)"),"Dynamic script")
ExitApp
(button.Gui.Show("Hide"),MsgBox(fun()))
GuiClose(p*) => ExitApp()
ButtonEnd>:
Return
fun(p*){
Return "test trough pipe"
}