• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript Editor and its windows.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript Editor and its windows.


  • Subject: Re: AppleScript Editor and its windows.
  • From: Shane Stanley <email@hidden>
  • Date: Sun, 23 Mar 2014 12:10:10 +1100

On 23 Mar 2014, at 4:27 am, koenig.yvan <email@hidden> wrote:

tell application "AppleScript Editor"
name of windows whose visible is true
--> {"100titre.scpt"}
name of windows whose miniaturized is true
--> {"Historique des événements", "Sans titre"}
name of windows whose visible is false
--> {"grab recently modified v6.scpt", "Historique des événements", "Create ITP from Client's Mail-Conversation Inquiry.scpt", "Sans titre", "Sans titre 2", "Sans titre", "Create ITP from Client's Mail-Conversation Inquiry copy 20140322.scpt", "Create ITP from Client's Mail-Conversation Inquiry.scpt", "Sans titre", "Sans titre 2", "Sans titre 2", "Create ITP from Client's Mail-Conversation Inquiry 20140322 YK.scpt"}

What is puzzling is what is returned as list of windows whose visible is false.
The name which I put in bold is the minimized one. The others are in fact those which were opened today but are now closed.

Designed feature or funny bug ?

Well it's a bug, but an interesting one -- at least to me.

When I first added scriptability to AppleScriptObjC Explorer 2, I saw the same thing happening. At the time I thought it might be a problem with garbage collection not releasing the windows when they were closed, or something I was doing wrong. The list is supplied by a simple method all applications have, orderedWindows, and it's there explicitly for use in scripting. In the end I couldn't track down the problem (and I spent a long time on it), so I simply overrode orderedWindows with my own version that returned the correct result. When I wrote ASObjC Explorer for Mavericks, I didn't have the problem any more, so I wondered whether it was just a result of the previous version using garbage collection. Whatever.

My real point is that it suggests the problem is with the built-in method, which means it could well behave the same in other scriptable apps. So from that point of view, it's definitely worth reporting as a bug.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >AppleScript Editor and its windows. (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: AppleScript Editor and its windows.
  • Next by Date: Re: AppleScript Editor and its windows.
  • Previous by thread: AppleScript Editor and its windows.
  • Next by thread: Re: AppleScript Editor and its windows.
  • Index(es):
    • Date
    • Thread