Hi
I have a complex run command. The program is named foogoo. The parameter string is long and twisted. Here's the full thing:
Code:
foogoo C: "L:\aaa documents by DoxMonger\Cee on Stan-Tower\documents starting 2009-11-17\$DISK Treasure $YEAR-$MONTH-$DAY Funny.MBA" -funny"L:\aaa documents by DoxMonger\Cee on Stan-Tower\documents starting 2009-11-17\C Treasure 2009-11-17 Wacky.PhD" -why -not -be -rich > "L:\aaa documents by DoxMonger\Cee on Stan-Tower\documents starting 2009-11-17\C Treasure 2009-11-19 Spungy.iou"
What is the best way to execute that from an AHK script ?
I had problems with the param string with the Run command. I tried escape chars and multiple double-quotes and this and that, but got nowhere. So what I'm doing now -- it's a bit oogly, but it works -- is opening a comspec window, and sending the command string into it, then sending an Enter key. Like this:
Code:
run %comspec% /k,,,cmdWndwPID
Sleep 1000
send %gdBackupCmdStr%
send {Enter}
WinMinimize, ahk_pid %cmdWndwPID%.
I'm thinking there's got to be a way to do this that's cleaner and more reliable. But maybe not. Hey, I'm a noob !!! Any thoughts ??
thx
-- stan