Re: Script to make a new window in Smile if there is not one open
Re: Script to make a new window in Smile if there is not one open
- Subject: Re: Script to make a new window in Smile if there is not one open
- From: Emmanuel <email@hidden>
- Date: Sat, 21 Jun 2003 10:43:34 +0200
At 10:59 AM +1000 21/06/03, Timothy Bates wrote:
>
Hi, I am scripting Smile (2.5.2) and wanting to have the script say "if
>
there isn't a script window open , then make one, otherwise add this to the
>
current window".
>
>
However, even when I have no windows open (running the script from smile's
>
script menu), the statement "set theDocument to script window 1" never
>
fails. What is the correct code to detect if the user has already opened a
>
script window?
Thanks, Tim. This is a bug of Smile, sorry for that. You have to use:
------------------------------
set theDocument to first window whose class is script window
------------------------------
(About that, note that "text window 1" never fails because even if you don't see a text window the Console is open and invisible)
Emmanuel
_______________________________________________
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.