It depends a bit on how you are distributing (Addons/ZXP/JSX) and running (Scripts-menu, Flash/HTML-Panel), but have you considered
- Put the customizable part to a text file, deliver it with your script and read the settings from your binary.
- Put the customizable part to web server to be downloaded once (even Dropbox.
- Split your script in plaintext and binary parts and eval the plaintext
Me too, I would suggest the first workaround Matias mentioned.
In case you want to keep everything simple on one file only, just cut the first X lines (do not save), export as binary, open the binary file, wrap everything with eval(""); add backslashes on carriage returns and then eventually paste back the X lines on top.
You'll end up with something like:
var a = "ABCD", b = "_1975"; // ================================= // = Do not modify the lines below = // ================================= eval("@JSXBIN@ES@2.0@MyBbyBn0ALJCnASzGiNiPiEiViMiFByBneHiQiTiVjUjJjMjTffJEnAUzCjcjcCEX\ zOjIjBjTiPjXjOiQjSjPjQjFjSjUjZDfXzGjHjMjPjCjBjMEfjzBhEFfRBVBfyBffENyBnAMEbyBn0A\ ... 2jRCn0ABJ2jRCnAFeGjDjBjOjDjFjMAGjN40BiAjC4B0AiAB4C0AiA2hOB4D0AiAjB4E0AiA2hPB4F0\ AiAAGAGByB");
Mind you, if you happen do distribute that on Adobe Add-ons as a part of an extension, the fact you let users modify a deployed file would cause the signing/timestamping check to fail -> as a result the panel will display as blank.