home *** CD-ROM | disk | FTP | other *** search
- '**************************************************************************
- '* FONT setup application
- '**************************************************************************
-
- '$DEFINE DEBUG ''Define for script development/debugging
-
- '$INCLUDE 'setupapi.inc'
- '$INCLUDE 'msdetect.inc'
-
- ''Dialog ID's
- CONST ASKQUIT = 200
- CONST DESTPATH = 300
- CONST EXITFAILURE = 400
- CONST EXITQUIT = 600
- CONST EXITSUCCESS = 700
- CONST OPTIONS = 800
- CONST APPHELP = 900
- CONST CUSTINST = 6200
- CONST TOOBIG = 6300
- CONST BADPATH = 6400
-
- ''Bitmap ID
- CONST LOGO = 1
-
- ''File Types
- CONST OPTFILES1 = 1
- CONST OPTFILES2 = 2
- CONST OPTFILES3 = 3
- CONST OPTFILES4 = 4
-
- '' these constants for windows maximize
- CONST WS_VISIBLE = &H10000000
- CONST WS_BORDER = &H00800000
- CONST WS_CLIPCHILDREN = &H02000000
- CONST GWL_STYLE = -16
- CONST SW_SHOWMAXIMIZED = 3
-
- GLOBAL DEST$ ''Default destination directory.
- GLOBAL WINDRIVE$ ''Windows drive letter.
- GLOBAL OPT1OPT$ ''Option selection from OptFiles1 option dialog.
- GLOBAL OPT2OPT$ ''Option selection from OptFiles2 option dialog.
- GLOBAL OPT3OPT$ ''Option selection from OptFiles3 option dialog.
- GLOBAL OPT4OPT$ ''Option selection from OptFiles4 option dialog.
-
- ''CustInst list symbol names
- GLOBAL OPT1NEEDS$ ''Option list costs per drive
- GLOBAL OPT2NEEDS$
- GLOBAL OPT3NEEDS$
- GLOBAL OPT4NEEDS$
-
- GLOBAL EXTRACOSTS$ ''List of extra costs to add per drive
- GLOBAL BIGLIST$ ''List of option files cost calc results (boolean)
- GLOBAL FILENAME$ '' THE FILENAME OF SELECTED FILE
-
- ''Dialog list symbol names
- GLOBAL CHECKSTATES$
- GLOBAL STATUSTEXT$
- GLOBAL DRIVETEXT$
-
- DECLARE SUB AddOptFilesToCopyList (ftype%)
- DECLARE SUB RecalcOptFiles (ftype%)
- DECLARE SUB RecalcPath
- DECLARE SUB SetDriveStatus
- DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
-
- '' the functions declare for font install to system
- GLOBAL Para1%
- GLOBAL Para2$
- GLOBAL Para3$
- GLOBAL Para4$
- DECLARE FUNCTION CreateScalableFontResource LIB "gdi.exe"(Para1%, Para2$, Para3$, Para4$) AS INTEGER
- DECLARE FUNCTION AddFontResource LIB "gdi.exe"(OPT1OPT$) AS INTEGER
- DECLARE FUNCTION AddSelectedFontToSystem LIB "mscuistf.dll"(Para1%, Para3$, Para2$, Para4$) AS INTEGER
-
- DECLARE FUNCTION ShowWindow LIB "user.exe" (hWnd%, iShow%) AS INTEGER
- DECLARE FUNCTION SetWindowLong LIB "user.exe" (hWnd%, offset%, style&) AS LONG
-
-
- INIT:
- CUIDLL$ = "mscuistf.dll" ''custom user interface dll
- HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
-
- SetBitmap CUIDLL$, LOGO
- '' SetTitle "Chinese FONT Setup"
- SetTitle "╓╨╬─╫╓╠σ░▓╫░"
-
- szInf$ = GetSymbolValue("STF_SRCINFPATH")
- IF szInf$ = "" THEN
- szInf$ = GetSymbolValue("STF_CWDDIR") + "FntSetup.INF"
- END IF
- ReadInfFile szInf$
-
- WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
- DEST$ = GetWindowsSysDir()
- WINSYSPATH$ = GetWindowsSysDir()
- '' DEST$ = WINDRIVE$ + DEST$
-
- ''CustInst list symbols
- CHECKSTATES$ = "CheckItemsState"
- STATUSTEXT$ = "StatusItemsText"
- DRIVETEXT$ = "DriveStatusText"
- FILENAME$ = "FileName"
-
- '' generate SYMBOL LIST
- FOR i% = 1 TO 4 STEP 1
- AddListItem CHECKSTATES$, "ON"
- NEXT i%
-
- FOR i% = 1 TO 4 STEP 1
- AddListItem STATUSTEXT$, ""
- NEXT i%
-
- FOR i% = 1 TO 7 STEP 1
- AddListItem DRIVETEXT$, ""
- NEXT i%
- ReplaceListItem DRIVETEXT$, 7, DEST$
-
- FOR i% = 1 TO 4 STEP 1
- AddListItem FILENAME$, ""
- NEXT i%
- '' fill symbol list by the name of TTF files
- ReplaceListItem FILENAME$, 1, "kai-ti.ttf"
- ReplaceListItem FILENAME$, 2, "fangs-ti.ttf"
- ReplaceListItem FILENAME$, 3, "yuang1.ttf"
- ReplaceListItem FILENAME$, 4, "lis1.ttf"
-
- ''Disk cost list symbols
- OPT1NEEDS$ = "Opt1Needs"
- OPT2NEEDS$ = "Opt2Needs"
- OPT3NEEDS$ = "Opt3Needs"
- OPT4NEEDS$ = "Opt4Needs"
- EXTRACOSTS$ = "ExtraCosts"
- BIGLIST$ = "BigList"
-
- FOR i% = 1 TO 4 STEP 1
- AddListItem BIGLIST$, ""
- NEXT i%
- FOR i% = 1 TO 26 STEP 1
- AddListItem EXTRACOSTS$, "0"
- NEXT i%
-
- ''File Option Variables
- OPT1OPT$ = "1"
- OPT2OPT$ = "1"
- OPT3OPT$ = "1"
- OPT4OPT$ = "1"
-
- RecalcPath
- SetDriveStatus
-
- '$IFDEF DEBUG
- i% = SetSizeCheckMode(scmOnIgnore) '' could use scmOff; def = scmOnFatal
- '$ENDIF ''DEBUG
-
- '' MAXIMIZED THE WINDOW
- hWnd% = HwndFrame()
- il& = SetWindowLong(hWnd%, GWL_STYLE, WS_VISIBLE + WS_BORDER + WS_CLIPCHILDREN)
- jl% = ShowWindow(hWnd%, SW_SHOWMAXIMIZED)
-
- CUSTINST:
- '' main dialog box message process
- sz$ = UIStartDlg(CUIDLL$, CUSTINST, "FCustInstDlgProc", APPHELP, HELPPROC$)
-
- IF sz$ = "CONTINUE" THEN
- ''Install only if it will fit.
- FOR i% = 1 TO 4 STEP 1
- IF GetListItem(BIGLIST$, i%) <> "" THEN
- GOSUB TOOBIG
- GOTO CUSTINST
- END IF
- NEXT i%
- UIPop 1
- GOTO INSTALL
- ELSEIF sz$ = "PATH" THEN
- GOTO GETPATH
- ELSEIF sz$ = "CHK1" THEN
- RecalcOptFiles OPTFILES1
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK2" THEN
- RecalcOptFiles OPTFILES2
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK3" THEN
- RecalcOptFiles OPTFILES3
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "CHK4" THEN
- RecalcOptFiles OPTFILES4
- SetDriveStatus
- GOTO CUSTINST
- ELSEIF sz$ = "REACTIVATE" THEN
- RecalcPath
- SetDriveStatus
- GOTO CUSTINST
- ELSE
- GOSUB ASKQUIT
- GOTO CUSTINST
- END IF
-
-
-
- INSTALL:
- '' copy all selected file item into copy list
- ClearCopyList
- AddOptFilesToCopyList OPTFILES1
- AddOptFilesToCopyList OPTFILES2
- AddOptFilesToCopyList OPTFILES3
- AddOptFilesToCopyList OPTFILES4
-
- CreateDir DEST$, cmoNone
- CopyFilesInCopyList
-
-
- '' modify the system setting for use the installed fonts
- '' Para1% = 0
- thefilename$ = ""
- Para4$ = ""
- k% = LEN(DEST$)
-
- IF GetListItem(CHECKSTATES$, OPTFILES1) = "ON" THEN
- thefilename$ = GetListItem(FILENAME$, OPTFILES1)
- t% = LEN(thefilename$)
-
- IF (MID$(DEST$, k%, 1) = "\") THEN
- Para3$ = DEST$ + thefilename$
- ELSE
- Para3$ = DEST$ + "\" + thefilename$
- END IF
-
- Para2$ = WINSYSPATH$ + MID$(thefilename$, 1, (t% - 3)) + "fot"
- t% = AddSelectedFontToSystem(OPTFILES1, Para2$, Para3$, Para4$)
- IF t% = 0 then
- GOTO ERRQUIT
- END IF
- END IF
- IF GetListItem(CHECKSTATES$, OPTFILES2) = "ON" THEN
- thefilename$ = GetListItem(FILENAME$, OPTFILES2)
- t% = LEN(thefilename$)
-
- IF (MID$(DEST$, k%, 1) = "\") THEN
- Para3$ = DEST$ + thefilename$
- ELSE
- Para3$ = DEST$ + "\" + thefilename$
- END IF
-
- Para2$ = WINSYSPATH$ + MID$(thefilename$, 1, (t% - 3)) + "fot"
- t% = AddSelectedFontToSystem(OPTFILES2, Para2$, Para3$, Para4$)
- IF t% = 0 then
- GOTO ERRQUIT
- END IF
- END IF
- IF GetListItem(CHECKSTATES$, 3) = "ON" THEN
- thefilename$ = GetListItem(FILENAME$, OPTFILES3)
- t% = LEN(thefilename$)
-
- IF (MID$(DEST$, k%, 1) = "\") THEN
- Para3$ = DEST$ + thefilename$
- ELSE
- Para3$ = DEST$ + "\" + thefilename$
- END IF
-
- Para2$ = WINSYSPATH$ + MID$(thefilename$, 1, (t% - 3)) + "fot"
- t% = AddSelectedFontToSystem(OPTFILES3, Para2$, Para3$, Para4$)
- IF t% = 0 then
- GOTO ERRQUIT
- END IF
- END IF
- IF GetListItem(CHECKSTATES$, 4) = "ON" THEN
- thefilename$ = GetListItem(FILENAME$, OPTFILES4)
- t% = LEN(thefilename$)
-
- IF (MID$(DEST$, k%, 1) = "\") THEN
- Para3$ = DEST$ + thefilename$
- ELSE
- Para3$ = DEST$ + "\" + thefilename$
- END IF
-
- Para2$ = WINSYSPATH$ + MID$(thefilename$, 1, (t% - 3)) + "fot"
- t% = AddSelectedFontToSystem(OPTFILES4, Para2$, Para3$, Para4$)
- IF t% = 0 then
- GOTO ERRQUIT
- END IF
- END IF
-
-
- QUIT:
- ON ERROR GOTO ERRQUIT
-
- IF ERR = 0 THEN
- dlg% = EXITSUCCESS
- ELSEIF ERR = STFQUIT THEN
- dlg% = EXITQUIT
- ELSE
- dlg% = EXITFAILURE
- END IF
- QUITL1:
- sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
- IF sz$ = "REACTIVATE" THEN
- GOTO QUITL1
- END IF
- UIPop 1
-
- END
-
- ERRQUIT:
- i% = DoMsgBox("░▓╫░╩º░▄ú¼╟δ╙δ╙╨╣╪│º╔╠┴¬╧╡íú", "╓╨╬─╫╓╠σ░▓╫░│╠╨≥┤φ╬≤╨┼╧ó", MB_OK+MB_TASKMODAL+MB_ICONHAND)
- END
-
-
-
- GETPATH:
- SetSymbolValue "EditTextIn", DEST$
- SetSymbolValue "EditFocus", "END"
- GETPATHL1:
- sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, HELPPROC$)
-
- IF sz$ = "CONTINUE" THEN
- olddest$ = DEST$
- DEST$ = GetSymbolValue("EditTextOut")
-
- ''Validate new path.
- IF IsDirWritable(DEST$) = 0 THEN
- GOSUB BADPATH
- GOTO GETPATHL1
- END IF
- UIPop 1
-
- ''Truncate display if too long.
- IF LEN(DEST$) > 23 THEN
- ReplaceListItem DRIVETEXT$, 7, MID$(DEST$, 1, 23)+"..."
- ELSE
- ReplaceListItem DRIVETEXT$, 7, DEST$
- END IF
-
- ''Recalc if path changed.
- IF (olddest$ <> DEST$) AND (olddest$ <> DEST$+"\") AND (olddest$+"\" <> DEST$) THEN
- RecalcPath
- SetDriveStatus
- END IF
-
- olddest$ = ""
- GOTO CUSTINST
- ELSEIF sz$ = "REACTIVATE" THEN
- RecalcPath
- SetDriveStatus
- GOTO GETPATHL1
- ELSEIF sz$ = "EXIT" THEN
- GOSUB ASKQUIT
- GOTO GETPATHL1
- ELSE
- UIPop 1
- GOTO CUSTINST
- END IF
-
-
- TOOBIG:
- sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "")
- IF sz$ = "REACTIVATE" THEN
- RecalcPath
- SetDriveStatus
- GOTO TOOBIG
- END IF
- UIPop 1
- RETURN
-
-
- BADPATH:
- sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
- IF sz$ = "REACTIVATE" THEN
- RecalcPath
- SetDriveStatus
- GOTO BADPATH
- END IF
- UIPop 1
- RETURN
-
-
-
- ASKQUIT:
- sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
-
- IF sz$ = "EXIT" THEN
- UIPopAll
- ERROR STFQUIT
- ELSEIF sz$ = "REACTIVATE" THEN
- GOTO ASKQUIT
- ELSE
- UIPop 1
- END IF
- RETURN
-
-
-
- '**
- '** Purpose:
- '** Adds the specified option files to the copy list.
- '** Arguments:
- '** ftype% - type of files to add, one of the following:
- '** OPTFILES1, OPTFILES2, OPTFILES3, OPTFILES4
- '** Returns:
- '** none.
- '*************************************************************************
- SUB AddOptFilesToCopyList (ftype%) STATIC
-
- '' read the INF file for each item of install file
- IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
- SrcDir$ = GetSymbolValue("STF_SRCDIR")
-
- IF ftype% = OPTFILES1 THEN
- AddSectionKeyFileToCopyList "OptFiles1", OPT1OPT$, SrcDir$, DEST$
- ELSEIF ftype% = OPTFILES2 THEN
- AddSectionKeyFileToCopyList "OptFiles2", OPT2OPT$, SrcDir$, DEST$
- ELSEIF ftype% = OPTFILES3 THEN
- AddSectionKeyFileToCopyList "OptFiles3", OPT3OPT$, SrcDir$, DEST$
- ELSEIF ftype% = OPTFILES4 THEN
- AddSectionKeyFileToCopyList "OptFiles4", OPT4OPT$, SrcDir$, DEST$
- END IF
- SrcDir$ = ""
- END IF
- END SUB
-
-
- '**
- '** Purpose:
- '** Recalculates disk space for the given option files and sets
- '** the status info symbol "StatusItemsText".
- '** Arguments:
- '** ftype% - type of files to add, one of the following:
- '** OPTFILES1, OPTFILES2, OPTFILES3, OPTFILES4
- '** Returns:
- '** none.
- '*************************************************************************
- SUB RecalcOptFiles (ftype%) STATIC
- CursorSave% = ShowWaitCursor()
- ClearCopyList
-
- '' read the INF files for symbol list
- AddOptFilesToCopyList ftype%
-
- '' be changed for FONT 1
- fExtra% = 0
- IF ftype% = OPTFILES1 THEN
- ListSym$ = OPT1NEEDS$
- IF GetListItem(CHECKSTATES$, OPTFILES1) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "1024"
- fExtra% = 1
- END IF
- END IF
-
- '' be changed for FONT 2
- IF ftype% = OPTFILES2 THEN
- ListSym$ = OPT2NEEDS$
- IF GetListItem(CHECKSTATES$, OPTFILES2) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- END IF
-
- '' be changed for FONT 3
- IF ftype% = OPTFILES3 THEN
- ListSym$ = OPT3NEEDS$
- IF GetListItem(CHECKSTATES$, OPTFILES3) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- END IF
-
- '' be changed for FONT 4
- IF ftype% = OPTFILES4 THEN
- ListSym$ = OPT4NEEDS$
- IF GetListItem(CHECKSTATES$, OPTFILES4) = "ON" THEN
- ''Add extra cost to Windows drive for ini/progman, etc.
- ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- ReplaceListItem EXTRACOSTS$, ndrive%, "10240"
- fExtra% = 1
- END IF
- END IF
-
- '' here is important to calculate the bytes of files
- StillNeed& = GetCopyListCost(EXTRACOSTS$, ListSym$, "")
-
- ' cost& = 0
- ' temp& = 0
- ' FOR i% = 1 TO 26 STEP 1
- ' IF VAL(GetListItem(ListSym$, i%)) > 0 THEN
- ' temp& = VAL(GetListItem(ListSym$, i%))
- ' ELSE
- ' temp& = -VAL(GetListItem(ListSym$, i%))
- ' END IF
-
- ' cost& = cost& + temp&
- ' NEXT i%
-
- IF ftype% = OPTFILES1 THEN
- IF GetListItem(CHECKSTATES$, OPTFILES1) = "ON" THEN
- cost& = 2378374
- ELSE
- cost& = 0
- END IF
- ELSEIF ftype% = OPTFILES2 THEN
- IF GetListItem(CHECKSTATES$, OPTFILES2) = "ON" THEN
- cost& = 2375999
- ELSE
- cost& = 0
- END IF
- ELSEIF ftype% = OPTFILES3 THEN
- IF GetListItem(CHECKSTATES$, OPTFILES3) = "ON" THEN
- cost& = 2497124
- ELSE
- cost& = 0
- END IF
- ELSEIF ftype% = OPTFILES4 THEN
- IF GetListItem(CHECKSTATES$, OPTFILES4) = "ON" THEN
- cost& = 3152996
- ELSE
- cost& = 0
- END IF
- END IF
-
- ReplaceListItem STATUSTEXT$, ftype%, STR$(cost& / 1024) + " K"
-
- IF StillNeed& > 0 THEN
- ReplaceListItem BIGLIST$, ftype%, "YES"
- ELSE
- ReplaceListItem BIGLIST$, ftype%, ""
- END IF
-
- IF fExtra% THEN
- ReplaceListItem EXTRACOSTS$, ndrive%, "0"
- END IF
- RestoreCursor CursorSave%
- ListSym$ = ""
- END SUB
-
-
- '**
- '** Purpose:
- '** Recalculates disk space and sets option status info according
- '** to the current destination path.
- '** Arguments:
- '** none.
- '** Returns:
- '** none.
- '*************************************************************************
- SUB RecalcPath STATIC
-
- CursorSave% = ShowWaitCursor()
-
- RecalcOptFiles OPTFILES1
- RecalcOptFiles OPTFILES2
- RecalcOptFiles OPTFILES3
- RecalcOptFiles OPTFILES4
-
- RestoreCursor CursorSave%
- END SUB
-
-
- '**
- '** Purpose:
- '** Sets drive status info according to latest disk space calcs.
- '** Arguments:
- '** none.
- '** Returns:
- '** none.
- '*************************************************************************
- SUB SetDriveStatus STATIC
-
- drive$ = MID$(DEST$, 1, 1)
- ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
-
- '' here be changed for FONTs
- '' so stupid for avoid number error
- ' if VAL(GetListItem(OPT1NEEDS$, ndrive%)) > 0 then
- ' space1& = VAL(GetListItem(OPT1NEEDS$, ndrive%))
- ' else
- ' space1& = -VAL(GetListItem(OPT1NEEDS$, ndrive%))
- ' end if
- ' if VAL(GetListItem(OPT2NEEDS$, ndrive%)) > 0 then
- ' space2& = VAL(GetListItem(OPT2NEEDS$, ndrive%))
- ' else
- ' space2& = -VAL(GetListItem(OPT2NEEDS$, ndrive%))
- ' end if
- ' if VAL(GetListItem(OPT3NEEDS$, ndrive%)) > 0 then
- ' space3& = VAL(GetListItem(OPT3NEEDS$, ndrive%))
- ' else
- ' space3& = -VAL(GetListItem(OPT3NEEDS$, ndrive%))
- ' end if
- ' if VAL(GetListItem(OPT4NEEDS$, ndrive%)) > 0 then
- ' space4& = VAL(GetListItem(OPT4NEEDS$, ndrive%))
- ' else
- ' space4& = -VAL(GetListItem(OPT4NEEDS$, ndrive%))
- ' end if
-
-
- IF GetListItem(CHECKSTATES$, OPTFILES1) = "ON" THEN
- space1& = 2378374
- ELSE
- space1& = 0
- END IF
- IF GetListItem(CHECKSTATES$, OPTFILES2) = "ON" THEN
- space2& = 2375999
- ELSE
- space2& = 0
- END IF
- IF GetListItem(CHECKSTATES$, OPTFILES3) = "ON" THEN
- space3& = 2497124
- ELSE
- space3& = 0
- END IF
- IF GetListItem(CHECKSTATES$, OPTFILES4) = "ON" THEN
- space4& = 3152996
- ELSE
- space4& = 0
- END IF
-
- cost& = space1& + space2& + space3& + space4&
- free& = GetFreeSpaceForDrive(drive$)
-
- ReplaceListItem DRIVETEXT$, 1, DEST$
- ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
- ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
-
- ' IF drive$ = WINDRIVE$ THEN
- ReplaceListItem DRIVETEXT$, 4, ""
- ReplaceListItem DRIVETEXT$, 5, ""
- ReplaceListItem DRIVETEXT$, 6, ""
- ' ELSE
- ' ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
- '' cost& = VAL(GetListItem(APPNEEDS$, ndrive%)) + VAL(GetListItem(OPT1NEEDS$, ndrive%)) + VAL(GetListItem(OPT2NEEDS$, ndrive%))
- '
- ' '' here be changed for FONTs
- ' cost& = VAL(GetListItem(OPT1NEEDS$, ndrive%)) + VAL(GetListItem(OPT2NEEDS$, ndrive%)) + VAL(GetListItem(OPT3NEEDS$, ndrive%)) + VAL(GetListItem(OPT4NEEDS$, ndrive%))
- ' IF cost& = 0 THEN
- ' ReplaceListItem DRIVETEXT$, 4, ""
- ' ReplaceListItem DRIVETEXT$, 5, ""
- ' ReplaceListItem DRIVETEXT$, 6, ""
- ' ELSE
- ' free& = GetFreeSpaceForDrive(WINDRIVE$)
- ' ReplaceListItem DRIVETEXT$, 4, WINDRIVE$ + ":"
- ' ReplaceListItem DRIVETEXT$, 5, STR$(cost& / 1024) + " K"
- ' ReplaceListItem DRIVETEXT$, 6, STR$(free& / 1024) + " K"
- ' END IF
- ' END IF
- END SUB
-
-
- '**
- '** Purpose:
- '** Appends a file name to the end of a directory path,
- '** inserting a backslash character as needed.
- '** Arguments:
- '** szDir$ - full directory path (with optional ending "\")
- '** szFile$ - filename to append to directory
- '** Returns:
- '** Resulting fully qualified path name.
- '*************************************************************************
- FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
- IF szDir$ = "" THEN
- MakePath = szFile$
- ELSEIF szFile$ = "" THEN
- MakePath = szDir$
- ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
- MakePath = szDir$ + szFile$
- ELSE
- MakePath = szDir$ + "\" + szFile$
- END IF
- END FUNCTION
-