home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************/
- /* Rose Media Connection Script */
- /* */
- /* This script is a PMComm 1.09 Rexx script for connecting to Rose */
- /* Media. It will automatically open the Rose Mail door, upload */
- /* any reply packet that may be in your \dlx directory, and */
- /* download messages. */
- /* */
- /* Note: If both a reply packet and mail packet exist on your */
- /* system, the reply packet will be uploaded and deleted, */
- /* but a message packet will not be downloaded. */
- /* If a message packet only already exists, it will be */
- /* deleted, and a new packet downloaded. */
- /* This behaviour can be changed easily if desired, but I */
- /* like it that way! */
- /* */
- /* N.B.: This script requires the Rexx Utilities from */
- /* Pedagogic Software */
- /* W. David Ashley */
- /* 5 Timberline Dr. */
- /* Trophy Club, Tx 76262 */
- /* in order to work. These are available on Rose as */
- /* REXUTL21.ZIP in their most recent incarnation. */
- /********************************************************************/
-
- Signal ON SYNTAX NAME SYNTAX_ERROR
-
- Parse arg port portname screen_handle dde_output dde_input semaphore
- Parse source . . fn .
-
- /* This function registers the init_dll function with REXX. The */
- /* init_dll function will register the rest of the functions in */
- /* the rxpmcomm.dll. */
-
- Call RxFuncAdd "init_dll","RxPmcomm","init_dll"
- call RxFuncAdd 'RexFileExist','RexxUtil','RexFileExist'
- call RxFuncAdd 'RexDelete','RexxUtil','RexDelete'
-
- /* Required before any other rxpmcomm.dll functions are called. */
- Call init_dll
- cr = '0d'x
- crlf = '0a0d'x
- Call read_timeout "600000",port
-
- Call wait_fore "ter)=no? ","raw",port,screen_handle
- Call put_s "n q ns",port
- Call wait_fore "st name? ","raw",port,screen_handle
- Call put_s "tom koschate c0venant",port
- Call wait_fore "er)=yes? ","raw",port,screen_handle
- Call put_s "n",port
- Call wait_fore "Command? ","raw",port,screen_handle
- Call put_s "open 1",port
- Call wait_fore "?=help): ","raw",port,screen_handle
- if RexFileExist('c:\dlx\rose.rep') then do
- call put_s "u",port
- call wait_fore "DSZ ZModem","raw",port,screen_handle
- call zmodem_send "c:\dlx\rose.rep",dde_output,dde_input
- call RexDelete 'c:\dlx\rose.rep'
- Call wait_fore "?=help): ","raw",port,screen_handle
- if RexFileExist('c:\download\rose.qwk') then do
- Call put_s "g",port
- Exit
- end
- else nop
- end
- else nop
-
- if RexFileExist('c:\download\rose.qwk') then call RexDelete 'c:\download\rose.qwk'
- else nop
-
- call RxFuncDrop 'RexFileExist'
- call RxFuncDrop 'RexDelete'
-
- Call put_s "d",port
- Call wait_fore "t (Y/N)? ","raw",port,screen_handle
- Call put_s "y",port
- Call wait_fore "DSZ ZModem","raw",port,screen_handle
- Call zmodem_receive dde_output,dde_input
- Call wait_fore "=help):","raw",port,screen_handle
- Call put_s "g",port
- Exit 0
-
- /* Standard handler for SIGNAL on ERROR, will help in the debuging */
- syntax_error:
- fp = filespec("path",fn)
- fd = filespec("drive",fn)
- errormsg = 'REXX error' rc 'in line' sigl':' errortext(rc)
- errorfile = fd||fp||"SCRIPT.ERR"
- rc = lineout(errorfile,date() time() fn '-' errormsg)
- rc = lineout(errorfile,date() time() fn '-' sourceline(sigl))
- Exit
-