home *** CD-ROM | disk | FTP | other *** search
- /*
- @BGroupCopyBoxAttr @P@ICopyright Gold Disk Inc., February, 1992
-
- This Genie will copy the attributes of any box to all boxes in the current group.
- */
- parse arg source
-
- cr = '0a'x
- call SafeEndEdit.rexx()
- call ppm_AutoUpdate(0)
-
- box = ppm_GroupFirstBox()
- if box = 0 then exit_msg("Select a group first..")
-
- if source = '' then
- do
-
- source = ppm_ClickOnBox("Click on box which has attributes to be copied..")
- if source = 0 then exit_msg()
-
- call ppm_SelectBox(source)
-
- end
-
- attributes = "Frame"cr"FrameData"cr"Offset"cr"Angle"cr"TextWrap"cr"Hide"cr"Lock"cr"Standoff"cr"Margins"cr"Transparent"cr"Scale"cr"Tabs"cr"Size"cr"Position"
-
- attributes = ppm_SelectFromList("Select attributes to copy..", 30, 5, 1, attributes)
- if attributes = '' then exit_msg()
-
- copy = attributes
-
- counter = 0
-
- do while copy ~= ''
-
- parse var copy itemname '0a'x copy
-
- interpret itemname" = ppm_GetBox"itemname"(source)"
-
- if itemname = "Tabs" then
- istring = "call SetBoxTabs(box, '"Tabs"')"
- else if itemname = "FrameData" then
- do
- parse var FrameData fcolor '0a'x lcolor '0a'x lwght '0a'x lpat '0a'x fpat '0a'x
- istring = "call ppm_SetBoxFrameData(box, fcolor, lcolor, lwght, lpat, fpat)"
- end
- else
- istring = "call ppm_SetBox"itemname"(box, " || separate(value(itemname)) || ")"
-
- counter = counter + 1
- strings.counter = istring
- end
-
- call ppm_ShowStatus("Working..")
-
-
- do while box ~= 0
-
- copy = attributes
-
- do i = 1 to counter
-
- interpret strings.i
-
- end
-
- box = ppm_GroupNextBox(box)
-
- end
-
- exit_msg()
-
- separate: procedure
- do
- parse arg string
-
- output = ''
-
- wrds = words(string)
- if wrds = 1 then return(string)
-
- do i = 1 to wrds - 1
-
- wrd = word(string, i)
-
- if datatype(wrd, n) then
- output = output||wrd","
- else
- output = output"'"word(string, i)"', "
-
- end
-
- output = output || word(string, wrds)
-
- return(output)
-
- end
-
-
- exit_msg: procedure
- do
- parse arg message
-
- if message ~= '' then call ppm_Inform(1,message,)
- call ppm_AutoUpdate(1)
- call ppm_ClearStatus()
- exit
- end
-