Jump to content

Stupid OS/2 Tricks/REXX Commands: Difference between revisions

From EDM2
Erdmann (talk | contribs)
 
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=OPEN.CMD=
{{Stupid}}
/* OPEN.CMD - opens a folder */
call RxFuncAdd "SysSetObjectData", "RexxUtil", "SysSetObjectData"
folderpath="<drive>:\<path>"
call SysSetObjectData folderpath, "OPEN=DEFAULT";
exit


/* where <drive> is the letter of the drive on which the subdirectory
==OPEN.CMD==
/* OPEN.CMD - opens a folder */
call RxFuncAdd "SysSetObjectData", "RexxUtil", "SysSetObjectData"
folderpath="<drive>:\<path>"
call SysSetObjectData folderpath, "OPEN=DEFAULT";
exit
/* where <drive> is the letter of the drive on which the subdirectory
   corresponding to the folder is located
   corresponding to the folder is located
   <path>  is the path to the subdirectory corresponding to the folder */
   <path>  is the path to the subdirectory corresponding to the folder */


=BIGDOS.CMD=
==BIGDOS.CMD==
 
/* Start a DOS session with the maximum free memory  */
/* Start a DOS session with the maximum free memory  */
/* Xavier Caballe - December 1993                    */
/* Xavier Caballe - December 1993                    */
 
/* code added to make DOS session open in foreground  */
/* code added to make DOS session open in foreground  */
/* M.Woo - 6 Jan 94                                  */
/* M.Woo - 6 Jan 94                                  */
 
CALL RxFuncAdd SysLoadFuncs, RexxUtil,SysLoadFuncs;
CALL RxFuncAdd SysLoadFuncs, RexxUtil,SysLoadFuncs;
CALL SysLoadFuncs;
CALL SysLoadFuncs;
 
ClassName='WPProgram';        /* Object type            */
ClassName='WPProgram';        /* Object type            */
Title='Big DOS';              /* Window title            */
Title='Big DOS';              /* Window title            */
Program='EXENAME=*;';        /* Program to run          */
Program='EXENAME=*;';        /* Program to run          */
Location='<WP_NOWHERE>';      /* Object location        */
Location='<WP_NOWHERE>';      /* Object location        */
Type='PROGTYPE=VDM;';        /* DOS full screen session */
Type='PROGTYPE=VDM;';        /* DOS full screen session */
StartUp='STARTUPDIR=C:\;'    /* Working directory      */
StartUp='STARTUPDIR=C:\;'    /* Working directory      */
Objectid='OBJECTID=<BIGDOS>;' /* Object ID              */
Objectid='OBJECTID=<BIGDOS>;' /* Object ID              */
 
/* Session Settings */
/* Session Settings */
 
/* The Video_Mode_Restriction value *MUST BE* fifteen characters long */
/* The Video_Mode_Restriction value *MUST BE* fifteen characters long */
 
Settings='SET VIDEO_MODE_RESTRICTION=CGA            ;'
Settings='SET VIDEO_MODE_RESTRICTION=CGA            ;'
Settings=Settings||'SET DOS_UMB=1;'
Settings=Settings||'SET DOS_UMB=1;'
Settings=Settings||'SET DOS_HIGH=1;'
Settings=Settings||'SET DOS_HIGH=1;'
 
Open='OPEN=DEFAULT;'      /* Open default view      */
Open='OPEN=DEFAULT;'      /* Open default view      */
 
call SysCreateObject classname, title, location,,
call SysCreateObject classname, title, location,,
     program||type||startup||objectid||settings||open, 'REPLACE'
     program||type||startup||objectid||settings||open, 'REPLACE'
call SysSetObjectData '<BIGDOS>', open
call SysSetObjectData '<BIGDOS>', open
Return
Return
 
=BITMAP.CMD=


/* BITMAP.CMD:  change the desktop bitmap at regular intervals
==BITMAP.CMD==
/* BITMAP.CMD:  change the desktop bitmap at regular intervals
     Syntax:  BITMAP.CMD <interval in seconds> [/?]
     Syntax:  BITMAP.CMD <interval in seconds> [/?]
     Copyright 1994 Jack Tan
     Copyright 1994 Jack Tan */
*/
  /* Check the interval value */
  /* Check the interval value */
       arg interval
       arg interval
Line 88: Line 87:
       exit 2
       exit 2


=CHKDRIVE.CMD=
==CHKDRIVE.CMD==
 
