home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / ctrlhe / CTRLHELP.OPL < prev    next >
Text File  |  1992-07-07  |  948b  |  42 lines

  1. PROC ctrlhelp:
  2.     local cnt
  3.  
  4.     launchh:
  5.     cnt=0
  6.     do
  7.         cnt=cnt+1
  8.         dInit "Busy..."
  9.         dText "","(display number "+num$(cnt,6)+")",2
  10.         dText "","Press HELP for Help",2
  11.         dText "","Press ESC to Quit",2
  12.     until dialog=0
  13. ENDP
  14.  
  15. PROC launchh:
  16. REM launches DoHelp subprocess
  17.     local helpnm$(128),cmdl$(128)
  18.     local off%(6)
  19.     local ret%
  20.     local hpid% :rem pid of subprocess
  21.     local pid% :rem pid of this process
  22.     helpnm$=parse$("dohelp.opo",cmd$(1),off%())
  23.     if not exist(helpnm$)
  24.         print "File does not exist"
  25.         print helpnm$
  26.         get
  27.         stop
  28.     endif
  29.     cmdl$="ORunOpl"+chr$(0)+chr$(0)+helpnm$+chr$(0)
  30.     helpnm$="rom::sys$prgo"+chr$(0)
  31.     ret%=call($0187,addr(helpnm$)+1,addr(cmdl$),0,0,addr(hpid%))
  32.     if ret%<0
  33.         print "Couldn't start DoHelp subprocess"
  34.         print err$(ret%)
  35.         get
  36.         stop
  37.     endif
  38.     pid%=call($0088,0,0,0,0,0) :rem ProcId
  39.     call($92,hpid%,2,0,addr(pid%),$28) :rem ProcCopyToById
  40.     call($0688,hpid%,0,0,0,0) :rem ProcResume
  41. ENDP
  42.