It's enough that it would be compatible with cc18 and newer.
This code always returns true even if guides are hidden (cc21)
Code: Select all
var r = new ActionReference();
r.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "guidesVisibility" ) );
r.putEnumerated( charIDToTypeID( "Dcmn" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
var guides_is_visible = executeActionGet(r).getBoolean(stringIDToTypeID("guidesVisibility"));
alert(guides_is_visible);