home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
install
/
reqtools
/
rexxreqtools
/
examples
/
ttxarexx.lha
/
OpenFile.ttx
< prev
next >
Wrap
Text File
|
1993-10-21
|
977b
|
42 lines
/* $VER: OpenFile.ttx 1.1 (30.07.93) */
OPTIONS RESULTS
GetFileInfo
Parse VAR RESULT Lines Modified .
IF Modified = "YES" THEN DO
Ret = rtEZRequest( "Open without saving changes?", " _Ok |_Save...|_Cancel", "TurboText request", "RT_PubScrName=TURBOTEXT" )
IF Ret = 0 THEN RETURN
IF Ret = 2 THEN DO
CALL 'Env:Rexx/SaveFileAs.ttx'
GetFileInfo
Parse VAR RESULT Lines Modified .
IF Modified = "YES" THEN RETURN
END
END
GetFilePath
DirName = RESULT
FileName = ""
Index = LastPos( "/", DirName )
IF Index ~= 0 THEN DO
FileName = SubStr( DirName, Index + 1 )
DirName = Left( DirName, Index )
END
ELSE DO
Index = Index( DirName, ":" )
IF Index ~= 0 THEN DO
FileName = SubStr( DirName, Index + 1 )
DirName = Left( DirName, Index )
END
END
FileName = rtFileRequest( DirName, FileName, "Select file to open", "_Open", "RTFI_Flags=FREQF_PatGad RT_PubScrName=TURBOTEXT" )
IF rtResult = 1 THEN OpenFile QUIET FileName
CALL rtFreeFileBuffer