/* CHKDRIVE.CMD - check drive status */
/* CHKDRIVE.CMD - check drive status */
'@echo off'
'@echo off'
parse arg drive_letter;
parse arg drive_letter;
drive_letter=delstr(drive_letter,2);
drive_letter=delstr(drive_letter,2);
if drive_letter=' ' then do
if drive_letter=' ' then do
     say "CHKDRIVE.CMD - check status of drive"
     say "CHKDRIVE.CMD - check status of drive"
     say "USAGE: CHKDRIVE.CMD <drive>"
     say "USAGE: CHKDRIVE.CMD <drive>"
Line 100: Line 98:
     exit
     exit
     end
     end
else
else
     signal ON NOTREADY name NOT_READY
     signal ON NOTREADY name NOT_READY
     call STREAM drive_letter || ':*', 'D'
     call STREAM drive_letter || ':*', 'D'
     say "Drive Ready"
     say "Drive Ready"
     exit
     exit
NOT_READY:
say "Drive Not Ready"
return


NOT_READY:
==EVAL.CMD==
say "Drive Not Ready"
/* eval by L Kuru 25.11.1993 */
return
arg params;
 
interpret say params;
=EVAL.CMD=
exit
=LARGE.CMD=


==LARGE.CMD==
  /* large.cmd - increase cursor size      */
  /* large.cmd - increase cursor size      */
  /* If you want to return to the standard */
  /* If you want to return to the standard */
Line 127: Line 129:
  exit
  exit


=PUTLONG.CMD=
==PUTLONG.CMD==
 
  /* This procedure will change the long name of  */
  /* This procedure will change the long name of  */
  /* a file without changing the actual file name. */
  /* a file without changing the actual file name. */
Line 144: Line 145:
   exit 1
   exit 1
   end  /* Do */
   end  /* Do */
 
  if LongName = '' then DO
  if LongName = '' then DO
   say 'Please specify a long name!'
   say 'Please specify a long name!'
Line 158: Line 159:
  EXIT
  EXIT


=SETPTR.CMD=
==SETPTR.CMD==
 
/* SetPtr.CMD -- set/remove a custom mouse pointer.
/* SetPtr.CMD -- set/remove a custom mouse pointer.
   Copyright 11 January 1994 by Jack Tan
   Copyright 11 January 1994 by Jack Tan
   This is based on Dann Lunsford's SETMOUSE.CMD
   This is based on Dann Lunsford's SETMOUSE.CMD
Line 171: Line 171:
   Be careful about adding/removing lines to this script -- it uses the
   Be careful about adding/removing lines to this script -- it uses the
   SOURCELINE function, which is source-dependent.
   SOURCELINE function, which is source-dependent.
 
   Syntax:  SetPtr.CMD <filename> [pointer index] [/X] [/L] [/?]
   Syntax:  SetPtr.CMD <filename> [pointer index] [/X] [/L] [/?]
 
             <filename> is the name of the file containing the pointer.
             <filename> is the name of the file containing the pointer.
             If <filename> does not exist, <filename>.PTR is searched.
             If <filename> does not exist, <filename>.PTR is searched.
 
             [pointer index] is an optional parameter.  It defaults to 1.
             [pointer index] is an optional parameter.  It defaults to 1.
         Index  Pointer                      Default OS/2 icon
         Index  Pointer                      Default OS/2 icon
Line 189: Line 189:
           8    resize (horizontal)          horizontal double arrow (-)
           8    resize (horizontal)          horizontal double arrow (-)
           9    resize (vertical)            vertical double arrow (|)
           9    resize (vertical)            vertical double arrow (|)
 
           /X (optional) indicates that the custom pointer should be removed.
           /X (optional) indicates that the custom pointer should be removed.
           /L (optional) lists currently installed pointers.
           /L (optional) lists currently installed pointers.
Line 295: Line 295:
  /* End of REXX script */
  /* End of REXX script */


=SETFONT.CMD=
==SETFONT.CMD==
 
  /* setfont.cmd                          */
  /* setfont.cmd                          */
  /* Usage: SETFONT <font size/type>      */
  /* Usage: SETFONT <font size/type>      */
Line 311: Line 310:
  exit
  exit


