Now I remember why I needed all that long long script :-(. It looks
like, your version will produce one extra empty Terminal window in
case when Terminal application was not running.
set tCommands to "osascript -e 'say \"Hallo Andrei\"'; cd /; ls -ls"
tell application "Terminal"
activate
if (not (exists front window)) then
-- Use either one of the two 'tell application "System Events" ...'
lines below.
--tell application "System Events" to tell process "Terminal" to
click menu item "New Shell" of menu "File" of menu bar item "File" of
menu bar 1
tell application "System Events" to tell process "Terminal" to
keystroke "n" using command down
delay 1 -- Adjust the delay value accordingly.
end if
do script tCommands in the front window
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden