SBP BUILDPGM.SBP - Build START.SBP for MsgCentr main() FileList$(100),TmpLine$,cntr%,PgmDesc$,Compress%% Compress%%1 PgmDesc$"Message Center Complete Build Generated "(Q,"0m/0d/yy")" "7(R,"hh:mm am") FileList$(0)"C:\SB4W\MSGS\Msgcentr.sbp" FileList$(1)"C:\SB4W\MSGS\1form.sbp" FileList$(2)"C:\SB4W\MSGS\kevent.sbp" FileList$(3)"C:\SB4W\MSGS\devent.sbp" FileList$(4)"C:\SB4W\MSGS\fevent.sbp" FileList$(5)"C:\SB4W\MSGS\tevent.sbp" FileList$(6)"C:\SB4W\MSGS\sevent.sbp" FileList$(7)"C:\SB4W\MSGS\pevent.sbp" FileList$(8)"C:\SB4W\MSGS\mevent.sbp" FileList$(9)"C:\SB4W\MSGS\msglib01.sbp" FileList$(10)"C:\SB4W\MSGS\msgmsg.sbp" FileList$(11)"C:\SB4W\MSGS\msglib09.sbp" FileList$(12)"C:\SB4W\MSGS\grpform.sbp" FileList$(13)"C:\SB4W\MSGS\defform.sbp" FileList$(14)"C:\SB4W\MSGS\custform.sbp" ********************************************* MAKE THE ABOVE... CALL Include(aSBPFile$) ***************************** "start.sbp" {" REM *** "PgmDesc$ END IF *** Start a Superbase Session for Text Conversions DDEChan%%GetDDEChan%%("sb4w","system",0): changed to run hidden lerr%%WaitDDE%%(DDEChan%%,"Status","ready")  i%%0q100 FileList$(i%%)""p J(FileList$(i%%))p Pgm2Txt(FileList$(i%%)) cntr%0 Compress%%1p  {  {" REM ==================================================================="  {" REM ">(FileList$(i%%))  {" REM ==================================================================="  {  FileList$(i%%) "Appending file "FileList$(i%%) OB("*")  cTmpLine$  cntr%cntr%1  Compress%%p  "Optimizing Line # "(cntr%,"99999")" of Program File ">(FileList$(i%%))  ^  "Outputting Line # "(cntr%,"99999")" of Program File ">(FileList$(i%%))   Compress%%  1 TmpLine$H(F(TmpLine$)) ?(TmpLine$,":REM")0p TmpLine$+(TmpLine$,?(TmpLine$,":REM")1)  +(TmpLine$" ",4)"REM "p TmpLine$""p +(TmpLine$,1)"'"p  {TmpLine$     0 {TmpLine$  ^ {TmpLine$      CLOSE DDE TEXT Converter ddechan%%,"QUIT" "START.sbp", Y  Pgm2Txt(aPgmFile$): SBPLSTR.SBP - Procedure Code Documentor DDEChan%% lStatus$ lerr%% "Calling Superbase to Convert Program File to Text File" DDEChan%% = GetDDEChan%%("sb4w","system",2) DDEChan%%GetDDEChan%%("sb4w","system",2): changed to run hidden lerr%%WaitDDE%%(DDEChan%%,"Status","ready") path(aPgmFile$)""p ddechan%%,"DIRECTORY "(34)path(aPgmFile$)(34)  ddechan%%,"Load "(34)aPgmFile$(34)  DDEEXEC ddechan%%,"save " + CHR$ (34) + FN name (aPgmFile$) + CHR$ (34) + ",text" ddechan%%,"save "(34)aPgmFile$(34)",text" DDEchan%%,"CLOSE PROGRAMFILE "(34)name (aPgmFile$)(34) "Text Conversion Completed"  DDEEXEC ddechan%%,"QUIT" DDEChan%%  GetDDEChan%%(aPgm$,aTopic$,aRunSize%%): Get First Available DDE Channel Number lSuccess%% lerr%% *** Error # 154 = Channel already in use! *** Error # 156 = Application not Responding! *** Cannot establish "Free Copy of SB4W" for its own use...maybe just start a new copy _e154,156 & GetDDEChan%%1 lSuccess%%0 GetDDEChan%%,root(aPgm$),aTopic$ & 154 & GetDDEChan%%GetDDEChan%%1 156 & lerr%%StartPgm%%(aPgm$,aRunSize%%) lerr%%2 lerr%%3p  i%%1q3::  "Please HELP me!","Where is DDE Program">(aPgm$),18,lA%%,aPgm$  0 & lSuccess%%1 ^  {(&,"999")" - "((&)  &  GetDDEChan%%0  lSuccess%%1  & _154,156  **** Add A Time Value to control how long to wait...0 means forever!? WaitDDE%%(aChan%%,aItem$,aVal$): Waits for inf from DDE Channel lStatus$ WaitDDE%%0 WaitDDE%%1 aChan%%,aItem$,lStatus$ ?(>(lStatus$),>(aVal$))p WaitDDE%%1   Use Select Case to determin success of StartPgm%% Refer to Windows SDK - WinExec StartPgm%%(aPgm$,aSize%%): Use Windows to Start an EXE "KERNEL.EXE","WinExec","ICI" StartPgm%%("WinExec",aPgm$,aSize%%)