Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Execute AHK code dynamically!


  • Please log in to reply
54 replies to this topic
Leroxy
  • Members
  • 54 posts
  • Last active: May 10 2013 07:05 PM
  • Joined: 06 Dec 2007
Well if have read through this post about 8 times cant figure out what it basic principal is and its usage.

I manage too get a soundbeep from the cmd.ahk

Jippy but whats it for.

Is this a script what some other user said about passing by punkbuster ?


I really want too learn what its for cause you high-end people are so excited about.


Could someone make a example or script that he or she can say.

Now this is dynamic and this is static and its usable for or with too bypass who or what or create the impossible.

Grtzz

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007
the purpose isnt as clear until you want to execute the same script with multiple processes (shortens the code writing)
so something like
gui,button,add gexec,msgbox
gui,button,add gexec2,inputbox
Gui, Show
return
exec:
Gui, submit,NoHide
msgbox, , ,hi
return
exec2:
Gui, submit, NoHide
inputbox, , ,hi
return


you could do soemthing like this
Gui, Add, Button, gexec, MsgBox
Gui, Add, Button, gexec, inputbox
Gui, Show
return
exec:
Gui, submit,NoHide
GuiControlGet, x , , %A_GuiControl%
execute(x ",0,tt,It works!")
return	
see the intent of the code is to give you less lines of code

please note there is a flaw to this code
i fixxed mine and ill post the revision later today
probably due to some updates to ahk
any how ill post the corrections later today
Never lose.
WIN or LEARN.

  • Guests
  • Last active:
  • Joined: --
Where i can get this code ?? the link show only a blank page! Thanks this ist´s very cool!

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007
its part of the latest version see the march 9 release
Never lose.
WIN or LEARN.

Heliomatos
  • Guests
  • Last active:
  • Joined: --

its part of the latest version see the march 9 release


i download this but not have the function.... have some place where i can download execute.ahk ??? thanks

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007
http://www.autohotke...ons.htm#dynamic
Never lose.
WIN or LEARN.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

its part of the latest version see the march 9 release

It is not. Execute.ahk is for executing commands dynamically, not functions.

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007

its part of the latest version see the march 9 release

It is not. Execute.ahk is for executing commands dynamically, not functions.

I have to admit i didnt read it very closely. i saw the reference to dynamic and just put it in my head as commands dynamically executed.
As usual it is your attention to detail and general knowledge thatseparates you from idiots such as i. Thanks for the correction
Never lose.
WIN or LEARN.

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: Oct 13 2016 01:04 AM
  • Joined: 21 Dec 2007
Either way the script does indeed seem to be gone i think i Have a copy on my home PC
Bump any one got a copy handy?
Never lose.
WIN or LEARN.

wibumba (not logged in)
  • Guests
  • Last active:
  • Joined: --
This file doesn't appear to be available on autohotkey.net anymore.

Is there anywhere else I can get this? I really need this for a project I'm doing.

rickly
  • Guests
  • Last active:
  • Joined: --

This file doesn't appear to be available on autohotkey.net anymore.

Is there anywhere else I can get this? I really need this for a project I'm doing.


Here it is as downloaded on 1/27/06. I remember finding (and fixing) some problems - but I don't
think I kept the fixes.
Also note that AHK has added some commands since this was posted.

Just highlight the code below and copy! Have fun.

; Created by Jonny, with thanks to Rajat for the parsing code.