=SHUTDOWN.CMD=
==SHUTDOWN.CMD==
 
  /* REXX script to shut down the PC in 5 minutes
  /* REXX script to shutdown the PC in 5 minutes
   Author: David Matocha            david.matocha@yob.sccsi.com
   Author: David Matocha            david.matocha@yob.sccsi.com
   If you make any improvements, please send me a copy.
   If you make any improvements, please send me a copy.
Line 320: Line 318:
  say 'Please close all running applications.'
  say 'Please close all running applications.'
  say ' '
  say ' '
  say 'WARNING: The Computer will shutdown in 5 minutes!'
  say 'WARNING: The Computer will shut down in 5 minutes!'
  beep(500, 1000);
  beep(500, 1000);
  CALL SysSleep 14;
  CALL SysSleep 14;
Line 330: Line 328:
  CALL SysSleep 14;
  CALL SysSleep 14;
  say ' '
  say ' '
  say 'WARNING: The Computer will shutdown in 4 minutes!'
  say 'WARNING: The Computer will shut down in 4 minutes!'
  beep(400, 1000);
  beep(400, 1000);
  CALL SysSleep 14;
  CALL SysSleep 14;
Line 340: Line 338:
  CALL SysSleep 14;
  CALL SysSleep 14;
  say ' '
  say ' '
  say 'WARNING: The Computer will shutdown in 3 minutes!'
  say 'WARNING: The Computer will shut down in 3 minutes!'
  beep(300, 1000);
  beep(300, 1000);
  CALL SysSleep 14;
  CALL SysSleep 14;
Line 350: Line 348:
  CALL SysSleep 14;
  CALL SysSleep 14;
  say ' '
  say ' '
  say 'WARNING: The Computer will shutdown in 2 minutes!'
  say 'WARNING: The Computer will shut down in 2 minutes!'
  beep(200, 1000);
  beep(200, 1000);
  CALL SysSleep 14;
  CALL SysSleep 14;
Line 360: Line 358:
  CALL SysSleep 14;
  CALL SysSleep 14;
  say ' '
  say ' '
  say 'WARNING: The Computer will shutdown in 1 minute!'
  say 'WARNING: The Computer will shut down in 1 minute!'
  beep(100, 1000);
  beep(100, 1000);
  CALL SysSleep 14;
  CALL SysSleep 14;
Line 373: Line 371:
  exit
  exit


==SHREDDER.CMD==
  /* shredder.cmd - REXX script to recreate the Shredder */
  /* shredder.cmd - REXX script to recreate the Shredder */
  call RxFuncAdd "SysCreateObject", "RexxUtil", "SysCreateObject"
  call RxFuncAdd "SysCreateObject", "RexxUtil", "SysCreateObject"
Line 380: Line 379:
  settings="OBJECTID=<WP_SHRED>;"
  settings="OBJECTID=<WP_SHRED>;"
  settings=settings||"ICONPOS=90 8;"
  settings=settings||"ICONPOS=90 8;"
 
  call SysCreateObject class, title, location, settings, "REPLACE"
  call SysCreateObject class, title, location, settings, "REPLACE"
  exit
  exit


=SHREDDER.CMD=
==SLEEP.CMD==
  /* shredder.cmd - REXX script to recreate the Shredder */
  /* sleep.cmd - make system sleep for specified # of seconds */
  call RxFuncAdd "SysCreateObject", "RexxUtil", "SysCreateObject"
/* syntax: sleep <time>, where <time> is time in seconds */
  class="WPShredder"
  call RxFuncAdd "SysSleep", "RexxUtil", "SysSleep"
  title="Shredder"
  parse arg sleeptime;
location="<WP_DESKTOP>"
sleeptime=strip(sleeptime)
settings="OBJECTID=<WP_SHRED>;"
  if sleeptime= '' then do
settings=settings||"ICONPOS=90 8;"
  say "SLEEP.CMD - make system sleep for specified # of seconds"
   
  say "Usage: sleep <time>"
  call SysCreateObject class, title, location, settings, "REPLACE"
  say "       where <time> is time in seconds"
  exit
  end
  else
  call SysSleep sleeptime
  exit
  exit


=SLEEP.CMD=
[[Category:Stupid OS/2 Tricks]]

Latest revision as of 10:46, 19 January 2022

Stupid OS/2 Tricks

OPEN.CMD

/* OPEN.CMD - opens a folder */
call RxFuncAdd "SysSetObjectData", "RexxUtil", "SysSetObjectData"
folderpath="<drive>:\<path>"
call SysSetObjectData folderpath, "OPEN=DEFAULT";
exit

