home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / mbiff101.zip / mbcreate.cmd < prev    next >
OS/2 REXX Batch file  |  1995-08-25  |  2KB  |  77 lines

  1. /* MailBiff WPS object creation utility */
  2.  
  3.    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4.    call SysLoadFuncs
  5.  
  6.    say 'Welcome to the MailBiff v0.01 WPS object creation utility.'
  7.    say 'This program will assist you in seting up MailBiff to run from the Workplace Shell.'
  8.    say 'You may terminate this program at any time by hitting ctrl-c.'
  9.    say 
  10.  
  11.    say 'What is the name or ip address of your POP3 mail server?'
  12.     Server = linein()
  13.  
  14.    say 'What is your userid on 'Server'?'
  15.     Userid  = linein()
  16.  
  17.    say 'What is the password for 'Userid' on 'Server'?'
  18.     Password = linein()
  19.  
  20.     DO UNTIL datatype( Refresh ) = 'NUM'
  21.      say 'How often would you like to check the mailbox on 'Server'? ( in seconds )'
  22.      Refresh = linein()
  23.       IF datatype( Refresh ) = 'CHAR' THEN
  24.        SAY 'That was not a number.  Try again!'
  25.     END
  26.  
  27.    say 'Would you like the WPS icon changed to reflect the current mail count? ( Y/N )'
  28.       pull WPS
  29.  
  30.    if WPS = 'Y' then
  31.      do
  32.        say 'Would you like to have a text window that show the current status of the connect to 'Server'? ( Y/N )'
  33.         pull Detach
  34.      end
  35.    else Detach = 'Y'
  36.  
  37.    say
  38.    say 'The Mailbiff icon will be created with these parameters:'
  39.    say '  Server - 'Server
  40.    say '  Userid - 'Userid
  41.    say '  Password - 'Password
  42.    say '  Refresh rate - 'Refresh
  43.    say '  WPS icon update - 'WPS
  44.    say '  Text windows - 'Detach
  45.    say
  46.    say 'Press enter to continue'
  47.  
  48.     pause = linein() 
  49.  
  50.    CmdLine = '-server 'Server
  51.    CmdLine = CmdLine' -user 'Userid
  52.    CmdLine = CmdLine' -pass 'Password
  53.    CmdLine = CmdLine' -refresh 'Refresh
  54.  
  55.    if WPS = 'Y' then
  56.      CmdLine = CmdLine' -wps '
  57.  
  58.    if Detach <> 'Y' then
  59.      CmdLine = CmdLine' -detach '
  60.  
  61.    say CmdLine
  62.  
  63.    Setup = 'EXENAME='directory()'\mb.cmd;'
  64.    Setup = Setup'MINIMIZED=YES;'
  65.    Setup = Setup'PROGTYPE=WINDOWABLEVIO;'
  66.    Setup = Setup'NOAUTOCLOSE=NO;'
  67.    Setup = Setup'PARAMETERS='CmdLine';'
  68.    Setup = Setup'STARTUPDIR='directory()
  69.  
  70.    If SysCreateObject("WPProgram", Server, "<WP_DESKTOP>", Setup )  Then
  71.      Say 'Program object for server 'Server' has been created.'
  72.    Else Say 'Could not create program object for server 'Server'!'
  73.             
  74.   
  75.  
  76.  
  77.