Copy link to clipboard
Copied
HI
I have made a script that passes values into another script and re-saves the new script. This works fine, but I really need to save as a binary version.
Is this possible?
Cheers
Roy
I don't think so.
I would use a different strategy. Write the values to a separate file
and read those in your script.
Harbs
Copy link to clipboard
Copied
I don't think so.
I would use a different strategy. Write the values to a separate file
and read those in your script.
Harbs
Copy link to clipboard
Copied
Ah yes, didn't think of that. That would work fine.
Thanks Harbs!
Copy link to clipboard
Copied
Harbs is right, but if your need is to update some litteral or numeric values in a jsxbin where you have preformatted fields, it is possible to directly encode and re-inject the data within, using elaborately the File.seek and File.write methods with your encoder. You'll find a few clues about this technique here: http://www.indiscripts.com/post/2009/11/can-indesign-script-rewrite-itself
Copy link to clipboard
Copied
I forgot about that post of yours. Really cool stuff!
The fact of the matter is, I think writing small text files is a lot
easier that messing with the script code. You can also use
app.insertLabel very effectively.
Harbs
Copy link to clipboard
Copied
Yep! For most projects jsxbin injection is expensively complex and there is no reason to use it. Actually I only use this technique to watermark a script on the fly from PHP.
@+
Marc