/* where <drive> is the letter of the drive on which the subdirectory
  corresponding to the folder is located
  <path>  is the path to the subdirectory corresponding to the folder */

BIGDOS.CMD

/* Start a DOS session with the maximum free memory   */
/* Xavier Caballe - December 1993                     */

/* code added to make DOS session open in foreground  */
/* M.Woo - 6 Jan 94                                   */

CALL RxFuncAdd SysLoadFuncs, RexxUtil,SysLoadFuncs;
CALL SysLoadFuncs;

ClassName='WPProgram';        /* Object type             */
Title='Big DOS';              /* Window title            */
Program='EXENAME=*;';         /* Program to run          */
Location='<WP_NOWHERE>';      /* Object location         */
Type='PROGTYPE=VDM;';         /* DOS full screen session */
StartUp='STARTUPDIR=C:\;'     /* Working directory       */
Objectid='OBJECTID=<BIGDOS>;' /* Object ID               */

/* Session Settings */

/* The Video_Mode_Restriction value *MUST BE* fifteen characters long */

Settings='SET VIDEO_MODE_RESTRICTION=CGA            ;'
Settings=Settings||'SET DOS_UMB=1;'
Settings=Settings||'SET DOS_HIGH=1;'

Open='OPEN=DEFAULT;'       /* Open default view       */

call SysCreateObject classname, title, location,,
   program||type||startup||objectid||settings||open, 'REPLACE'
call SysSetObjectData '<BIGDOS>', open
Return

BITMAP.CMD

/* BITMAP.CMD:  change the desktop bitmap at regular intervals
   Syntax:  BITMAP.CMD <interval in seconds> [/?]
   Copyright 1994 Jack Tan */
/* Check the interval value */
     arg interval
     if interval=="" | WORDPOS("/?", interval)<>0 then do
          SAY
          SAY "   BITMAP.CMD:  randomly change the desktop bitmap at",
              "periodic intervals"
          SAY "   Syntax:  BITMAP.CMD <interval in seconds> [/?]"
          SAY "   <interval> is the interval between bitmap changes,",
              "in seconds"
          exit 1
     end  /* Do */
     else if DATATYPE(interval, "Whole Number")<>1 then
          call badNumber interval
     else if interval<=0 then
          call badNumber interval
/* Prepare for the changes */
     signal on halt name exitProgram
     BootDrive  = VALUE("BOOTDRIVE", , "OS2ENVIRONMENT")
     BitmapSpec = BootDrive || "\OS2\BITMAP\*.BMP"
     call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
     call SysLoadFuncs
     SAY "BITMAP.CMD:  Hit Ctrl+Break to exit"
/* Execute the change */
     do forever
          call SysFileTree BitmapSpec, "bitmaps", "FO"
          if bitmaps.0>0 then do
               i = RANDOM(1, bitmaps.0)
               call SysSetObjectData "<WP_DESKTOP>"; "BACKGROUND="bitmaps.i";"
          end  /* Do */
          call SysSleep interval
     end /* Do */
exitProgram:
     SAY "             Successfully exited"
     exit 0
badNumber: procedure
     SAY "Bad interval value '"ARG(1)"'"
     exit 2

CHKDRIVE.CMD

/* CHKDRIVE.CMD - check drive status */
'@echo off'
parse arg drive_letter;
drive_letter=delstr(drive_letter,2);
if drive_letter=' ' then do
   say "CHKDRIVE.CMD - check status of drive"
   say "USAGE: CHKDRIVE.CMD <drive>"
   say "where <drive> is the letter of drive you wish to check"
   exit
   end
else
   signal ON NOTREADY name NOT_READY
   call STREAM drive_letter || ':*', 'D'
   say "Drive Ready"
   exit

NOT_READY:
say "Drive Not Ready"
return

EVAL.CMD

/* eval by L Kuru 25.11.1993 */
arg params;
interpret say params;
exit

LARGE.CMD

/* large.cmd - increase cursor size      */
/* If you want to return to the standard */
/* mouse cursor, change '1' to '2' in    */
/* the "val" variable.                   */

call RxFuncAdd "SysIni", "RexxUtil", "SysIni"
inifile='USER'
app='PM_IBMVGA'
key='CURSOR_SIZE'
val='1'
call SysIni inifile, app, key, val
say Result
exit

PUTLONG.CMD

/* This procedure will change the long name of   */
/* a file without changing the actual file name. */
/* Useage:                                       */
/*    PUTLONG myfil.ext "Long File Name"         */
/* Written by Bill Parrill                       */
/* bparrill@vnet.ibm.com                         */

