Im having issues with code below. I inherited the previous designer documents would like to unlock, delete & create margins to the master pages. I'm no an expert but knows a little bit.
tellapplication "Adobe InDesign CS4"
activate
setmyDocumenttodocument 1
tellview preferencesofactive document
--Set horizontal and vertical measurement units to inches.
setruler origintopage origin
sethorizontal measurement unitstoinches
setvertical measurement unitstoinches
endtell
--change margins of the master spread
setmyMasterSpreadtomaster spread 1 ofmyDocument
tellmargin preferencesofpage 1 ofmyMasterSpread
-- page margins and columns.
setleftto ".5" --outside
settopto ".5 in"
setrightto ".75 in" --inside
setbottomto ".75 in"
endtell
--Page margins right master page
tellmargin preferencesofpage 2 ofmyMasterSpread
setleftto ".5" --inside
settopto ".5 in"
setrightto ".75 in" --outside
setbottomto ".5 in"
endtell
--create guides on master pages 1 & 2
--** currently not working
setmyMasterSpreadtomaster spread 1 ofmyDocument
tellguide preferencesofpage 1 ofmyMasterSpread
setguides lockedtofalse
setruler guides colortoorange
--tell page 1 of myDocument
deleteguides
makeguidewith properties {orientation:vertical, location:".25"}
makeguidewith properties {orientation:vertical, location:"7.6875"}
makeguidewith properties {orientation:horizontal, location:".25"}
makeguidewith properties {orientation:horizontal, location:"10.25"}
--end tell
tellguide preferencesofpage 2 ofmyMasterSpread
deleteguides
makeguidewith properties {orientation:vertical, location:".25"}
makeguidewith properties {orientation:vertical, location:"7.6875"}
makeguidewith properties {orientation:horizontal, location:".25"}
makeguidewith properties {orientation:horizontal, location:"10.25"}
endtell
endtell
endtell