• 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 Challenge
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript Challenge


  • Subject: Re: AppleScript Challenge
  • From: Emmanuel <email@hidden>
  • Date: Mon, 13 Sep 2004 18:11:13 +0200

At 11:24 AM -0400 13/09/04, Brett Kirksey wrote:
    on makeFinderWindow()
        tell application "Finder"
            set bar to make new Finder window
            return bar
        end tell
    end makeFinderWindow

    set newWindow to makeFinderWindow() of application "Foo"
    tell application "Finder" to close newWindow

I'm unable to say whether this is a bug, a feature, or a nice behavior, however your script must carry public quantities. My workaround would be:


    on makeFinderWindow()
        tell application "Finder"
            set bar to make new Finder window
            return id of bar
        end tell
    end makeFinderWindow

    set newWindow to makeFinderWindow() of application "Foo"
    tell application "Finder" to close window id newWindow

Emmanuel

PS
The first post was in my mailbox for "interesting, shall reply, but need some thinking and/or testing" :-)
_______________________________________________
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
References: 
 >AppleScript Challenge (From: Brett Kirksey <email@hidden>)

  • Prev by Date: Re: Largely Irrelevant...
  • Next by Date: Re: Chevrons test
  • Previous by thread: Working with Clipping Paths in Quark 6
  • Next by thread: Extract text from email
  • Index(es):
    • Date
    • Thread