call RxFuncAdd 'SysPutEA', 'RexxUtil', 'SysPutEA'

parse arg FileName '"'LongName'"'

if FileName =  then DO
  say 'Please specify a file name!'
  exit 1
  end  /* Do */

if LongName =  then DO
  say 'Please specify a long name!'
  exit 2
  end  /* Do */

say 'File Name: 'FileName
say 'Long Name: 'LongName
RetCode = SysPutEA(FileName, '.LONGNAME',,
                  'FDFF'x||D2C(LENGTH(LongName))||'00'x||LongName)
say 'Return Code: 'RetCode

EXIT

SETPTR.CMD

/* SetPtr.CMD -- set/remove a custom mouse pointer.
  Copyright 11 January 1994 by Jack Tan
  This is based on Dann Lunsford's SETMOUSE.CMD
      SETMOUSE.CMD by Dann Lunsford
      Short procedure to set mouse pointer to contents of specified .PTR file
      This file is in the public domain, but I'd appreciate it greatly if you
      would leave this notice in...     Author:  Dann Lunsford
                                                 Vortex BBS (1:203/726)
                                                 13-Aug-1993
  Be careful about adding/removing lines to this script -- it uses the
  SOURCELINE function, which is source-dependent.

  Syntax:  SetPtr.CMD <filename> [pointer index] [/X] [/L] [/?]

           <filename> is the name of the file containing the pointer.
           If <filename> does not exist, <filename>.PTR is searched.

           [pointer index] is an optional parameter.  It defaults to 1.
        Index  Pointer                       Default OS/2 icon
    ------------------------------------------------------------------
          1    normal OS/2 pointer           arrow
          2    text insertion                I-beam
          3    wait cursor                   clock
          4    size pointer                  (no icon)
          5    move pointer                  four-way arrow
          6    resize (NW to SE)             diagonal double arrow (\)
          7    resize (NE to SW)             diagonal double arrow (/)
          8    resize (horizontal)           horizontal double arrow (-)
          9    resize (vertical)             vertical double arrow (|)

          /X (optional) indicates that the custom pointer should be removed.
          /L (optional) lists currently installed pointers.
          /? (optional) displays this help. */

/* Get arguments */
   PARSE ARG arguments
   bigArgs = TRANSLATE(arguments)
/* Show help */
   if arguments== | WORDPOS("/?", arguments)<>0 then do
      do i=12 to 33
         SAY SOURCELINE(i)
      end /* do */
      EXIT(1)
   end  /* Do */
 /* Setup the REXX function */
   call RxFuncAdd 'SysIni', 'RexxUtil', 'SysIni'
   Inifile  = 'User'
   App      = 'PM_SysPointer'
/* Show current pointers */
   if WORDPOS('/L', bigArgs)<>0 then do
      result = SysIni(Inifile, App, 'All:', 'list')
      if list.0<1 then
         SAY "No custom pointers have been set."
      else do
         SAY "Current custom pointers:"
         do  i=1 to 9
            result = SysIni(Inifile, App, i)
            if result<>"ERROR:" then
               SAY "   ("i")" LEFT(pointerDesc(i), 20),
                  SUBSTR(result, 5, LENGTH(result)-5)
         end  /* Do */
      end  /* Do */
      EXIT(0)
   end  /* Do */
/* Look for a '/X' */
   xPos = WORDPOS('/X', bigArgs)
   if xPos<>0 then do
      removePtr = 1
      arguments = DELWORD(arguments, xPos, 1)
   end  /* Do */
   else
      removePtr = 0
/* Look for a pointer index */
   pointerIndex = 1
   if WORDS(arguments)>1 | removePtr then do
      /* Last argument should be the pointer index, since any '/X'
         has already been removed.  If the last argument does not fit
         the requirements for a pointer index, assume that it is part
         of the filename.
      */
      guessIndex = WORD(arguments, WORDS(arguments))
      if LENGTH(guessIndex)==1 & VERIFY(guessIndex, '123456789')==0 then do
         arguments = DELWORD(arguments, WORDS(arguments))
         pointerIndex = guessIndex
      end /* Do */
   end  /* Do */
