home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
swapper.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-06-21
|
2KB
|
46 lines
/*****************************************************************/
/* This Rexx procedure will keep an eye on the SWAPPER.DAT file */
/* by checking the size every 30 seconds. If the size changes */
/* a message is displayed and the user is asked to whether to */
/* Continue or Exit */
/* */
/* Written by: Clay Baker */
/* Date: 06/18/93 */
/* Modificatons: */
/* */
/*****************************************************************/
HFsize = 0 /* Initialize work variables*/
First_Time = 'Yes'
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs' /* Load Rexx */
call SysLoadFuncs /* Functions */
call SysCls /* Clear Screen (in case running */
/* in full screen mode) */
Check_File:
call SysSleep 30 /* Wait 30 seconds */
call SysFileTree 'c:\OS2\SYSTEM\SWAPPER.Dat','Findfile','F' /* Get Swapper file info */
push Findfile.1
pull Fdate Ftime Fsize Fattrb Fname
If First_time = 'Yes' then do
First_time = 'No'
HFsize = Fsize
End
Select
When Fsize > HFsize then Action = 'increased'
When Fsize < HFsize then Action = 'decreased'
Otherwise Action = ' '
End
If Action <> ' ' then do /* If file size has changed */
call File_Changed /* Call msg Routine */
HFsize = Fsize
end
Signal Check_File
File_Changed:
Msg='Swapper has' Action 'to' Fsize 'bytes. Should I continue to Monitor?'
If RxMessageBox(Msg,"Question", "YesNo", "Question") = 7
Then Exit
else
NOP
Return