Re: Scripting Terminal.app
Re: Scripting Terminal.app
- Subject: Re: Scripting Terminal.app
- From: Philippe GRUCHET <email@hidden>
- Date: Sun, 27 Apr 2003 18:01:28 +0200
From: Jean-Baptiste LE STANG <email@hidden>
tell application "Terminal" to make new window at the end of windows
From: John Baltutis <email@hidden>
In SE 2.0, OS X 10.2.5, AS 1.9.1, if Terminal is not running, it
launches Terminal, and reports the result as:
->window id 596 of application "Terminal"
run the script with Terminal running and it reports:
->window id 602 of application "Terminal"
run it again and get a new id result.
However, click on the menu item Window and see there is only one
window present. Bottom line. It launches Terminal and opens a window
if Terminal is not running. When running, it doesn't do anythiing
except return a new window id in the result, but the new windows don't
exist. Maybe I'm just missing something here.
You're right John! 'make new window' doesn't match the Terminal's
dictionary.
Sorry Jean-Baptiste ;-)
John Delacour suggested:
tell application "Terminal" to do script "What now, then?"
Another basic example:
------------------------------------
set theScript to "put here a legal shell script"
tell application "Terminal"
activate
do script "" --> make new front window
set front window's position to {1097, 0}
do script theScript in front window
delay 1
set front window's name to "Glups!"
end tell
------------------------------------
I previously posted:
It's also possible to use System Events to create a new shell window:
------------------------------------
tell application "Terminal"
activate
-- in one line/no break:
tell application "System Events" to click application process
"Terminal"'s menu bar 1's menu 3's menu item 1
end tell
------------------------------------
Kind regards,
Philippe/SVM Mac
http://svmmac.logitheque.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.