/* Set the filename */
   if removePtr<>1 then do
      arguments = STRIP(arguments)
      if SUBSTR(arguments, 1, 1)=='"' then
         arguments = DELSTR(arguments, 1, 1)
      if SUBSTR(arguments, LENGTH(arguments))=='"' then
         arguments = DELSTR(arguments, LENGTH(arguments))
      filename = STREAM(arguments, 'Command', 'Query Exists')
      if filename== then do
         /* Try again use .PTR extension */
         filename = STREAM(arguments".PTR", 'Command', 'Query Exists')
         if filename== then do
            SAY "Cannot find file:  '"arguments"'"
            EXIT(3)
         end  /* Do */
      end  /* Do */
   end  /* Do */
/* Execute the change */
   if removePtr then
      result = SysIni(Inifile, App, pointerIndex, 'DELETE:')
   else do
      Keyvalue = x2c('01000000')||filename||x2c('00')
      result = SysIni(Inifile, App, pointerIndex, Keyvalue)
   end  /* Do */
/* If the change failed... */
   if result<>"" then do
      returnCode = 3
      if removePtr then
         SAY "Unable to delete the pointer"
      else
         SAY "Unable to set the pointer"
   end  /* Do */
/* ... else print 'successful' message */
   else do
      returnCode = 0
      if removePtr then
         SAY "Pointer successfully removed"
      else
         SAY "The new pointer will become effective at the next system boot."
   end  /* Do */
/* Give some more information */
   if removePtr<>1 then
      SAY "   File    = "filename
   SAY "   Pointer = "pointerDesc(pointerIndex) "("pointerIndex")"
EXIT(returnCode)
pointerDesc: procedure
   return STRIP(SUBSTR(SOURCELINE(20+ARG(1)), 15, 30))
/* End of REXX script */

SETFONT.CMD

/* setfont.cmd                          */
/* Usage: SETFONT       */
/* where  is the        */
/* point size and font desired in the   */
/* format size.type (e.g., 8.Helv)      */
call RxFuncAdd "SysIni", "RexxUtil", "SysIni"
parse arg Font
IniFile = "USER"
AppName = "PM_SystemFonts"
KeyName = "DefaultFont"
call SysIni IniFile, AppName, KeyName, Font||x2c(0)
say Result
exit

SHUTDOWN.CMD

/* REXX script to shut down the PC in 5 minutes
  Author: David Matocha            david.matocha@yob.sccsi.com
  If you make any improvements, please send me a copy.
  Version 930316.6                            */
say ' '
say 'Please close all running applications.'
say ' '
say 'WARNING: The Computer will shut down in 5 minutes!'
beep(500, 1000);
CALL SysSleep 14;
beep(475, 1000);
CALL SysSleep 14;
beep(450, 1000);
CALL SysSleep 14;
beep(425, 1000);
CALL SysSleep 14;
say ' '
say 'WARNING: The Computer will shut down in 4 minutes!'
beep(400, 1000);
CALL SysSleep 14;
beep(375, 1000);
CALL SysSleep 14;
beep(350, 1000);
CALL SysSleep 14;
beep(325, 1000);
CALL SysSleep 14;
say ' '
say 'WARNING: The Computer will shut down in 3 minutes!'
beep(300, 1000);
CALL SysSleep 14;
beep(275, 1000);
CALL SysSleep 14;
beep(250, 1000);
CALL SysSleep 14;
beep(225, 1000);
CALL SysSleep 14;
say ' '
say 'WARNING: The Computer will shut down in 2 minutes!'
beep(200, 1000);
CALL SysSleep 14;
beep(175, 1000);
CALL SysSleep 14;
beep(150, 1000);
CALL SysSleep 14;
beep(125, 1000);
CALL SysSleep 14;
say ' '
say 'WARNING: The Computer will shut down in 1 minute!'
beep(100, 1000);
CALL SysSleep 14;
beep(500, 1000);
CALL SysSleep 14;
beep(1000, 1000);
CALL SysSleep 14;
beep(1500, 1000);
CALL SysSleep 14;
 'setboot /T:NO'
 'setboot /B'
exit

SHREDDER.CMD

/* shredder.cmd - REXX script to recreate the Shredder */
call RxFuncAdd "SysCreateObject", "RexxUtil", "SysCreateObject"
class="WPShredder"
title="Shredder"
location="<WP_DESKTOP>"
settings="OBJECTID=<WP_SHRED>;"
settings=settings||"ICONPOS=90 8;"

call SysCreateObject class, title, location, settings, "REPLACE"
exit

SLEEP.CMD

/* sleep.cmd - make system sleep for specified # of seconds */
/* syntax: sleep