home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d445
/
turbotext
/
rexx
/
printblk.ttx
< prev
next >
Wrap
Text File
|
1991-01-24
|
972b
|
52 lines
/** $VER: PrintBlk.ttx Demo 1.0 (9.12.90)
**
** Print the currently selected block.
**
** Written by Martin Taillefer
**/
OPTIONS RESULTS
OPTIONS FAILAT 21
GetCursorPos
PARSE VAR RESULT cursorLine cursorColumn .
GetBlkInfo
PARSE VAR RESULT blockActive verticalBlock blockLine blockColumn .
IF blockActive = "ON" THEN DO
SetDisplayLock ON
/* save current contents of clipboard to the end of the file */
SetBookmark 0
MoveEOF
SetBookmark 191 /* pick a number, any number... */
PasteClip
MoveBookmark 0
/* print the current block */
CopyBlk
PrintClip
/* restore the previous contents of the clipboard */
MoveBookmark 191
ClearBookmark 191
MarkBlk
MoveEOF
CutBlk
/* remark the selected block */
Move blockLine blockColumn
IF verticalBlock = "ON" THEN
MarkBlk VERTICAL
ELSE DO
MarkBlk
END
Move cursorLine cursorColumn
SetDisplayLock OFF
END