home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Global Amiga Experience
/
globalamigaexperience.iso
/
text_dtp
/
editor
/
turbotext
/
rexx
/
selectdoc.ttx
< prev
next >
Wrap
Text File
|
1995-07-10
|
1KB
|
67 lines
/** $VER: SelectDoc.ttx 2.0 (14.3.94)
**
** This macro shows all documents currently loaded in TurboText and prompts
** for a document to be selected. That document's window is then made active.
**
** Written by Neil Lucking
** Modified by Martin Taillefer
**/
OPTIONS RESULTS
OPTIONS PROMPT "Select document > "
OPTIONS FAILAT 21
PARSE ARG docname
ADDRESS TURBOTEXT
IF docname = "" THEN DO
GetDocuments
docs = RESULT
SAY "Available documents:"
i = 1
DO WHILE docs ~= ''
PARSE VAR docs '"' a '"' port docs
IF a ~= "" THEN DO
SAY ' ' i ':' a
name.i = a
i = i+1
END
END
IF i = 1 THEN DO
SAY "No documents loaded"
RETURN
END
PULL window
IF (window = '') THEN DO
RETURN
END
GetPort name.window
IF rc ~= 0 THEN DO
GetPort window
END
END; ELSE DO
GetPort docname
END
IF rc = 0 THEN DO
ADDRESS VALUE RESULT
IconifyWindow OFF
ControlWindow ON
Window2Front
Screen2Front
ActivateWindow
END; ELSE DO
SAY "Document not found"
END