home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 4: Demo 1
/
almathera_demo1.bin
/
commercial
/
turbotext
/
rexx
/
cleanup.ttx
next >
Wrap
Text File
|
1995-03-16
|
1KB
|
61 lines
/** $VER: CleanUp.ttx Demo 1.0 (11.1.91)
**
** This iconifies all windows and tidies up the editor's screen
**
** Written by Neil Lucking, Michael Sinz, Martin Taillefer and Fred Mitchell
**/
OPTIONS RESULTS
ADDRESS "TURBOTEXT"
GetDocuments
docs = RESULT
i = 0
DO WHILE docs ~= ''
PARSE VAR docs '"' name.i '" TURBOTEXT' port docs
port.i = 'TURBOTEXT'||port
i = i+1
END
numdocs = i
swap = "YES"
DO WHILE swap == "YES"
i = 0
swap = "NO"
DO WHILE i < numdocs - 1
j = i + 1
IF name.i > name.j THEN DO
swap = "YES"
nswap = name.i
pswap = port.i
name.i = name.j
port.i = port.j
name.j = nswap
port.j = pswap
END
i = j
END
END
i = 0
y = 0
DO WHILE i < numdocs
ADDRESS VALUE port.i
IconifyWindow ON
GetWindowInfo
PARSE VAR RESULT icon left top width height .
y = (height + 1) * (i + 1) + 1
MoveWindow (0-left) (y-top)
i = i+1
END