• 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: File Path to URL question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File Path to URL question...


  • Subject: Re: File Path to URL question...
  • From: Bryan Walton <email@hidden>
  • Date: Wed, 7 Feb 2007 17:33:04 -0800

I am very new to AS, but have tried to create a run-only app that would allow a user to select a file or folder in the finder, click the run-only app's icon and have the file/folder's path returned to the clipboard as a clickable URL.  The URL could then be sent to other users on our LAN; allowing them to quickly go-to, or open the file/folder.

Here is the current script:

tell application "Finder"
set aItem to selection as alias
end tell

tell application "Finder" to set theFileURL to URL of aItem
set the clipboard to theFileURL

PROBLEM - "Client Work" compared to "Client Work-2"
Each user has a volume from our G5 XServe (10.4.6) / RAID that is on their desktop, and that is where these file paths lead.  The volume is called "Client Work", and is a share point on the RAID.

file://localhost/Volumes/Client Files-2/

file://localhost/Volumes/Client Files/

When the script is run it will sometimes place the "-2" at the end of the volume name (I'm assuming this has to be related to the alias class specific to the machine the script is run from).  So, naturally-the clickable URL errors when a user from another workstation receives the link and tries to go-to/open.

I can't find a way to get a better file path that would work regardless of what work station the script was run from, or what station is trying to click and go-to.

For now I manually edit the path.

Thanks for any help! 

 _______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: File Path to URL question...
      • From: Malcolm Fitzgerald <email@hidden>
    • Re: File Path to URL question...
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Help with writing to a file --- weird characters.
  • Next by Date: Re: File Path to URL question...
  • Previous by thread: Re: applescript saveas menu action
  • Next by thread: Re: File Path to URL question...
  • Index(es):
    • Date
    • Thread