Re: title of window 1 as text
Re: title of window 1 as text
- Subject: Re: title of window 1 as text
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 18 Jan 2005 21:00:57 -0800
On 1/18/05 8:47 PM, "Robert Poland" <email@hidden> wrote:
> I have a script run from Tex-Edit Plus that I want to either read a
> title or look for "contains" of/in a file of undefined name.
>
> tell application "Tex-Edit Plus"
> if (title of window 1 as text) contains "index1.html" then
> set index1Flag to true
> snip...
So what's the problem?
'title' is always going to be text so you don't have to say 'as text'. Just
possibly TE+ thinks you're trying to coerce 'window 1 as text' - since you
didn't use enough parentheses. If so, that would error.
Otherwise, you're setting a variable index1Flag to true. Do you ever set it
to false (perhaps initially) in other cases? If not, the variable will be
undefined in those cases and you'll get an error.
So what error are you getting, and on what line?
--
Paul Berkowitz
_______________________________________________
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