home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
winutil
/
wspcr20
/
wsrun.wbt
< prev
Wrap
Text File
|
1991-09-25
|
2KB
|
59 lines
; --- WSRUN.WBT - an NDW Batch Builder file to restore a named workspace.
; WorkSpacer 2.0 ⌐ 1991 - WiGuys Software
Call ( "wsglobal.wbt", "" )
If FileSize ( spacelib ) != 0 Then GoTo Start
Message ( wsver, "The Library is empty. You must create a WorkSpace first." )
Return
; --- TextBox "menu" of existing workspace names for user selection
:Start
grpname = TextBox ( "%wsver% WorkSpace Selector", spacelib )
If StrICmp ( grpname, nul ) == 0 Then GoTo Start
; --- Read the workspace data from the ini file for the current application
:IniData
key1 = "App%count%"
filename = IniReadPvt ( grpname, key1, nul, "wspacer.ini" )
If StrICmp ( filename, nul ) == 0 Then GoTo EndWBT
key2 = "Status%count%"
key3 = "Load%count%"
key4 = "Pos%count%"
key5 = "Win%count%"
status = IniReadPvt ( grpname, key2, "Normal", "wspacer.ini" )
loadname = IniReadPvt ( grpname, key3, nul, "wspacer.ini" )
currpos = IniReadPvt ( grpname, key4, nul, "wspacer.ini" )
currwind = IniReadPvt ( grpname, key5, nul, "wspacer.ini" )
If StrICmp ( loadname, "?" ) == 0 Then GoTo GetFile
; --- Load the current application based on the data retrieved from the
; ini file, then get the data for the next application
:LoadApp
RunHide ( filename, loadname )
WinPlace ( %currpos%, currwind )
IF StrICmp ( status, "Icon" ) == 0 Then WinIconize ( currwind )
WinShow ( currwind )
count = count + 1
GoTo IniData
:EndWBT
appcount = count - 1
If !appcount == 0 Then Message ( wsver, "Your workspace (%appcount% applications) has been restored." )
Return
:GetFile
DirChange ("c:\")
gFile = "*.*"
:FileLoop
DialogBox ( "%wsver% RunTime Load Selector", "wsfile2.wbd" )
If StrICmp ( gFile, nul ) == 0 Then GoTo FileLoop
dir = DirGet ()
loadname = StrCat ( dir, gFile )
PathTrue = FileLocate ( loadname )
If StrICmp ( PathTrue, nul ) == 0 Then GoTo FileLoop
GoTo LoadApp