home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
install
/
reqtools
/
rexxreqtools
/
examples
/
ttxarexx.lha
/
AddChars.ttx
next >
Wrap
Text File
|
1993-10-21
|
946b
|
49 lines
/* $VER: AddChars.ttx 1.0 (07.07.93)
* Add chars to the start or the end of the marked lines, or the entire
* document. Based on a script written by Martin Taillefer
*/
OPTIONS RESULTS
PARSE ARG Ch
IF Ch = "" THEN DO
Ch = rtGetString( , "Chars to add:", "TurboText request", "_Prepend|_Append|_Cancel", "RT_PubScreenName=TURBOTEXT" )
IF rtResult = 0 THEN RETURN
Location = rtResult
END
SetStatusBar TEMPORARY "Working..."
GetBlkInfo
PARSE VAR RESULT SelectMode Dummy SelLine .
SetDisplayLock ON
SetBookmark 0
RecordMacro QUIET
IF Location = 1 THEN MoveSOL ELSE MoveEol /* 1 = Start, 2 = End */
Text TEXT Ch
MoveDown
EndMacro
IF SelectMode = "ON" THEN DO
GetCursorPos
PARSE VAR RESULT CurLine .
IF CurLine > SelLine THEN DO
Temp = CurLine
CurLine = SelLine
SelLine = Temp
Move CurLine
END
PlayMacro ( SelLine - CurLine )
END
ELSE DO
MoveSOF
PlayMacro 0
END
MoveBookmark 0
SetDisplayLock OFF