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"
|