• 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: Getting a File Reference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a File Reference


  • Subject: Re: Getting a File Reference
  • From: Yvan KOENIG via AppleScript-Users <email@hidden>
  • Date: Tue, 7 Jan 2020 22:40:33 +0100


Le 7 janv. 2020 à 22:29, Yvan KOENIG <email@hidden> a écrit :

Hello

Happy new year to all of you.

«class furl» apply not only to paths defined as strings but to paths defined as
aliases

set theItem to "SSD 1000:Users:**********:Desktop:resources Catalina:" --> "SSD
1000:Users:**********:Desktop:resources Catalina:"
set theFurl1 to theItem as «class furl» --> file "SSD
1000:Users:**********:Desktop:resources Catalina:"

set theItemA to theItem as alias --> alias "SSD
1000:Users:**********:Desktop:resources Catalina:"
set theFurl2 to theItemA as «class furl» -->file "SSD
1000:Users:**********:Desktop:resources Catalina:"

set thePOSIXPath to POSIX path of theItem -->
"/Users/**********/Desktop/resources Catalina/"
set theFurl3 to thePOSIXPath as «class furl» --> file "SSD
1000:Users:**********:Desktop:resources Catalina:"

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) mardi 7
janvier 2020  22:26:17



> Le 7 janv. 2020 à 21:55, Jim Underwood via AppleScript-Users
> <email@hidden
> <mailto:email@hidden>> a écrit :
>
> (was Re: Place file command in InDesign 2020 doesn't seem to work)
>
> Shane, thanks for posting this method.
>
> To clarify and expand, after some testing this looks like a very good method
> that handles both HFS and POSIX paths, and both new and existing files.
> Here's my little write-up  on it:
>
> «class furl»
> Create a file reference to a new or existing file outside of App's scope
> set fileRef to "<HFS or POSIX path>" as «class furl»
> Examples:
> set fileRef to "Macintosh HD:Users:YourUserName:Documents:New File.txt" as
> «class furl»
> set fileRef to "/Users/YourUserName/Documents/TEST/New File.txt" as «class
> furl»
>
>
>
> On 6 Jan 2020 - wk 2, at 23:33, Shane Stanley <email@hidden
> <mailto:email@hidden>> wrote:
>
>
> A third is to use a «class furl» object or alias created outside InDesign's
> scope:
>
> set pic to "Macintosh_HD:Users:bertus:Documents:Applescript:DEEN:HIGHRES
> IMAGES:91969 - Hutspot 500 gram-KLEIN.tif" as «class furl»
>
>
> My strong personal preference would be the third way, moving the creation of
> the file object outside InDesign's scope.
>
> --
> Shane Stanley <email@hidden <mailto:email@hidden>>
> <www.macosxautomation.com/applescript/apps/
> <http://www.macosxautomation.com/applescript/apps/>>, <latenightsw.com
> <http://latenightsw.com/>>
>


 _______________________________________________
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: 
 >Getting a File Reference (From: Jim Underwood via AppleScript-Users <email@hidden>)

  • Prev by Date: Getting a File Reference
  • Next by Date: Re: Getting a File Reference
  • Previous by thread: Getting a File Reference
  • Next by thread: Re: Getting a File Reference
  • Index(es):
    • Date
    • Thread