//////////////////// // This script allows to atach a text information ( annotation ) to // any selectable PageMaker object. Script also allows to // edit,save and retrieve the annotation. // Script uses new type of the control: 'editwin' // Apply the script when an object is selected. // Vladimir Samarskiy, December 97 //////////////////// getscriptver >> ver if empty(ver) message "Sorry, the script can not run on this version of the script engine." return endif if ver < 3.5 message "Sorry, the script can not run on this version of the script engine." return endif /////////////////// try getselectidlisttop >> N,id,.. if not(N=1) message "Select just one object, please." return endif CR = Quote(ascii(13,10)) memo = try getprivatestring "Vlad","Memo",classobject,0,id >> ...,sN if empty(sN) memo = "" goto freshObj endif N = UnQuote(sN) loop n = 1,N try getprivatestring "Vlad","Memo",classobject,n,id >> ...,line break empty(line) memo = memo,line endloop memo = memo*CR label freshObj dialogbegin -80,-80,80,50,"Object annotation." pushbutton 20,100,70,120,"OK" pushbutton 90,100,140,120,"Cancel" editwin 5,5,155,95,memo dialogend >> buttonHit,...,...,memo,... if not(buttonHit="OK") return endif memo = memo/CR N = len(memo) loop n = 1,N set memo >> line,memo privatestring "Vlad","Memo",classobject,n,1,id,1,line endloop privatestring "Vlad", "Memo", classobject, 0, 1, id, 1, ""(N) return