This thread didn't catch my interest until just now. The problem with
tell application "Grog"
glog("xxx")
end tell
is that you are telling the application "Grog" to run, which you
don't want.
You want to open it without executing the run handler. You want to
write this ...
tell application "Grog"
launch
glog("xxx")
end tell
Or, you may also write ...
launch application "Grog"
tell application "Grog"
glog("xxx")
end tell
I was trying to find a script where I think I used this once, but no
luck. If my memory is correct, the command 'launch application ... '
allows you to use a full path to the application, which is nice if
the application you are launching is stored in the calling
application's bundle.