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

Getting file paths


  • Subject: Getting file paths
  • From: Killobit <email@hidden>
  • Date: Wed, 28 Sep 2005 04:03:01 -0700

hello list,

I've constructed the following AS:

tell application "Finder"
    set thePath to URL of container of item 1 of front window
    return thePath
end tell

which gets the path of the current (read front most) Finder window,
but it has 2 major flaws

1. it fails if no Finder windows are open
2. if fails if the front Finder window has no files in it

I was wondering, how could i fix that so it will "always" work

i've tried checking to see if the "current window" is "desktop window" but
i keep getting "Can't get finder window 1" errors


any and all help is appreciated
thanks in advance
Eric
_______________________________________________
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


  • Follow-Ups:
    • Re: Getting file paths
      • From: Jay Louvion <email@hidden>
  • Prev by Date: Re: multiple text delimiters
  • Next by Date: Re: Getting file paths
  • Previous by thread: Re: Object inheritance question, pt 2...
  • Next by thread: Re: Getting file paths
  • Index(es):
    • Date
    • Thread