script - add a blank line to a menu
I am using a variation of @Russ Ward 's 100.04 Favorites menu from here: http://www.weststreetconsulting.com/WSC_ExtendScriptSamples.htm
I modifed the script to change the order and to display and run macros rather than opening favorite documents.
The script reads a text file where each line contains script name displayed, followed by ~~~~, followed by path to script, i.e.
My script~~~~<Path to My Script>
It works fine, but I would like to put two BLANK lines between commonly used scripts and rarely used scripts. I don't want separator, I want blank lines ... (The script adds separators and that works well).
If I try (in the text file) " ~~~~~ "", the script changes that to a separator in the drop-down menu.
If I use "<br>~~~~A", the script displays "<br>" in the drop-down.
If I use "_~~~~A", the script displays "&&&&_" in the drop-down - not sure where the "&'s" come from.
If I "<br>~~~~A", and then in the define macros code I add:
{
var file = new File(macrosFilePath);
if(file.exists)
{
file.open("r");
while(!file.eof)
{
var line = trim(file.readln());
// var line = file.readln();
if(line != "" && line.indexOf(";") != 0)
{
var args = line.split("~~~~");
var macro = new Array(2);
macro[0] = args[0];
macro[0] = macro[0].replace("<br>", " ");
if(args.length > 1)
macro[1] = args[1];
else macro[1] = "";
macros.push(macro);
}
}
}
I get "&&&&&&" in the drop-down, so somewhere it is substituting &'s for blank spaces.
I'll use "N/A" for now, but I'd prefer a completely blank line.
