Re: Beginner's scripting Terminal questions
Re: Beginner's scripting Terminal questions
- Subject: Re: Beginner's scripting Terminal questions
- From: Andrew Oliver <email@hidden>
- Date: Wed, 02 Mar 2005 09:31:18 -0800
On 3/2/05 7:16 AM, "Jamie Kahn Genet" <email@hidden> wrote:
[snip]
> Thanks very much for the above info on how to specify the colour and
> transparency of Terminal windows. Just what I needed, cheers :-)
>
> However, your solution almost had me stumped as "set background color of
> window 1 to {65535, 65535, 65535, 0}" caused an error, but "set
> background color to {65535, 65535, 65535, 0}" worked. It took a little
> while before I thought to check the syntax I was using previously when I
> was only specifying simple names of colours, e.g. "black", "red".
>
> Why does including "of window 1" break that line of the script?
My guess is that your original script had the commands in a 'tell window 1'
block whereas my example was standalone - and that does indeed appear to be
the case. A little testing shows that:
tell application "Terminal"
tell window 1
set background color to {65535, 12345, 32767, 16384}
end tell
end tell
works, as does:
tell application "Finder"
set background color of window 1 to {65535, 12345, 32767, 16384}
end tell
but this fails:
tell application "Terminal"
tell window 1
set background color of window 1 to {65535, 12345, 32767, 16384}
end tell
end tell
I'd be inclined to call the 'double tell' failure a bug.
>
> Anyway, cheers again for that invaluable info Apple left out of the
> Terminal's dictionary (or am I simply supposed to know that?).
I don't recall it being documented anywhere in AppleScript's documentation,
and I can't take full credit - I came across some other documentation that
talked about using {R, G, B, A} values and I figured I'd give it a try. I
would half expect that any app using Apple's standard color libraries would
accept an {R, G, B, A} whenever a color is specified.
> One last
> question - do you know how to also include the particular Terminal
> window's kb shortcut as can be set in the Terminal's Window Preferences?
> Once again there's no info in the dictionary (but seeing as other info
> has been left out I wondered nonetheless).
Can't help you there, sorry.
Andrew
:)
_______________________________________________
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