Declare Function GetWindowsDirectory Lib "Kernel" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
Global X%, EndFlg%, S$, S2$, SUCCESS%, WinDir$
Sub Main ()
'Source Code on SCREEN SAVER Protion of PICS.INI consists of this 1 File PICSS.BAS
'For the REST of the PICS Program Source Code (ie PICS.MAK contaqining PICS.EXE) you'll have to contact the Author Dave Charbonnet 504-899-5663 504-866-2120
If APP.PrevInstance Then End
Err = 0: On Error GoTo ErrHand
Dim Temp As String * 20
SUCCESS% = GetWindowsDirectory(Temp, 20)
If SUCCESS% = 0 Then MsgBox "Error Finding Windows Dir in PICS.SCR"
WinDir$ = Left$(Temp, InStr(Temp, Chr$(0)) - 1)
S$ = "PICS" 'Name of Program to Run as Screen Saver
S2$ = WinDir$ + "\" + S$ + ".EXE"
'S$ = "CALC" 'Name of Program to Run as Screen Saver
'S$ = "\COMMAND.COM" 'Name of Program to Run as Screen Saver
EndFlg% = True 'Check if Pics.EXE is Running
AppActivate (S$) 'Checks EndFlg% if still True was already Running so send Code to it to Start Running if Paused or Minimized
If EndFlg% Then SendKeys "{ENTER}+^'": End 'Must be Running Already so send Enter to Restore Size & Sepc Copd Shift Ctrl ' for Built In Code to UnPause
If Dir$(S2$) = "" Then MsgBox "Program " + S$ + ".EXE Not Found in Windows Directory"
X% = Shell(S2$ + " " + Command$, 1): End
MsgBox "PICS SCREEN SAVER RAN PAST END!!!!!"
Exit Sub
ErrHand:
If Err = 5 Then EndFlg% = False: Err = 0: Resume Next 'IF Pics.EXE is Running then DO Not Blank