home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxhll.zip / HOSTOVVM.REX < prev    next >
OS/2 REXX Batch file  |  1993-10-18  |  1KB  |  59 lines

  1. /* #include <HostOVVM.rex> */
  2.  
  3. /**
  4. *** ┌──────────────────────────────────────────────────────────────────────┐
  5. *** │                  Host Routines for OfficeVision/VM                   │
  6. *** └──────────────────────────────────────────────────────────────────────┘
  7. **/
  8.  
  9.  
  10. HostOVVMPageDown: procedure expose Screen. Host.
  11.    /**
  12.    ***  This will page down to the next screen and refresh the Screen.
  13.    ***  stem variable with the new screen.
  14.    **/
  15.  
  16.    code = hllapi('Sendkey', '@a')
  17.    rc = hllapi('Wait')
  18.    call HostScreenToStem
  19.    return
  20.  
  21. HostOVVMUploadNote: procedure expose MsgQ.
  22.    /**
  23.    ***  This will upload a file to an OV/VM note.
  24.    **/
  25.  
  26.    parse arg HostSession file
  27.  
  28.    call HostLoadUploadFile file
  29.  
  30.    /* Upload the information to the host */
  31.  
  32.    Host.        = ''
  33.    Host.Session = HostSession
  34.  
  35.    call HapiLoadFunctions
  36.    call HapiConnect
  37.  
  38.    call HostGetScreenSize
  39.    call HostGetCursorPos
  40.  
  41.    LastRow = Screen.Rows - 2
  42.  
  43.    do i = 1 to Upload.0
  44.  
  45.       if Upload.i = '' then  /* Space past blank lines */
  46.          y = y + 1
  47.       else
  48.          code = hllapi('Sendkey', Upload.i)
  49.  
  50.       if y >= LastRow then
  51.          call HostOVVMPageDown
  52.  
  53.       code = hllapi('Sendkey', "@T")
  54.       call HostGetCursorPos
  55.    end /* do */
  56.  
  57.    call HapiDisconnect
  58.    return
  59.