Question about Gridlines
Question about Gridlines
I written simple JS to open a File and would like to turn on (make visible) the grid lines as part of the script. I have had no luck finding an example.
Question about Gridlines
From what I tried nothing gets recorded when using the scriptlistener plug-in with this view option?
Question about Gridlines
If you use 'Insert Menu Item' in the action panel you can record showing/hiding the guides. But it is a toggle so you will not know if you are turning them on or off.
But if that is better than nothing you could use xtools to convert the action into javascript.( or check xbytor's stdlib, he may have already done so )
But if that is better than nothing you could use xtools to convert the action into javascript.( or check xbytor's stdlib, he may have already done so )
Question about Gridlines
Thanks Mike. I did what you suggested and it work. Here is the code:
//turn gridlines on/off
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(charIDToTypeID('Mn '), charIDToTypeID('MnIt'), charIDToTypeID('TgGr'));
desc1.putReference(charIDToTypeID('null'), ref1);
executeAction(charIDToTypeID('slct'), desc1, DialogModes.NO);
Thanks again
//turn gridlines on/off
var desc1 = new ActionDescriptor();
var ref1 = new ActionReference();
ref1.putEnumerated(charIDToTypeID('Mn '), charIDToTypeID('MnIt'), charIDToTypeID('TgGr'));
desc1.putReference(charIDToTypeID('null'), ref1);
executeAction(charIDToTypeID('slct'), desc1, DialogModes.NO);
Thanks again