• 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: InDesign Script that references a script library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InDesign Script that references a script library


  • Subject: Re: InDesign Script that references a script library
  • From: Ron Hunsinger <email@hidden>
  • Date: Thu, 16 Jun 2011 15:13:28 -0700


On Jun 16, 2011, at 12:54 PM, Nielsen, Karen S. (Schmidt) wrote:

I can successfully run the script on my Mac but when tried on other Macs with the same setup, the library reference fails.  Any ideas?

 

set oracle_script_path to "Applications:ORACLE:OracleScriptLibraries:FinderLib_Oracle.scpt"

set my_o_script_variable to load script file oracle_script_path

set IDscriptPath to "Applications:ORACLE:OracleScriptLibraries:IDCS5_SL_Oracle.scpt"

set IDscriptLib to load script file IDscriptPath

That actually works on your Mac?

Remember, the rule for HFS-style paths is: if the path contains no colons, or begins with a colon, it's a relative path. Otherwise, it's an absolute path whose first component is a volume name.

That path is looking for a file on volume "Applications". The only way I can think of that it would reach the file you think it's reaching is if you have a symlink at /Volumes/Applications that points to /Applications.

OK, there's another way it can work that I hadn't thought of. It turns out that "POSIX path of ..." looks for a volume with the given name, and if it can't find one assumes you meant a top level folder on the boot volume. That is, it'll return /Applications/... instead of /Volumes/Applications/... if /Volumes/Applications doesn't exist. (Tested and confirmed on 10.4.11 and 10.6.7.) I assume "POSIX path of ..." and "load script ..." share some common code.

Still, that's chancy, because the determination which way to interpret it is made at run time. What if, perhaps through File Sharing, your user has mounted a volume at /Volumes/Applications. *Your* code will try to load *your* library from *their* volume. You can hope it'll fail, but what if it doesn't?

You'd be safer to write:

set oracle_script_path to (path to applications folder as text) & "ORACLE:OracleScriptLibraries:FinderLib_Oracle.scpt"


 _______________________________________________
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: 
 >InDesign Script that references a script library (From: "Nielsen, Karen S. (Schmidt)" <email@hidden>)

  • Prev by Date: InDesign Script that references a script library
  • Next by Date: Re: InDesign Script that references a script library
  • Previous by thread: InDesign Script that references a script library
  • Next by thread: Re: InDesign Script that references a script library
  • Index(es):
    • Date
    • Thread