RE: InDesign Script that references a script library
RE: InDesign Script that references a script library
- Subject: RE: InDesign Script that references a script library
- From: "Nielsen, Karen S. (Schmidt)" <email@hidden>
- Date: Mon, 20 Jun 2011 12:12:23 -0500
- Thread-topic: InDesign Script that references a script library
Thank you Chris and Ron- Setting the path to “Applications” worked. It is so strange that my CS4 scripts worked and this problem didn’t arise until CS5. So grateful for the help! --------------- Karen Nielsen IT Project Manager schmidt print solutions that deliver ph | 507.775.7308 fx | 507.775.6655 FSC Certified Printer From: applescript-users-bounces+ksnielsen=email@hidden [mailto:applescript-users-bounces+ksnielsen=email@hidden] On Behalf Of Christopher Stone Sent: Friday, June 17, 2011 12:15 AM To: email@hidden Subject: Re: InDesign Script that references a script library On Jun 16, 2011, at 14:54, 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?
______________________________________________________________________ Just guessing but I'd say you've hard-coded your path strings, and this is bound to fail at some point when you play musical machines. ------------------------------------------------------------------------------------------------ set p to "Applications:test.txt" --> Error: Can’t get file "Applications:test.txt" set p to "Thor:Applications:test.txt" --> actual hfs path --> Error: Can’t get file "Thor:Applications:test.txt". set testFilePath to ((path to applications folder) as text) & "test.txt" # This will handle a move to any Mac as long as 'test.txt' is in the Applications Folder. # For my own use I prefer to write this as an implicit coercion: set testFilePath to "" & (path to applications folder) & "test.txt" ------------------------------------------------------------------------------------------------ I generally find it better practice to use 'alias' rather than 'file'. You're only using a partial path here. set oracle_script_path to "Applications:ORACLE:OracleScriptLibraries:FinderLib_Oracle.scpt" So I'm wondering how that's getting resolved and working for you at all. Possibly a relative path? Hmm. Interesting. I can get this to run using both Script Debugger and Smile but not the Applescript Editor: ------------------------------------------------------------------------------------------------ set libPath to "Applications:lib1.scpt" set libPathFile to load script file libPath tell libPathFile to bp(2) on error errMsg number errNum set sep to "==============================" set e to sep & return & "Error: " & errMsg & return & sep & return ¬ & "Error Number: " & errNum & return & sep ------------------------------------------------------------------------------------------------ |
_______________________________________________
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