execute(CmdLine)
{
   global r1,r2,r3,r4,r5,r6,r7

   StringGetPos, cPos, CmdLine, `,
   StringGetPos, sPos, CmdLine, %A_SPACE%
   
   IfGreater, sPos, 0
      IfLess, sPos, %cPos%
         cPos = %sPos%
   
   StringLeft, Command, CmdLine, %cPos%
   cPos ++
   StringTrimLeft, CmdLine, CmdLine, %cPos%
   CmdLine = %CmdLine%
   
   IfEqual, Command,
      Command = %CmdLine%
   
   Loop, Parse, CmdLine, `,, %A_Space%%A_Tab%
      P%A_Index% = %A_LOOPFIELD%
   
   if command not in
(Join
AutoTrim,BlockInput,ClipWait,Control,ControlClick,ControlFocus,
ControlGet,ControlGetFocus,ControlGetPos,ControlGetText,
ControlMove,ControlSend,ControlSendRaw,ControlSetText,CoordMode,
DetectHiddenText,DetectHiddenWindows,Drive,DriveGet,
DriveSpaceFree,Edit,EnvAdd,EnvDiv,EnvMult,EnvSet,EnvSub,EnvUpdate,
ExitApp,FileAppend,FileCopy,FileCopyDir,FileCreateDir,
FileCreateShortcut,FileDelete,FileGetAttrib,FileGetShortcut,
FileGetSize,FileGetTime,FileGetVersion,FileMove,FileMoveDir,
FileRead,FileReadLine,FileRecycle,FileRecycleEmpty,FileRemoveDir,
FileSelectFile,FileSelectFolder,FileSetAttrib,FileSetTime,
GetKeyState,GroupActivate,GroupAdd,GroupClose,GroupDeactivate,Gui,
GuiControl,GuiControlGet,Hotkey,IfEqual,IfNotEqual,IfExist,
IfNotExist,IfGreater,IfGreaterOrEqual,IfInString,IfNotInString,
IfLess,IfLessOrEqual,IfMsgBox,IfWinActive,IfWinNotActive,IfWinExist,
IfWinNotExist,ImageSearch,IniDelete,IniRead,IniWrite,Input,InputBox,
KeyHistory,KeyWait,ListHotkeys,ListLines,ListVars,Menu,MouseClick,
MouseClickDrag,MouseGetPos,MouseMove,MsgBox,OnExit,OutputDebug,
Pause,PixelGetColor,PixelSearch,PostMessage,Process,Progress,Random,
RegDelete,RegRead,RegWrite,Reload,Run,RunAs,RunWait,Send,SendRaw,
SendMessage,SetBatchLines,SetCapslockState,SetControlDelay,
SetDefaultMouseSpeed,SetFormat,SetKeyDelay,SetMouseDelay,
SetNumlockState,SetScrollLockState,SetStoreCapslockMode,SetTimer,
SetTitleMatchMode,SetWinDelay,SetWorkingDir,Shutdown,Sleep,Sort,
SoundBeep,SoundGet,SoundGetWaveVolume,SoundPlay,SoundSet,
SoundSetWaveVolume,SplashImage,SplashTextOn,SplashTextOff,SplitPath,
StatusBarGetText,StatusBarWait,StringCaseSense,StringGetPos,
StringLeft,StringLen,StringLower,StringMid,StringReplace,StringRight,
StringSplit,StringTrimLeft,StringTrimRight,StringUpper,Suspend,
SysGet,Thread,ToolTip,Transform,TrayTip,URLDownloadToFile,
WinActivate,WinActivateBottom,WinClose,WinGetActiveStats,
WinGetActiveTitle,WinGetClass,WinGet,WinGetPos,WinGetText,
WinGetTitle,WinHide,WinKill,WinMaximize,WinMenuSelectItem,
WinMinimize,WinMinimizeAll,WinMinimizeAllUndo,WinMove,WinRestore,
WinSet,WinSetTitle,WinShow,WinWait,WinWaitActive,WinWaitClose,
WinWaitNotActive
)
      return 0
   goto,%command% 

AutoTrim:
autotrim,%p1%
return

BlockInput:
blockinput,%p1%
return

ClipWait:
clipwait,%p1%,%p2%
return

Control:
control,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

ControlClick:
controlclick,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

ControlFocus:
controlfocus,%p1%,%p2%,%p3%,%p4%,%p5%
return

ControlGet:
controlget,ov,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return ov

ControlGetFocus:
controlgetfocus,ov,%p1%,%p2%,%p3%,%p4%
return ov

ControlGetPos:
controlgetpos,r1,r2,r3,r4,%p1%,%p2%,%p3%,%p4%,%p5%
return

ControlGetText:
controlgettext,ov,%p1%,%p2%,%p3%,%p4%,%p5%
return ov

ControlMove:
controlmove,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
return

ControlSend:
controlsend,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%
return

ControlSendRaw:
controlsendraw,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%
return

ControlSetText:
controlsettext,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%
return

CoordMode:
coordmode,%p1%,%p2%
return

DetectHiddenText:
detecthiddentext,%p1%
return

DetectHiddenWindows:
detecthiddenwindows,%p1%
return

Drive:
drive,%p1%,%p2%,%p3%
return

DriveGet:
driveget,ov,%p1%,%p2%
return ov

DriveSpaceFree:
drivespacefree,ov,%p1%
return ov

Edit:
edit
return

EnvAdd:
envadd,%p1%,%p2%,%p3%
return

EnvDiv:
envdiv,%p1%,%p2%
return

EnvMult:
envmult,%p1%,%p2%
return

EnvSet:
envset,%p1%,%p2%
return

EnvSub:
envsub,%p1%,%p2%,%p3%
return

EnvUpdate:
envupdate
return

ExitApp:
exitapp
return

FileAppend:
fileappend,%p1%,%p2%
return

FileCopy:
filecopy,%p1%,%p2%,%p3%
return

FileCopyDir:
filecopydir,%p1%,%p2%,%p3%
return

FileCreateDir:
filecreatedir,%p1%
return

FileCreateShortcut:
filecreateshortcut,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
return

FileDelete:
filedelete,%p1%
return

FileGetAttrib:
filegetattrib,ov,%p1%
return ov

FileGetShortcut:
filegetshortcut,%p1%,r1,r2,r3,r4,r5,r6,r7
return

FileGetSize:
filegetsize,ov,%p1%,%p2%
return ov

FileGetTime:
filegettime,ov,%p1%,%p2%
return ov

FileGetVersion:
filegetversion,ov,%p1%
return ov

FileMove:
filemove,%p1%,%p2%,%p3%
return

FileMoveDir:
filemovedir,%p1%,%p2%,%p3%
return

FileRead:
fileread,ov,%p1%
return ov

FileReadLine:
filereadline,ov,%p1%,%p2%
return ov

FileRecycle:
filerecycle,%p1%
return

FileRecycleEmpty:
filerecycleempty,%p1%
return

FileRemoveDir:
fileremovedir,%p1%,%p2%
return

FileSelectFile:
fileselectfile,ov,%p1%,%p2%,%p3%,%p4%
return ov

FileSelectFolder:
fileselectfolder,ov,%p1%,%p2%,%p3%
return ov

FileSetAttrib:
filesetattrib,%p1%,%p2%,%p3%,%p4%
return

FileSetTime:
filesettime,%p1%,%p2%,%p3%,%p4%,%p5%
return

GetKeyState:
getkeystate,ov,%p1%,%p2%
return ov

GroupActivate:
groupactivate,%p1%,%p2%
return

GroupAdd:
groupadd,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%
return

GroupClose:
groupclose,%p1%,%p2%
return

GroupDeactivate:
groupdeactivate,%p1%,%p2%
return

Gui:
gui,%p1%,%p2%,%p3%,%p4%
return

GuiControl:
guicontrol,%p1%,%p2%,%p3%
return

GuiControlGet:
guicontrolget,ov,%p1%,%p2%,%p3%
return ov

Hotkey:
hotkey,%p1%,%p2%,%p3%
return

IfEqual:
ifequal,%p1%,%p2%
	return 1
else
	return 0

IfNotEqual:
ifnotequal,%p1%,%p2%
	return 1
else
	return 0

IfExist:
ifexist,%p1%
	return 1
else
	return 0

IfNotExist:
ifnotexist,%p1%
	return 1
else
	return 0

IfGreater:
ifgreater,%p1%,%p2%
	return 1
else
	return 0

IfGreaterOrEqual:
ifgreaterorequal,%p1%,%p2%
	return 1
else
	return 0

IfInString:
ifinstring,%p1%,%p2%
	return 1
else
	return 0

IfNotInString:
ifnotinstring,%p1%,%p2%
	return 1
else
	return 0

IfLess:
ifless,%p1%,%p2%
	return 1
else
	return 0

IfLessOrEqual:
iflessorequal,%p1%,%p2%
	return 1
else
	return 0

IfMsgBox:
ifmsgbox,%p1%
	return 1
else
	return 0

IfWinActive:
ifwinactive,%p1%,%p2%,%p3%,%p4%
	return 1
else
	return 0

IfWinNotActive:
ifwinnotactive,%p1%,%p2%,%p3%,%p4%
	return 1
else
	return 0

IfWinExist:
ifwinexist,%p1%,%p2%,%p3%,%p4%
	return 1
else
	return 0

IfWinNotExist:
ifwinnotexist,%p1%,%p2%,%p3%,%p4%
	return 1
else
	return 0

ImageSearch:
imagesearch,r1,r2,%p1%,%p2%,%p3%,%p4%,%p5%
return

IniDelete:
inidelete,%p1%,%p2%,%p3%
return

IniRead:
iniread,ov,%p1%,%p2%,%p3%,%p4%
return ov

IniWrite:
iniwrite,%p1%,%p2%,%p3%,%p4%
return

Input:
input,ov,%p1%,%p2%,%p3%
return ov

InputBox:
inputbox,ov,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,,%p8%,%p9%
return ov

KeyHistory:
keyhistory
return

KeyWait:
keywait,%p1%,%p2%
return

ListHotkeys:
listhotkeys
return

ListLines:
listlines
return

ListVars:
listvars
return

Menu:
menu,%p1%,%p2%,%p3%,%p4%,%p5%
return

MouseClick:
mouseclick,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

MouseClickDrag:
mouseclickdrag,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

MouseGetPos:
mousegetpos,r1,r2,r3,r4,%p1%
return

MouseMove:
mousemove,%p1%,%p2%,%p3%,%p4%
return

MsgBox:
if (p2 || p3)
{
	if p4
		msgbox,%p1%,%p2%,%p3%,%p4%
	else
		msgbox,%p1%,%p2%,%p3%
}
else
	msgbox,%p1%
return

OnExit:
onexit,%p1%
return

OutputDebug:
outputdebug,%p1%
return

Pause:
pause,%p1%
return

PixelGetColor:
pixelgetcolor,ov,%p1%,%p2%,%p3%
return ov

PixelSearch:
pixelsearch,r1,r2,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

PostMessage:
postmessage,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

Process:
process,%p1%,%p2%,%p3%
return

Progress:
progress,%p1%,%p2%,%p3%,%p4%,%p5%
return

Random:
random,ov,%p1%,%p2%
return ov

RegDelete:
regdelete,%p1%,%p2%,%p3%
return

RegRead:
regread,ov,%p1%,%p2%,%p3%
return ov

RegWrite:
regwrite,%p1%,%p2%,%p3%,%p4%,%p5%
return

Reload:
reload
return

Run:
run,%p1%,%p2%,%p3%,ov
return ov

RunAs:
runas,%p1%,%p2%,%p3%
return

RunWait:
runwait,%p1%,%p2%,%p3%,ov
return ov

Send:
send,%p1%
return

SendRaw:
sendraw,%p1%
return

SendMessage:
sendmessage,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return errorlevel

SetBatchLines:
setbatchlines,%p1%
return

SetCapslockState:
setcapslockstate,%p1%
return

SetControlDelay:
setcontroldelay,%p1%
return

SetDefaultMouseSpeed:
setdefaultmousespeed,%p1%
return

SetFormat:
setformat,%p1%,%p2%
return

SetKeyDelay:
setkeydelay,%p1%,%p2%
return

SetMouseDelay:
setmousedelay,%p1%
return

SetNumlockState:
setnumlockstate,%p1%
return

SetScrollLockState:
setscrolllockstate,%p1%
return

SetStoreCapslockMode:
setstorecapslockmode,%p1%
return

SetTimer:
settimer,%p1%,%p2%,%p3%
return

SetTitleMatchMode:
settitlematchmode,%p1%,%p2%
return

SetWinDelay:
setwindelay,%p1%
return

SetWorkingDir:
setworkingdir,%p1%
return

Shutdown:
shutdown,%p1%
return

Sleep:
sleep,%p1%
return

Sort:
sort,%p1%,%p2%
return

SoundBeep:
soundbeep,%p1%,%p2%
return

SoundGet:
soundget,ov,%p1%,%p2%,%p3%
return ov

SoundGetWaveVolume:
soundgetwavevolume,ov,%p1%
return ov

SoundPlay:
soundplay,%p1%,%p2%
return

SoundSet:
soundset,%p1%,%p2%,%p3%,%p4%
return

SoundSetWaveVolume:
soundsetwavevolume,%p1%,%p2%
return

SplashImage:
splashimage,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%
return

SplashTextOn:
splashtexton,%p1%,%p2%,%p3%,%p4%
return

SplashTextOff:
splashtextoff
return

SplitPath:
splitpath,%p1%,r1,r2,r3,r4,r5
return

StatusBarGetText:
statusbargettext,ov,%p1%,%p2%,%p3%,%p4%,%p5%
return ov

StatusBarWait:
statusbarwait,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

StringCaseSense:
stringcasesense,%p1%
return

StringGetPos:
stringgetpos,ov,%p1%,%p2%,%p3%,%p4%
return ov

StringLeft:
stringleft,ov,%p1%,%p2%
return ov

StringLen:
stringlen,ov,%p1%
return ov

StringLower:
stringlower,ov,%p1%,%p2%
return

StringMid:
stringmid,ov,%p1%,%p2%,%p3%,%p4%
return ov

StringReplace:
stringreplace,ov,%p1%,%p2%,%p3%,%p4%
return ov

StringRight:
stringright,ov,%p1%,%p2%
return ov

StringSplit:
stringsplit,%p1%,%p2%,%p3%,%p4%
return

StringTrimLeft:
stringtrimleft,ov,%p1%,%p2%
return ov

StringTrimRight:
stringtrimright,ov,%p1%,%p2%
return ov

StringUpper:
stringupper,ov,%p1%,%p2%
return ov

Suspend:
suspend,%p1%
return

SysGet:
sysget,ov,%p1%,%p2%
return ov

Thread:
thread,%p1%,%p2%,%p3%
return

ToolTip:
tooltip,%p1%,%p2%,%p3%,%p4%
return

Transform:
transform,ov,%p1%,%p2%,%p3%
return ov

TrayTip:
traytip,%p1%,%p2%,%p3%,%p4%
return

URLDownloadToFile:
urldownloadtofile,%p1%,%p2%
return

WinActivate:
winactivate,%p1%,%p2%,%p3%,%p4%
return

WinActivateBottom:
winactivatebottom,%p1%,%p2%,%p3%,%p4%
return

WinClose:
winclose,%p1%,%p2%,%p3%,%p4%,%p5%
return

WinGetActiveStats:
wingetactivestats,r1,r2,r3,r4,r5
return

WinGetActiveTitle:
wingetactivetitle,ov
return ov

WinGetClass:
wingetclass,ov,%p1%,%p2%,%p3%,%p4%
return ov

WinGet:
winget,ov,%p1%,%p2%,%p3%,%p4%,%p5%
return ov

WinGetPos:
wingetpos,r1,r2,r3,r4,%p1%,%p2%,%p3%,%p4%
return

WinGetText:
wingettext,ov,%p1%,%p2%,%p3%,%p4%
return ov

WinGetTitle:
wingettitle,ov,%p1%,%p2%,%p3%,%p4%
return ov

WinHide:
winhide,%p1%,%p2%,%p3%,%p4%
return

WinKill:
winkill,%p1%,%p2%,%p3%,%p4%,%p5%
return

WinMaximize:
winmaximize,%p1%,%p2%,%p3%,%p4%
return

WinMenuSelectItem:
winmenuselectitem,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%,%p10%,%p11%
return

WinMinimize:
winminimize,%p1%,%p2%,%p3%,%p4%
return

WinMinimizeAll:
winminimizeall
return

WinMinimizeAllUndo:
winminimizeallundo
return

WinMove:
if p1 is integer
{
	if p2 is integer
		winmove,%p1%,%p2%
	else
		winmove,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
}
else
	winmove,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

WinRestore:
winrestore,%p1%,%p2%,%p3%,%p4%
return

WinSet:
winset,%p1%,%p2%,%p3%,%p4%,%p5%,%p6%
return

WinSetTitle:
winsettitle,%p1%,%p2%,%p3%,%p4%,%p5%
return

WinShow:
winshow,%p1%,%p2%,%p3%,%p4%
return

WinWait:
winwait,%p1%,%p2%,%p3%,%p4%,%p5%
return

WinWaitActive:
winwaitactive,%p1%,%p2%,%p3%,%p4%,%p5%
return

WinWaitClose:
winwaitclose,%p1%,%p2%,%p3%,%p4%,%p5%
return

WinWaitNotActive:
winwaitnotactive,%p1%,%p2%,%p3%,%p4%,%p5%
return

suspend,permit

}


  • Guests
  • Last active:
  • Joined: --
