home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / apilot.zip / APILOT.CMD next >
OS/2 REXX Batch file  |  1996-06-04  |  714b  |  29 lines

  1. /* apilot.cmd */
  2. /* Written by Kelley Cook */
  3. call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
  4. call sysloadfuncs
  5.  
  6. Fname="C:\CSERVE\OS2-CIM\OS2-CIM.INI"
  7. do while stream(fname, c, 'query exists') = '' 
  8.    say fname 
  9.    say 'does not exist please enter complete path of os2-cim.ini'
  10.    pull fname
  11.    say ' '
  12. end
  13.  
  14. /* query */
  15. fBroom = SysIni( fname, "General Preferences", "Auto-Pilot" )
  16.  if Fbroom='ERROR:' then
  17.   say 'There was no Auto-Pilot Entry'
  18.  else
  19.   say 'Auto Pilot was set to ' fbroom
  20.  
  21. result = SysIni( fname, "General Preferences", "Auto-Pilot", 'ON'||'00'x )
  22.  
  23. if result = ''
  24.  then
  25.   say 'Auto-Pilot Successfully turned on'
  26.  else
  27.   say 'Unable to set autopilot'
  28. exit 0
  29.