home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
rexxmenu.zip
/
menu1act.erx
< prev
next >
Wrap
Text File
|
1998-02-26
|
4KB
|
106 lines
/*===============================================================*/
/* menu actions macro "menu1act.erx" */
/* Written by Father John Missing, O.C.F.M. */
/* */
/*===============================================================*/
Arg args
'extract /getline/line/cursorx/col'
linenum1 = line.1
linenum2 = line.1 + 1
linenum3 = line.1 + 2
linenum4 = line.1 + 3
linenum5 = line.1 + 4
linenum6 = line.1 + 5
linenum7 = line.1 + 6
linenum8 = line.1 + 7
linenum9 = line.1 + 8
linenum0 = line.1 + 9
Select
When args = 'A' Then /* Do loop */
Do
Call etkinserttext getline.1||' Do ', linenum1
Call etkinserttext ' ', linenum2
Call etkinserttext getline.1||' End', linenum3
newcursorx = cursorx.1 + 4
Call EtkSetFileField 'cursorx', newcursorx
Call EtkSetFileField 'line', linenum2
End
When args = 'B' Then /* If then else */
Do
Call etkinserttext getline.1||'If Then', linenum1
Call etkinserttext ' ', linenum2
Call etkinserttext getline.1||' Else', linenum3
newcursorx = cursorx.1 + 3
Call EtkSetFileField 'cursorx', newcursorx
Call EtkSetFileField 'line', linenum1
End
When args = 'C' Then /* Select when otherwise */
Do
Call etkinserttext getline.1||'Select ', linenum1
Call etkinserttext getline.1||' When Then', linenum2
Call etkinserttext ' ', linenum3
Call etkinserttext getline.1||' When Then', linenum4
Call etkinserttext ' ', linenum5
Call etkinserttext getline.1||' Otherwise', linenum6
Call etkinserttext ' ', linenum7
Call etkinserttext getline.1||'End', linenum8
newcursorx = cursorx.1 + 9
Call EtkSetFileField 'cursorx', newcursorx
Call EtkSetFileField 'line', linenum2
End
When args = 'D' Then
Do
Call etkreplacetext getline.1||'/* */',line.1
newcursorx = cursorx.1 + 4
Call EtkSetFileField 'cursorx', newcursorx
End
When args = 'E' Then
Do
Call etkinserttext getline.1||"Call RxFuncAdd 'FileLoadFuncs', 'FileRexx', 'FileLoadFuncs'", linenum1
Call etkinserttext getline.1||'Call FileLoadFuncs', linenum2
Call EtkSetFileField 'line', linenum3
End
When args = 'F' Then
Do
Call etkinserttext getline.1||"Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'", linenum1
Call etkinserttext getline.1||'Call SysLoadFuncs', linenum2
Call EtkSetFileField 'line', linenum3
End
When args = 'G' Then
Do
Call etkinserttext getline.1||"Call RxFuncAdd 'RxuInit', 'RXU', 'RxuInit'", linenum1
Call etkinserttext getline.1||'Call RxuInit', linenum2
Call EtkSetFileField 'line', linenum3
End
When args = 'H' Then
Do
Call etkinserttext getline.1||'Call RxFuncAdd"SockLoadFuncs","rxSock","SockLoadFuncs"', linenum1
Call etkinserttext getline.1||'Call SockLoadFuncs', linenum2
Call EtkSetFileField 'line', linenum3
End
When args = 'I' Then NOP
When args = 'J' Then NOP
When args = 'K' Then NOP
When args = 'L' Then NOP
When args = 'M' Then NOP
When args = 'N' Then NOP
When args = 'O' Then NOP
When args = 'P' Then NOP
When args = 'Q' Then NOP
When args = 'R' Then NOP
When args = 'S' Then NOP
When args = 'T' Then NOP
When args = 'U' Then NOP
When args = 'V' Then NOP
When args = 'W' Then NOP
When args = 'X' Then NOP
When args = 'Y' Then NOP
When args = 'Z' Then NOP
Otherwise Return
End
Return