home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
texed133.zip
/
English.zip
/
Macro.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-09-19
|
2KB
|
49 lines
/*
* You are allowed to enter every ReXX command.
* Some additional command are mentioned below
*/
say 'Macro has started'
/***************************************************************************/
/* Get marked text */
/* a) with clipboard: (Cut and Copy are also possible) */
ok = VRMethod( "MLE_1", "Copy")
MarkierterText = VRMethod( "Application", "GetClipboard")
/* b) direct:
MarkierterText = VRGet( "MLE_1", "SelectedText") */
/***************************************************************************/
/* Standart ReXX function */
laenge = length(MarkierterText)
/***************************************************************************/
/* Get position of the mark */
Markierung_Start = VRGet( "MLE_1", "SelectedStart")
Markierung_Ende = VRGet( "MLE_1", "SelectedEnd")
/***************************************************************************/
/* Set mark from MarkierungStart to MarkierungEnde */
ok = VRSet( "MLE_1", "SelectedStart", Markierung_Ende)
ok = VRSet( "MLE_1", "SelectedEnd", Markierung_Ende)
/***************************************************************************/
/* Some ways to insert text */
ok = VRMethod( "MLE_1", "Insert", " (Length of marked text: " )
ok = VRMethod( "Application", "PutClipboard", laenge)
ok = VRMethod( "MLE_1", "Paste" )
ok = VRMethod( "MLE_1", "Insert", ")" )
/***************************************************************************/
say "ok"