Here is a function you can use to place guides. It can be used like any function and does not need to be loaded as a action.
function setGuide(pxOffest, orientation){
var desc = new ActionDescriptor();
var desc1 = new ActionDescriptor();
desc1.putUnitDouble( charIDToTypeID( "Pstn" ), charIDToTypeID( "#Pxl" ), pxOffest );
desc1.putEnumerated( charIDToTypeID( "Ornt" ), charIDToTypeID( "Ornt" ), charIDToTypeID( orientation ) );// "Vrtc" or "Hrzn"
desc.putObject( charIDToTypeID( "Nw " ), charIDToTypeID( "Gd " ), desc1 );
executeAction( charIDToTypeID( "Mk " ), desc, DialogModes.NO );
};
setGuide(150, "Vrtc");
... View more