The link is down ?

Could anybody post it again.

Thanks

trik
  • Members
  • 1317 posts
  • Last active: Jun 11 2010 11:48 PM
  • Joined: 15 Jul 2007
Guest, look at the post above yours.
Religion is false. >_>

reader
  • Guests
  • Last active:
  • Joined: --

The link is down ?

Could anybody post it again.

Thanks

Why not copy and paste it from the post previous to yours here :idea:

JoeSchmoe
  • Members
  • 304 posts
  • Last active: Feb 28 2013 05:39 PM
  • Joined: 17 Feb 2008
I use the code constantly. I have a script that is always running and is always tossing around strings that contain commands (or mini-programs) that are dynamically executed.

I post the following only for your interest. It relies on some other functions that are in my script (most notably "LogLine" and "LogError") and so you'd have to doctor it to use it. Nonetheless, I'm happy to answer questions. If you clean it up, please repost.

Just to be clear: I have NOT commented the code or turned it into a nice and tidy library. I did, however, throw in pared down versions of LogLine and LogError, to make things easier on you. However, I use the code constantly in one of my scripts, and I can attest to the fact that I find it incredibly useful.

;==============================================================================
;   Dynamic Code
;==============================================================================

DynamicInitSub:  ;final backslash is not included, ever.
  PDrive := SubStr(A_Scriptdir,1,1) ":"  ; For portable apps, et
  PortableApps = %PDrive%\aApps\PortableApps
  Active = %A_Desktop%\Active
  VCS = c:\vcs
  Classes = %vcs%\Acad\Classes + RA
  DayToDay = %vcs%\daytoday

  ; $ncmd next command
  VariableNames := "PDrive|PortableApps|AHKDir|ScriptsDir|A_Desktop|Active|Classes|DayToDay"
  . ""
  . "|Rest" ; Fragile.

  Gui, 3:+Resize
  Gui, 3:add, edit, vEditControl r40 t32 t128 W800,
  Gui, 3:add, Button, Default, OK
