Code: Select all
doThis=
(
Run, notepad.exe
WinWaitActive, ahk_exe notepad.exe
Send,^v
Sleep, 1000
send,^a
Sleep, 500
send,^x
Sleep, 200
WinKill,A
)
^!v::
callCommandsFromVariableFunction(%doThis%)
return
callCommandsFromVariableFunction(commands)
Loop,Parse,commands,`n
{
;the following lines should execute each line of the variable as a command
StrSplit(A_Loopfield,",")
'execute', % A_Loopfield[1]
'with parameters', %A_Loopfield[2]
}
I read this viewtopic.php?t=24480, where Exaskryz said it is not possible. I was wondering and hoping that it may not be unachievable.