home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d178 / rexxarplib.lha / RexxArpLib / rexx / fastmenu.rexx < prev    next >
OS/2 REXX Batch file  |  1989-02-04  |  2KB  |  61 lines

  1. /* this opens a window with buttons which run macros */
  2.  
  3.    call MenuWindow(FASTHOST,FASTPORT)
  4.    call AddMenu(FASTHOST,"Basic Commands")
  5.    call AddItem(FASTHOST,"Quit","quit",Q)
  6.  
  7.    call AddGadget(FASTHOST,6,11,"CALC"," Calculator  ","calc")
  8.    call AddGadget(FASTHOST,6,22,"FLIST"," FileList    ","'address command ""filelist/arexxdu""'")
  9.    call AddGadget(FASTHOST,6,33,"PHONE"," PhoneBook   ","'address command e startup ""phonebook/startphone""'")
  10.    call AddGadget(FASTHOST,6,44,"IBM"," Log IBM     ","'address command runwsh log logibm'")
  11.    call AddGadget(FASTHOST,6,55,"BIX"," For Rent    ","'address command echo for_rent")
  12.    call AddGadget(FASTHOST,6,66,"BOFA"," New CLI     ","'address command newwsh'")
  13.    call AddGadget(FASTHOST,6,77,"DC"," DiskCopy    ","'address command diskcopy'")
  14.    call AddGadget(FASTHOST,6,88,"FM"," Format      ","'address command format'")
  15.    call AddGadget(FASTHOST,6,99,"PMEM"," PHYZMemo    ","'address command runwsh phyzmemo'")
  16.    call AddGadget(FASTHOST,6,110,"PLET"," PHYZLett    ","'address command runwsh phyzlett SLAC '")
  17.    call AddGadget(FASTHOST,6,121,"PPUB"," PHYZPub     ","'address command runwsh phyzpub'")
  18.    call AddGadget(FASTHOST,6,132,"MLET"," MYLett      ","'address command runwsh phyzlett MY '")
  19.    call AddGadget(FASTHOST,6,143,"LENS"," Lens        ","'address command runwsh lens'")
  20.    call AddGadget(FASTHOST,6,154,"TXED"," Edit        ","'address command e'")
  21.    call AddGadget(FASTHOST,6,165,"SCHED"," Reminder    ","'address command setremind'")
  22.  
  23.    call SetNotify(FASTHOST,GADGETUP,REXX)
  24.    call SetNotify(FASTHOST,CLOSEWINDOW,FASTHOST)
  25.    call SetNotify(FASTHOST,MENUPICK,FASTHOST)
  26.  
  27. exit
  28.  
  29. /* MenuWindow.rexx - menu making function */
  30.  
  31. MenuWindow:
  32. arg menuhost, menuport
  33.  
  34. runwsh  "'x=createhost("menuhost||","||menuport||")'"
  35. mp = openport(menuport)
  36. do i = 1 to 2
  37.   address command 'c:WaitForPort 'menuhost
  38.   address command 'c:WaitForPort 'menuport
  39.   xx=showlist('p',menuhost)
  40.   yy=showlist('p',menuport)
  41.   if xx & yy then leave i
  42. end
  43.  
  44. idcmp = 'CLOSEWINDOW+GADGETUP+MENUPICK'
  45. flags = 'WINDOWCLOSE+WINDOWDRAG+WINDOWDEPTH'
  46.  
  47.    call SetReqColor(menuhost,OKAY,1)
  48. /*   call SetReqColor(menuhost,BACK,1)
  49. */
  50.    call SetReqColor(menuhost,SHADOW,0)
  51.    call SetReqColor(menuhost,BLOCK,1)
  52.    call SetReqColor(menuhost,BOX,1)
  53.  
  54. call OpenWindow(menuhost,screencols()-120,screenrows()-186,120,185, idcmp, flags)
  55.    call SetAPen(menuhost,1)
  56.    call SetBPen(menuhost,1)
  57.    call SetDrMd(menuhost,JAM2)
  58.  
  59.  
  60. return 0
  61.