Re: Scripting THROUGH terminal?
Re: Scripting THROUGH terminal?
- Subject: Re: Scripting THROUGH terminal?
- From: "David A. Cox" <email@hidden>
- Date: Tue, 1 Oct 2002 13:12:13 -0700 (PDT)
Did you try something like
tell application "Terminal"
do script "Command" in window "NAMEOFWINDOW"
end tell
You will need the """ marks in this to make it work.
an example would be:
tell application "Terminal"
do script "ps" in window "PSwindow"
end tell
By the way, where did you find instructions on "how to create a CGI with
AppleScript" at? I am working on what I think is something similar, and
your find might be of help.
On Tue, 1 Oct 2002, Dave Stewart wrote:
>
Greetings list,
>
>
I am a newbie to AppleScript and am trying to automate a company
>
procedure. We are using (or starting to use) the Mac Terminal app (in
>
Jaguar) as an emulator, using telnet to connect to the company server
>
and running the business software through it.
>
>
I want to send commands through the OPENED terminal window to the
>
business software, but can't seem to figure out how to reference the
>
opened terminal. I can send commands to an unnamed window, which causes
>
a new terminal window to be created, but that doesn't help much (unless
>
I decide to try to create the telnet connection in that new window, but
>
I already have the window running when I want the script to run.
>
Closing the window to run the script to reopen the connection seems
>
clumsy, especially since it's not me running the end product but
>
another company employee). How would I reference a terminal window
>
that's already opened on my desktop? We've set the title of the window,
>
but that doesn't seem to do much good (or am I simply missing something
>
important here?) We open the telnet connection using a .term file we've
>
saved, but I don't see how that will help either. I could try using the
>
tty of the process, but 1) that isn't working either and 2) I'm not
>
guaranteed to have the same tty from one day to the next, since the
>
window MAY BE closed after hours and restarted first thing in the
>
morning (not guaranteed, although the connection will be dropped after
>
a timeout).
>
>
I've found docs detailing how to create a CGI with AppleScript, surely
>
what I want to do is much easier than that?!? So what's the trick?
>
>
>
Thanking you all in advance for any help or insight,
>
>
Dave Stewart
>
Aqua-flo (Goleta)
>
email@hidden
>
_______________________________________________
>
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.
_______________________________________________
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.