Send script to a certain Terminal window
Send script to a certain Terminal window
- Subject: Send script to a certain Terminal window
- From: Gnarlodious <email@hidden>
- Date: Thu, 03 Feb 2005 11:18:33 -0700
I'm trying to send commands repeatedly to a certain open Terminal window.
If the window already exists, I write to that window, if it doesn't, I
create the window and remember the filespec for future use.
It works as expected on firstrun, but subsequent runs sends this error:
Can't make window id 7103 of application "Terminal" into a vector.
What's causing this error? How do I tell Terminal to run a script in this
filespec?
set cmd to "date"
set instanceName to "Applescript result"
property windowName : "" -- to instanceName & " bash"
tell application "Terminal"
activate
if windowName is not in windows then
-- make the window
do script "echo " & instanceName
tell front window to set custom title to instanceName
set windowName to item 1 of windows
end if
do script cmd in windowName
end tell
--
Cosmetic Justice; when the Botox gives you Mad Cow Disease
-- Gnarlodious
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden