home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / lwscrpts.zip / OS2SWONL.CMD next >
OS/2 REXX Batch file  |  1994-08-26  |  4KB  |  86 lines

  1. /* LiveWire Offline OS2Shareware BBS REXX Script File   OS2SWONL.CMD */
  2.  
  3. /* This script log's on to Pete's board, Captures New Messages and Files
  4.    Downloads your Qwk Messages and the latest OS2NEW.ZIP files and exits.
  5.    After this I use a second script that just gets me to the main menu
  6.    (actually just the first section of this script) I then manually
  7.    upload my qwk replies and download any files of interest. You might
  8.    like to automate this second Pass, but I'm new to Qwk and havent thought
  9.    out the "sync" problems with a script that uploads prior replies before
  10.    downloading current messages. ( I use and like, MR2 to read offline QWKs)
  11.    Anyway feel free to use the script or any portion of it. I borrowed the
  12.    initial Do Loop from someone elses example (Sorry I've forgotten your
  13.    full name Jonathan D P??) Hope this is a usefull example of Rexx and LW
  14.  
  15.                                     Kenn Lynch Sat 03-19-1994
  16.  
  17.    You should edit the paths e:\download and d:\lwos2
  18.    to match your own paths. Enter your own name and password, in the variables
  19.    The script also assumes you have unzip and its in your current path.
  20.    Enter the scripts name in the LW dialing directory entry for OS2 SW BBS.
  21.    You can rename this script, but extension must be .CMD to work in LW */
  22.  
  23.  
  24. /* Set timeout */
  25. SetLW(TimeOut,120);
  26.  
  27. /* Set inter-character pacing to 40ms */
  28. SetLW(Pacing,40);
  29.  
  30. /* Set emulation and toggles */
  31. SetLW(Emulation,1);
  32. SetLW(Echo,0);
  33. SetLW(Linefeeds,0);
  34. SetLW(XonXoff,0);
  35. SetLW(BSIsDel,1);
  36.  
  37. /* I pre-load my strings with backspaces to avoid line noise.
  38.    I have never had this problem with Pete's board,
  39.    but its needed on some others I've used
  40.    What LiveWire needs is a way to store ENCRYPTED passwords and pass them
  41.    to the script(or encrypt the script) I prefer to keep my password in the
  42.    script file rather than in the dialing directory, neither is secure! */
  43.  
  44.  Username = "^H^H^H^H^H^H^HKenn Lynch" /* your first and last name */
  45.  Password = "^H^H^H^HPASSWORD"         /* Your password here */
  46. rem
  47.    SendLW("^M");
  48.  
  49.    Do forever
  50.  
  51.       ret=FindLW("wait 20 seconds",
  52.                    ,"your name:",
  53.                    ,"[Y,n]?",
  54.                    ,"Password:",
  55.                    ,"ss ENTER to continue");
  56.  
  57.       select
  58.        when ret="wait 20 seconds"       then SendLW("^[") ;
  59.        when ret="your name:"            then SendLW(Username||"^M") ;
  60.        when ret="[Y,n]? "               then SendLW("Y^M") ;
  61.        when ret="Password:"             then SendLW(Password||"^M") ;
  62.        when ret="ss ENTER to continue " then Leave ;
  63.  
  64.        otherwise
  65.           /*  The only thing that usually will bring you here is   */
  66.           /*  a timeout.  What you do here is up to you.  I just   */
  67.           /*  panic myself. (this DO was borrowed from JDBP)       */
  68.           Say "SCRIPT FAILED (prompts changed?)!!!! prompt was " ret;
  69.  
  70.        end
  71.    end
  72.  
  73.     SendLW("^M");
  74.  
  75. /* We're in now, time for a little local house keeping,    You can modify this
  76.    part to suit your needs. what I do is a keep the last 2 session logs.
  77.    Livewire 2.1 now correctly appends to previous log, but I dont like to
  78.    page foreward through the old stuff. Since I've been using QWK packets
  79.    The log doesnt contain any messages, only thing of interest is the new
  80.    files. I've started using LWs scroll back to view them so this capture file
  81.    is less usefull. By the way the capture file and os2new.txt are left in the
  82.    LiveWire directory you might like to path them to your download dir instead.
  83. */
  84.  
  85.    Exit;
  86.