Return

; Thanks to Jonny, Rajat, and Rickly from http://www.autohotkey.com/forum/viewtopic.php?t=3332 (esp. Jonny)
; subs called from regular (non global mode) functions can see global variables.
exec_cmd(CmdLine, Options="")
  {
  AddLLL("[exec_cmd] Begin")
  global r1,r2,r3,r4,r5,r6,r7,p0,variablenames
  OldAutoTrim := A_AutoTrim
  AutoTrim, On
  CmdLine = %CmdLine%

  If InStr(CmdLine, "$ncm") {
    StringReplace, CmdLine, CmdLine, |, $tmp, All
    StringReplace, CmdLine, CmdLine, $ncm, |, All
    Loop, Parse, CmdLine, |
      exec_cmd(A_LoopField)
    Return
    }

  If (SemiColonLoc := InStr(CmdLine, "`;")) {
    StringLeft, CmdLine, CmdLine, % SemiColonLoc -1
    }

  If (CmdLine="") {
    LogError("Attempted to execute a blank command")
    Return
    }
  ;LogLine("""" CmdLine """")
  IsAFunctionRE = SP)^[a-zA-Z0-9_.]+\(.*\)
  If (RegExMatch( CmdLine, IsAFunctionRE, m))
    {
    StringReplace, CmdLine, CmdLine, (, `,
    StringLeft, CmdLine, CmdLine, InStr(CmdLine, ")",1 ,0)-1
    IsAFunction = 1
    }

  Loop, Parse, CmdLine, `,, %A_Space%%A_Tab%`n`r
    {
    P%A_Index% := ActiveText(A_LOOPFIELD,VariableNames)
    P0 = %A_Index%
    }

  ErrorLevel = 0
  If (IsAFunction)
    Gosub, % "Func" (p0 - 1)
  Else
    If IsLabel(P1) {
      Gosub, %P1%
      If ErrorLevel
        LogError("DX Sub: " P1 ", " P2 ", " P3 ", " P4 ", " P5 ", " P6 ", " P7 "... EL=" ErrorLevel)
      Else
        LogLine("DX Sub: " P1 ", " P2 ", " P3 ", " P4 ", " P5 ", " P6 ", " P7 "...")
    } Else {
      If (InStr(Options, "ProneToTypo"))
        LogLine("DX Sub: No subroutine to jump to. " P1 ", " P2 ", " P3 ", " P4 ", " P5 ", " P6 ", " P7 "...")
      Else
        LogError("DX Sub: No subroutine to jump to. " P1 ", " P2 ", " P3 ", " P4 ", " P5 ", " P6 ", " P7 "...")
      Return 0
      }
  AutoTrim, %OldAutoTrim%
  Return

  ;#include %jarvis%/Misc/JonnyCmds.ahk

Func0:
  ret := %p1%()
  LogLine("DX Func, " P1 " (), Returned """ ret """. EL=" ErrorLevel)
Return
Func1:
  ret := %p1%(p2)
  LogLine("DX Func, " P1 " ( " P2 " ), Returned """ ret """. EL=" ErrorLevel)
Return
Func2:
  ret := %p1%(p2,p3)
  LogLine("DX Func, " P1 " ( " P2 ", " P3 " ), Returned """ ret """. EL=" ErrorLevel)
Return
Func3:
  ret := %p1%(p2,p3,p4)
  LogLine("DX Func, " P1 " ( " P2 ", " P3 ", " P4 " ), Returned """ ret """. EL=" ErrorLevel)
Return
Func4:
  ret := %p1%(p2,p3,p4,p5)
  LogLine("DX Func, " P1 " ( " P2 ", " P3 ", " P4 ", " P5 " ), Returned """ ret """. EL=" ErrorLevel)
Return
Func5:
  ret := %p1%(p2,p3,p4,p5,p6)
  LogLine("DX Func, " P1 " ( " P2 ", " P3 ", " P4 ", " P5 ", " P6 " ), Returned """ ret """. EL=" ErrorLevel)
Return
Func6:
  ret := %p1%(p2,p3,p4,p5,p6,p7)
  LogLine("DX Func, " P1 " ( " P2 ", " P3 ", " P4 ", " P5 ", " P6 ", " P7 " ), Returned """ ret """. EL=" ErrorLevel)
Return


Dir:
  Run, explore %p2%
Return

File:
  IfExist %p2%
    { SplitPath, p2, , Dir
    Run, "%p2%", %Dir%
    }
  Else
    MsgBox, File %p2% does not Exist.
Return

SwitchMode:
  SwitchMode(p2)
Return

FileCopy:
  FileCopy,%p2%,%p3%,%p4%
Return

Gosub:
  Gosub, %p2%
Return

MsgBox:
  If (p3 || p4)
    {
    If p5
      MsgBox,%p2%,%p3%,%p4%,%p5%
    Else
      MsgBox,%p2%,%p3%,%p4%
    }
  Else
    MsgBox,%p2%
Return

ToolTip:
  ToolTip, %p2%
Return

Suspend,Permit
}

ActiveText(String,VariableNames){
  OriginalString = %String%
  Loop, Parse, VariableNames, |
    StringReplace, String, String, % "`%" A_LoopField "`%", % %A_LoopField%, All
  IfEqual, OriginalString, %String%
    Return %String%
  Else
    Return ActiveText(String, VariableNames)
  }

Dynamic:
  exec_cmd(Rest, "ProneToTypo")
Return

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;   Edit Variable
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

EditVar(VarName) {
  global VariableBeingEdited := VarName
  GuiControl, 3:, EditControl, % %VarName%
  Gui, 3:Show,  , Edit Variable
  Hotkey, IfWinActive, Edit Variable ; Must match window title on previous line.
  Hotkey, Tab, SendCTab
  Hotkey, ^Tab, SendTab
  Hotkey, ^s, 3ButtonOK
  Hotkey,  IfWinActive
  }
SendTab:
  Send {Tab}
Return
SendCTab:
  Send ^{Tab}
Return

3ButtonOK:
  Gui, 3:Submit
  If ((VariableBeingEdited = "BaseCL") && (EditControl != BaseCL)) {
    LogLine("You just manually changed the baseCL")
    FileMove, BaseCL.txt, %JarvisDir%\Misc\BaseCL.txt.old, 1
    FileAppend, %EditControl%, BaseCL.txt
    }
  If ((VariableBeingEdited = "Schedule") && (EditControl != Schedule)) {
    ; this is completely a point of failure. If you change the schedule and it trips off the next event, the schedule will be reread from disk, but the changes may not yet have been written. Bummer.
    LogLine("You just manually changed the schedule")
    ScheduleReady = 0
    SetTimer ScheduleReadyNow, 3000
    Schedule := EditControl
    Gosub, WriteSchedule
    Gosub, UpdateNextEvents
    }
  %VariableBeingEdited% := EditControl
  VariableBeingEdited =
Return

ScheduleReadyNow:
  SetTimer, ScheduleReadyNow, Off
  ScheduleReady = 1
Return

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
;   Delayed Execute
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

QueueCommand(Command) {
  global Jarvisdir
  FormatTime, TimeString, , MMMd-H-m-s
  FilePath := JarvisDir "\Delayed\" A_ComputerName  TimeString "." Mod(A_TickCount, 1000)
  FileAppend, %Command%, %FilePath%
  LogLine("[QueueCommand(" Command "):]") ; FilePath=" FilePath)
  }

DequeueCommand(File) {
  FileRead, Command, %File%
  exec_cmd(Command)
  FileDelete, %File%
  LogLine("[DequeueCommand( " SubStr(File,-25,25) " = """ Command """ ):] EL=" ErrorLevel)
  }

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%

LogLine(String){
  local LineNum, FileNow, FullLineFile, DisplayNow, FullLineDisplay

  FormatTime, FileNow,    , MM/dd/yy hht:mm:ss
  FullLineFile := FileNow "." a_msec LineNum "       " String "`n"
  FileAppend, %FullLineFile%, %LocalDir%\Z_Log_%A_ComputerName%.txt

  If (ErrorLevel)
    LogError("LogLine( " String " ) EnCountered EL=" ErrorLevel)
  }

LogError(String){

  FormatTime, FileNow,    , MM/dd/yy hht:mm:ss
  FullLineFile := FileNow "." a_msec  "  Error: " String "`n"
  FileAppend, %FullLineFile%, Z_Log_%A_ComputerName%.txt
  FileAppend, %FullLineFile%, Z_Error_%A_ComputerName%.txt
  TrayTip, Excuse me`, sir. (Error), %String%, 10, 3
  }



It uses the file, JonnyCmds.ahk:
; http://www.autohotkey.com/forum/viewtopic.php?t=3332
; Created by Jonny, with thanks to Rajat for the parsing code.
; Thanks to Rickly for reposting
; Possibly updated by JoeSchmoe

/*
This is a function made for the sole intention of executing other AHK commands. 
It is currently capable of running most AHK commands that are practical to run dynamically. See the full list below. 
The basic idea is that the function will return the OutputVar, if any, or simply execute the given command. 
If there is more than one OutputVar, they are instead stored in the global array "r". (There are 7 variables in the array) 
For instance, ControlGetPos would store X in r1, Y in r2, Width in r3, and Height in r4. 
Also note that ErrorLevel is set globally. 
When a command has one or more OutputVars, those parameters are not just ignored, they're excluded. 
That is, the first parameter of the function (other than the "command" parameter) 
    corresponds to the first non-OutputVar parameter in the command. 
For instance, the first parameter passed when ControlGetPos is the command would correspond to the Control parameter. 
The FutureUse parameter in InputBox is also skipped over this way. 
Maj wrote: Please note at the first post that commands should be specified with commas or they will not be executed. For instance, execute("msgbox") or execute("msgbox sometxt") don't work while execute("msgbox,") do. 
*/

AutoTrim:
autotrim,%p2%
return

BlockInput:
blockinput,%p2%
return

ClipWait:
clipwait,%p2%,%p3%
return

Control:
control,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

ControlClick:
controlclick,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
return

ControlFocus:
controlfocus,%p2%,%p3%,%p4%,%p5%,%p6%
return

ControlGet:
controlget,ov,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return ov

ControlGetFocus:
controlgetfocus,ov,%p2%,%p3%,%p4%,%p5%
return ov

ControlGetPos:
controlgetpos,r1,r2,r3,r4,%p2%,%p3%,%p4%,%p5%,%p6%
return

ControlGetText:
controlgettext,ov,%p2%,%p3%,%p4%,%p5%,%p6%
return ov

ControlMove:
controlmove,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%,%p20%
return

ControlSend:
controlsend,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

ControlSendRaw:
controlsendraw,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

ControlSetText:
controlsettext,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

CoordMode:
coordmode,%p2%,%p3%
return

DetectHiddenText:
detecthiddentext,%p2%
return

DetectHiddenWindows:
detecthiddenwindows,%p2%
return

Drive:
drive,%p2%,%p3%,%p4%
return

DriveGet:
driveget,ov,%p2%,%p3%
return ov

DriveSpaceFree:
drivespacefree,ov,%p2%
return ov

Edit:
edit
return

EnvAdd:
envadd,%p2%,%p3%,%p4%
return

EnvDiv:
envdiv,%p2%,%p3%
return

EnvMult:
envmult,%p2%,%p3%
return

EnvSet:
envset,%p2%,%p3%
return

EnvSub:
envsub,%p2%,%p3%,%p4%
return

EnvUpdate:
envupdate
return

ExitApp:
exitapp
return

FileAppend:
fileappend,%p2%,%p3%
return

FileCopyDir:
filecopydir,%p2%,%p3%,%p4%
return

FileCreateDir:
filecreatedir,%p2%
return

FileCreateShortcut:
filecreateshortcut,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%,%p20%
return

FileDelete:
filedelete,%p2%
return

FileGetAttrib:
filegetattrib,ov,%p2%
return ov

FileGetShortcut:
filegetshortcut,%p2%,r1,r2,r3,r4,r5,r6,r7
return

FileGetSize:
filegetsize,ov,%p2%,%p3%
return ov

FileGetTime:
filegettime,ov,%p2%,%p3%
return ov

FileGetVersion:
filegetversion,ov,%p2%
return ov

FileMove:
filemove,%p2%,%p3%,%p4%
return

FileMoveDir:
filemovedir,%p2%,%p3%,%p4%
return

FileRead:
fileread,ov,%p2%
return ov

FileReadLine:
filereadline,ov,%p2%,%p3%
return ov

FileRecycle:
filerecycle,%p2%
return

FileRecycleEmpty:
filerecycleempty,%p2%
return

FileRemoveDir:
fileremovedir,%p2%,%p3%
return

FileSelectFile:
fileselectfile,ov,%p2%,%p3%,%p4%,%p5%
return ov

FileSelectFolder:
fileselectfolder,ov,%p2%,%p3%,%p4%
return ov

FileSetAttrib:
filesetattrib,%p2%,%p3%,%p4%,%p5%
return

FileSetTime:
filesettime,%p2%,%p3%,%p4%,%p5%,%p6%
return

GetKeyState:
getkeystate,ov,%p2%,%p3%
return ov

GroupActivate:
groupactivate,%p2%,%p3%
return

GroupAdd:
groupadd,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

GroupClose:
groupclose,%p2%,%p3%
return

GroupDeactivate:
groupdeactivate,%p2%,%p3%
return

Gui:
gui,%p2%,%p3%,%p4%,%p5%
return

GuiControl:
guicontrol,%p2%,%p3%,%p4%
return

GuiControlGet:
guicontrolget,ov,%p2%,%p3%,%p4%
return ov

Hotkey:
hotkey,%p2%,%p3%,%p4%
return

IfEqual:
ifequal,%p2%,%p3%
   return 1
else
   return 0

IfNotEqual:
ifnotequal,%p2%,%p3%
   return 1
else
   return 0

IfExist:
ifexist,%p2%
   return 1
else
   return 0

IfNotExist:
ifnotexist,%p2%
   return 1
else
   return 0

IfGreater:
ifgreater,%p2%,%p3%
   return 1
else
   return 0

IfGreaterOrEqual:
ifgreaterorequal,%p2%,%p3%
   return 1
else
   return 0

IfInString:
ifinstring,%p2%,%p3%
   return 1
else
   return 0

IfNotInString:
ifnotinstring,%p2%,%p3%
   return 1
else
   return 0

IfLess:
ifless,%p2%,%p3%
   return 1
else
   return 0

IfLessOrEqual:
iflessorequal,%p2%,%p3%
   return 1
else
   return 0

IfMsgBox:
ifmsgbox,%p2%
   return 1
else
   return 0

IfWinActive:
ifwinactive,%p2%,%p3%,%p4%,%p5%
   return 1
else
   return 0

IfWinNotActive:
ifwinnotactive,%p2%,%p3%,%p4%,%p5%
   return 1
else
   return 0

IfWinExist:
ifwinexist,%p2%,%p3%,%p4%,%p5%
   return 1
else
   return 0

IfWinNotExist:
ifwinnotexist,%p2%,%p3%,%p4%,%p5%
   return 1
else
   return 0

ImageSearch:
imagesearch,r1,r2,%p2%,%p3%,%p4%,%p5%,%p6%
return

IniDelete:
inidelete,%p2%,%p3%,%p4%
return

IniRead:
iniread,ov,%p2%,%p3%,%p4%,%p5%
return ov

IniWrite:
iniwrite,%p2%,%p3%,%p4%,%p5%
return

Input:
input,ov,%p2%,%p3%,%p4%
return ov

InputBox:
inputbox,ov,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,,%p9%,%p20%
return ov

KeyHistory:
keyhistory
return

KeyWait:
keywait,%p2%,%p3%
return

ListHotkeys:
listhotkeys
return

ListLines:
listlines
return

ListVars:
listvars
return

Menu:
menu,%p2%,%p3%,%p4%,%p5%,%p6%
return

MouseClick:
mouseclick,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

MouseClickDrag:
mouseclickdrag,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

MouseGetPos:
mousegetpos,r1,r2,r3,r4,%p2%
return

MouseMove:
mousemove,%p2%,%p3%,%p4%,%p5%
return

OnExit:
onexit,%p2%
return

OutputDebug:
outputdebug,%p2%
return

Pause:
pause,%p2%
return

PixelGetColor:
pixelgetcolor,ov,%p2%,%p3%,%p4%
return ov

PixelSearch:
pixelsearch,r1,r2,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%
return

PostMessage:
postmessage,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
return

Process:
process,%p2%,%p3%,%p4%
return

Progress:
progress,%p2%,%p3%,%p4%,%p5%,%p6%
return

Random:
random,ov,%p2%,%p3%
return ov

RegDelete:
regdelete,%p2%,%p3%,%p4%
return

RegRead:
regread,ov,%p2%,%p3%,%p4%
return ov

RegWrite:
regwrite,%p2%,%p3%,%p4%,%p5%,%p6%
return

Reload:
reload
return

Run:
run,%p2%,%p3%,%p4%,ov
return ov

RunAs:
runas,%p2%,%p3%,%p4%
return

RunWait:
runwait,%p2%,%p3%,%p4%,ov
return ov

Send:
send,%p2%
return

SendRaw:
sendraw,%p2%
return

SendMessage:
sendmessage,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
return errorlevel

SetBatchLines:
setbatchlines,%p2%
return

SetCapslockState:
setcapslockstate,%p2%
return

SetControlDelay:
setcontroldelay,%p2%
return

SetDefaultMouseSpeed:
setdefaultmousespeed,%p2%
return

SetFormat:
setformat,%p2%,%p3%
return

SetKeyDelay:
setkeydelay,%p2%,%p3%
return

SetMouseDelay:
setmousedelay,%p2%
return

SetNumlockState:
setnumlockstate,%p2%
return

SetScrollLockState:
setscrolllockstate,%p2%
return

SetStoreCapslockMode:
setstorecapslockmode,%p2%
return

SetTimer:
settimer,%p2%,%p3%,%p4%
return

SetTitleMatchMode:
settitlematchmode,%p2%,%p3%
return

SetWinDelay:
setwindelay,%p2%
return

SetWorkingDir:
setworkingdir,%p2%
return

Shutdown:
shutdown,%p2%
return

Sleep:
sleep,%p2%
return

Sort:
sort,%p2%,%p3%
return

SoundBeep:
soundbeep,%p2%,%p3%
return

SoundGet:
soundget,ov,%p2%,%p3%,%p4%
return ov

SoundGetWaveVolume:
soundgetwavevolume,ov,%p2%
return ov

SoundPlay:
soundplay,%p2%,%p3%
return

SoundSet:
soundset,%p2%,%p3%,%p4%,%p5%
return

SoundSetWaveVolume:
soundsetwavevolume,%p2%,%p3%
return

SplashImage:
splashimage,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

SplashTextOn:
splashtexton,%p2%,%p3%,%p4%,%p5%
return

SplashTextOff:
splashtextoff
return

SplitPath:
splitpath,%p2%,r1,r2,r3,r4,r5
return

StatusBarGetText:
statusbargettext,ov,%p2%,%p3%,%p4%,%p5%,%p6%
return ov

StatusBarWait:
statusbarwait,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
return

StringCaseSense:
stringcasesense,%p2%
return

StringGetPos:
stringgetpos,ov,%p2%,%p3%,%p4%,%p5%
return ov

StringLeft:
stringleft,ov,%p2%,%p3%
return ov

StringLen:
stringlen,ov,%p2%
return ov

StringLower:
stringlower,ov,%p2%,%p3%
return

StringMid:
stringmid,ov,%p2%,%p3%,%p4%,%p5%
return ov

StringReplace:
stringreplace,ov,%p2%,%p3%,%p4%,%p5%
return ov

StringRight:
stringright,ov,%p2%,%p3%
return ov

StringSplit:
stringsplit,%p2%,%p3%,%p4%,%p5%
return

StringTrimLeft:
stringtrimleft,ov,%p2%,%p3%
return ov

StringTrimRight:
stringtrimright,ov,%p2%,%p3%
return ov

StringUpper:
stringupper,ov,%p2%,%p3%
return ov

Suspend:
suspend,%p2%
return

SysGet:
sysget,ov,%p2%,%p3%
return ov

Thread:
thread,%p2%,%p3%,%p4%
return

ToolTip:
tooltip,%p2%,%p3%,%p4%,%p5%
return

Transform:
transform,ov,%p2%,%p3%,%p4%
return ov

TrayTip:
traytip,%p2%,%p3%,%p4%,%p5%
return

URLDownloadToFile:
urldownloadtofile,%p2%,%p3%
return

WinActivate:
winactivate,%p2%,%p3%,%p4%,%p5%
return

WinActivateBottom:
winactivatebottom,%p2%,%p3%,%p4%,%p5%
return

WinClose:
winclose,%p2%,%p3%,%p4%,%p5%,%p6%
return

WinGetActiveStats:
wingetactivestats,r1,r2,r3,r4,r5
return

WinGetActiveTitle:
wingetactivetitle,ov
return ov

WinGetClass:
wingetclass,ov,%p2%,%p3%,%p4%,%p5%
return ov

WinGet:
winget,ov,%p2%,%p3%,%p4%,%p5%,%p6%
return ov

WinGetPos:
wingetpos,r1,r2,r3,r4,%p2%,%p3%,%p4%,%p5%
return

WinGetText:
wingettext,ov,%p2%,%p3%,%p4%,%p5%
return ov

WinGetTitle:
wingettitle,ov,%p2%,%p3%,%p4%,%p5%
return ov

WinHide:
winhide,%p2%,%p3%,%p4%,%p5%
return

WinKill:
winkill,%p2%,%p3%,%p4%,%p5%,%p6%
return

WinMaximize:
winmaximize,%p2%,%p3%,%p4%,%p5%
return

WinMenuSelectItem:
winmenuselectitem,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%,%p20%,%p21%,%p22%
return

WinMinimize:
winminimize,%p2%,%p3%,%p4%,%p5%
return

WinMinimizeAll:
winminimizeall
return

WinMinimizeAllUndo:
winminimizeallundo
return

WinMove:
if p2 is integer
{
   if p3 is integer
      winmove,%p2%,%p3%
   else
      winmove,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
}
else
   winmove,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%,%p8%,%p9%
return

WinRestore:
winrestore,%p2%,%p3%,%p4%,%p5%
return

WinSet:
winset,%p2%,%p3%,%p4%,%p5%,%p6%,%p7%
return

WinSetTitle:
winsettitle,%p2%,%p3%,%p4%,%p5%,%p6%
return

WinShow:
winshow,%p2%,%p3%,%p4%,%p5%
return

WinWait:
winwait,%p2%,%p3%,%p4%,%p5%,%p6%
return

WinWaitActive:
winwaitactive,%p2%,%p3%,%p4%,%p5%,%p6%
return

WinWaitClose:
winwaitclose,%p2%,%p3%,%p4%,%p5%,%p6%
return

WinWaitNotActive:
winwaitnotactive,%p2%,%p3%,%p4%,%p5%,%p6%
return

This differs from the previous version in that it can handle strings that have multiple commands (i.e. small programs without flow control). It also handles functions rather than just commands. It also handles comments of sorts