home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / HYPERBOOK2.DMS / in.adf / Macros / sample / CloneThisPage < prev    next >
Encoding:
Text File  |  1990-09-02  |  644 b   |  24 lines

  1. /* CloneThisPage - Appends and goes to a clone of the current page, then
  2.    lets the user name it. If the first object on the page is a note, it
  3.    gives the note the same name as the page. This was written to do some
  4.    of the repetitive work in the construction of the ARexx commands
  5.    hyperbook.
  6.  
  7.    (Note that the CP variable refers to a different page after the call
  8.    to gotopage() than it did before.)
  9. */
  10.  
  11. CP = ':'
  12.  
  13. call gotopage(clonepage(CP, 0))
  14.  
  15. name = inputstring('Name this page', getname(CP))
  16.  
  17. call setname(CP, name)
  18.  
  19. ob = objectnumber(CP, 1)
  20.  
  21. if length(ob) > 0 then
  22.    if gettype(ob) == 'Note' then
  23.       call setname(ob, name)
  24.