Calling and evaluating scripts on a Mac

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

I am trying to set up a script that calls a custom pallete. I want to have a small script that resides in the startup folder and calls another script that actually creates the palette. I want to be able to adjust and update the palette without having to copy the script to all my artists here. I can get the script to call on a PC but it doesn't seem to function on a Mac for some reason.

This is my preload script, it's almost the same thing as Paul's "my_custom_palette.jsx"

{
var scriptLoc = Folder.current;
var newPath = scriptLoc.absoluteURI + "/Snap5Palette.jsx";
var builderFile = new File(newPath);
builderFile.open();
eval(builderFile.read());
builderFile.close();
alert(builderFile);
}

The alert gives the correct path/name on a mac, it just doesn't load the script. I can run the Snap5Palette.jsx script independantly however. Anyone keen on Mac scripting?

Thanks.
Post Reply