RE: Open Windows.
RE: Open Windows.
- Subject: RE: Open Windows.
- From: "Script2" <email@hidden>
- Date: Tue, 15 Jul 2008 12:15:16 -0400
- Importance: Normal
I could have a script which will check for open windows by applications.
Your script for TextEdit and AppleWorks worked. Thanks.
Hope someone will be able to help with Illustrator.
Ruby
-----Original Message-----
From: applescript-users-bounces+script2=email@hidden
[mailto:applescript-users-bounces+script2=email@hidden]
On Behalf Of KOENIG Yvan
Sent: Tuesday, July 15, 2008 11:54 AM
To: Applescript Users
Subject: Re: Open Windows.
Le 15 juil. 2008 à 17:38, Script2 a écrit :
> I have a Mac (OS 10.3) which I have set aside just to run scripts.
> I don't
> why but at times several windows are left open without an error
> message. The
> open windows are of different applications.
>
> 1. Why does this happen (if it happens all the time then I know there
> is a bug in script, this happen occasionally. Once I had 3 text
> edit, 7
> illustrator and 4 Appleworks windows open)
> 2. How do I check within a script if any windows are open and close
> without saving and for Illustrator to close without saving clipboard.
>
>
It would not be an easy task as each program has its own syntax to
close a document without saving it.
For AppleWorks for instance, it is
tell application "AppleWorks 6"
set ld to every document
repeat with d in ld
close d without saving
end repeat
end tell
For TextEdit, it would be:
tell application "TextEdit"
set ld to every document
repeat with i from (count of ld) to 1 by -1
close (item i of ld) saving no
end repeat
end tell
I don't know the Illustrator's dictionary.
Yvan KOENIG (from FRANCE mardi 15 juillet 2008 17:53:34)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
tern.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden