home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Global Amiga Experience
/
globalamigaexperience.iso
/
text_dtp
/
editor
/
turbotext
/
rexx
/
addchars.ttx
next >
Wrap
Text File
|
1995-07-10
|
812b
|
54 lines
/** $VER: AddChars.ttx 2.0 (22.2.94)
**
** Add characters at the start of lines
**/
OPTIONS RESULTS
PARSE ARG ch
IF ch = "" THEN DO
RequestStr PROMPT '"Chars to add?"'
IF RC ~= 0 THEN DO
RETURN
END
ch = RESULT
END
SetStatusBar TEMPORARY "Working..."
GetBlkInfo
PARSE VAR RESULT blockActive dummy selLine .
SetDisplayLock ON
SetBookmark 0
RecordMacro Quiet
MoveSOL
Text '"' || ch || '"'
MoveDown
EndMacro
IF blockActive = 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
ClearBookmark 0
SetDisplayLock OFF