home *** CD-ROM | disk | FTP | other *** search
- $MACRO_FILE MEUTIL1;
- {******************************************************************************
- MULTI-EDIT MACRO FILE MEUTIL1
-
- LOADFILE - Prompted file loading
- SAVEFILE - Prompted file saving
- SAVEBLCK - Prompted block saving
- SPLICE - Prompted block loading
- FILESTAT - Displays and allows changes to file name and lock status
- EDFORMAT - Edit the format line
- EXEC - Run programs or dos commands. Controls memory and swapping.
- SHELLDOS - Run DOS from ME (uses EXEC).
- RUNMAC - Prompt to run a macro
- REPEAT - Repeat any single keystroke
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- $MACRO LOADFILE TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: LOADFILE
-
- Description: Prompts for and loads a single file into the current window.
-
- Parameters:
- /Y= Y coordinate of prompt box
- /X= X coordinate of box
- /BC= Amount of boxes currently on screen
- /E= If 1, indicates macro was called from Edit New File.
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- Def_Str(tempstring, help_str[40]);
- Def_Int(jx, kill_count, x, c_win_id );
- Def_Int(Start_Row);
-
- Return_Int := False;
- Start_Row := Parse_Int('/Y=',MParm_Str);
- x := parse_int( '/X=', mparm_str );
- Kill_count := Parse_Int('/BC=',mparm_str);
-
- If Start_Row = 0 THEN
- Start_Row := 2;
- END;
- Set_Global_Int('LOAD_COUNT',0);
-
- tempstring := File_Name;
- JX := 1;
-
- if parse_int('/E=', mparm_str) then
- help_str := '/H=EDITNEW';
- else
- help_str := '/H=LOADFILE';
- end;
-
- IF (Global_Str('@FM_MACRO@') <> '') THEN
- Help_Str := Help_Str + '/F5=FILMGR';
- END;
-
- IF (File_Changed <> 0) and (NOT(Parse_Int('/E=',MParm_Str))) THEN
- RM('userin^CHECKFILE /X=' + str(x) +
- '/Y=' + Str(Start_Row));
- JX := Return_Int;
- END;
- Return_Int := False;
- IF jx THEN
- QAGAIN:
- Return_Str := TempString;
-
- RM('userin^QUERYBOX /HISTORY=FILE_HISTORY/W=60/ML=80/T=INPUT FILENAME TO LOAD/F2=Dir /L=' + Str(Start_Row) + '/C=' + str(x) + help_str);
- If Return_Int = -1 THEN
-
- IF ((Key1 = 0) and (Key2 = 63)) THEN
- RM(global_str('@FM_MACRO@'));
- Goto SKIP_DIR;
- END;
-
- if (caps(return_str) = '?NO-FILE?') or (return_str = tempstring) then
- return_str := '*.*';
- else
- if NOT(file_exists(return_str)) AND (copy(return_str,length(return_str),1) <> '*') then
- return_str := return_str + '*';
- end;
- end;
- RM('DIRSHELL /S=2/Y=' + str(start_Row) + '/X=' + str(x) +
- '/W=62/L=100/D=' + return_str
- );
- SKIP_DIR:
- If Return_Str <> '' THEN
- TempString := Return_Str;
- END;
- Goto QAgain;
- END;
- TempString := Return_Str;
- If Return_Int THEN
- while box_count > kill_count do
- kill_box;
- end;
- Return_Int := True;
- Error_Level := 0;
- refresh := true;
- return_str := tempstring;
- c_win_id := window_id;
- RM( 'LDFILES /LC=0/CW=' + str(parse_int('/E=',mparm_str)) );
- return_int := 1;
- END;
- ELSE
- Return_Int := False;
- END;
- EXIT:
- END_MACRO;
-
-
- $MACRO SAVEFILE TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: SAVEFILE
-
- Description: Prompts for and saves a single file from the current window.
-
- Parameters:
- /NP=1 Bypass prompt, just save the file.
- /X= X coordinate of prompt box
- /Y= Y coordinate of prompt box
- /BC= Amount of boxes currently on screen
-
- Returns:
- Return_Int - If 1, save was unsuccessful.
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- Def_Str(TempString);
- Def_Int(Start_Row, Jx, kill_count, prompt_bypass);
-
- Return_Int := False;
- Kill_count := Parse_Int('/BC=',mparm_str);
- Start_Row := Parse_Int('/Y=',MParm_Str);
- If Start_Row = 0 THEN
- Start_Row := 2;
- END;
-
- tempstring := File_Name;
- prompt_bypass := parse_int('/NP=', mparm_str);
- IF caps(file_name) = '?NO-FILE?' THEN
- prompt_bypass := false;
- END;
- Try_Again:
- Return_Str := TempString;
- IF prompt_bypass THEN
- return_int := TRUE;
- ELSE
- RM('userin^QUERYBOX /HISTORY=FILE_HISTORY/C=3/H=SAVEFILE/W=60/ML=80/T=INPUT FILENAME TO SAVE/L=' + Str(Start_Row));
- END;
- If Return_Int THEN
- rm('setfilename');
- TempString := Return_Str;
-
- IF (First_Save) or (TempString <> Caps(File_Name)) THEN
- IF File_Exists(TempString) THEN
- {
- Make_Message('[' + Str(Prompt_Bypass) + ']');
- }
- RM('userin^VERIFY /C=' + parse_str('/X=',mparm_str) + '/H=SAVEFILE/T=' +
- TempString + ' exists; Overwrite? /L=' + Str(Start_Row));
- IF Return_Int = 0 THEN
- IF prompt_bypass THEN
- goto EXIT;
- END;
- Goto Try_Again;
- END;
- END;
- File_Name := TempString;
- END;
-
- Return_Int := True;
- while box_count > kill_count do
- kill_box;
- end;
- Make_Message('Saving "'+File_Name+'"...');
- Save_File;
-
- Redraw;
-
- If Error_Level = 0 THEN
- Make_Message('"'+File_Name+'" Saved.');
- ELSE
- MAKE_MESSAGE('Error occured saving file "'+File_Name+'".');
- {
- File_Changed := True;
- }
- END;
- Return_Int := True;
- ELSE
- Return_Int := False;
- END;
- EXIT:
- END_MACRO;
-
- $MACRO SAVEBLCK TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: SAVEBLCK
-
- Description: This macro will save blocks as they are marked including column
- and stream marks. It will only copy the marked text.
-
- Parameters:
- /X= X coordinate of prompt box
- /Y= Y coordinate of prompt box
- /BC= Amount of boxes currently on screen
- /FN= Default file name to save
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- def_int(scol,srow,ecol,erow,result,mrow,mcol,orig_window,stat, kill_count);
- def_str(blckname);
-
- messages := false;
-
- mrow := Parse_Int('/Y=',MParm_Str);
- scol := Parse_Int('/X=',MParm_Str);
- Kill_count := Parse_Int('/BC=',mparm_str);
-
- { SET DEFAULT EXIT STATUS }
- stat := 0;
-
- { SET PROMPT ROW AND COLUMN }
- if (mrow = 0) then
- srow := 2;
- else
- srow := mrow;
- end;
-
- if (scol = 0) then
- scol := 2;
- end;
-
- ecol := scol + 69;
- erow := srow + 3;
-
- IF Block_Stat = 0 THEN
- Return_Int := False;
- Goto Exit;
- END;
-
-
- { PROMPT USER FOR BLOCK SAVE FILE NAME }
-
- blckname := Parse_Str('/FN=',MParm_Str);
-
- IF blckname = '' THEN
- Try_AGAIN:
- Return_Str := BlckName;
- RM('userin^QUERYBOX /HISTORY=FILE_HISTORY/H=SAVEBLOCK/C=' + Str(Scol) + '/L=' + Str(Srow) + '/W=64/ML=80'
- + '/T=INPUT FILENAME TO SAVE BLOCK');
- Result := Return_Int;
- rm('setfilename');
- BlckName := Return_Str;
- ELSE
- result := true;
- END;
-
- {If escape was pressed in prompt then exit}
- IF (result = 0) THEN
- Goto Exit;
- END;
- refresh := false;
-
-
- IF File_Exists(Blckname) THEN
- RM('userin^VERIFY /C=' + parse_str('/X=',mparm_str) + '/H=SAVEBLOCK/T='+ 'File exists; Overwrite? /L=' +
- Str(SRow));
- IF Return_Int = 0 THEN
- Goto Try_Again;
- END;
- END;
- {If the this macro was called from the menu system then kill other menu boxes}
- while box_count > kill_count do
- kill_box;
- end;
-
- { CREATE A NEW WINDOW - SAVE PLACE }
-
- orig_window := Cur_Window;
- create_window;
-
- { COULD WE CREATE THE WINDOW }
- if (error_level) then
- RM('MEERROR');
- Return_Int := True;
- goto exit;
- end;
-
- { COPY AND SAVE THE COPY }
- file_name := blckname;
- window_copy(orig_window);
- save_file;
-
- { COULD WE COPY AND SAVE }
- if (error_level <> 0) then
- Make_Message('Error occured saving block.');
- else
- Make_Message('Block saved.');
- end;
- RM('meerror');
-
- delete_window;
- switch_window(orig_window);
- Refresh := True;
- Redraw;
- return_int := true;
- error_level := 0;
- Exit:
- END_MACRO;
-
- $MACRO SPLICE TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: SPLICE
-
- Description: Loads("SPLICES") a file from disk into the current window without
- dumping the current file. I.E. loads a file into a file.
-
- /Y= Y coordinate of prompt box
- /BC= Amount of boxes currently on screen
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- Def_Str(Temp_String,fm_str[50]);
- Def_Int(Temp_Refresh,Active_Window,Temp_Window,kill_count);
- Def_Int(Start_Row);
-
- Temp_Refresh := Refresh;
-
- Return_Int := False;
- Kill_count := Parse_Int('/BC=',mparm_str);
- Start_Row := Parse_Int('/Y=',MParm_Str);
- If Start_Row = 0 THEN
- Start_Row := 2;
- END;
-
- fm_str := '';
- IF (Global_Str('@FM_MACRO@') <> '') THEN
- fm_Str := '/F5=FILMGR';
- END;
-
-
- Temp_String := '';
- QAGAIN:
-
- Return_Str := Temp_String;
- RM('userin^QUERYBOX /HISTORY=FILE_HISTORY/C=3/H=LOADBLOCK/W=60/ML=80/T=INPUT FILENAME TO MERGE/F2=Dir /L=' + Str(Start_Row) + fm_str);
- If Return_Int = -1 THEN
- IF ((Key1 = 0) and (Key2 = 63)) THEN
- {This is for the new file manager macro}
- RM(global_str('@FM_MACRO@'));
- GOTO QAGAIN;
- END;
-
- if (caps(return_str) = '?NO-FILE?') or (return_str = temp_string) then
- return_str := '*.*';
- else
- if copy(return_str,length(return_str),1) <> '*' then
- return_str := return_str + '*';
- end;
- end;
- { RM('DIRLIST /SD=1/CP=1/DL=1/X=3/Y=' + str(start_Row - 4) +
- '/P=' + return_str
- );
- If Return_Int > 0 THEN
- Temp_String := Return_Str;
- END; }
- RM('DIRSHELL /S=2/X=3/Y=' + str(start_Row) +
- '/W=62/L=100/D=' + return_str
- );
- If Return_Str <> '' THEN
- Temp_String := Return_Str;
- END;
- Goto QAgain;
- END;
- Temp_String := Return_Str;
- If (Return_Int) THEN
- Refresh := False;
- while box_count > kill_count do
- kill_box;
- end;
- Active_Window := Cur_Window;
- Create_Window;
- file_name := '!!SPLICE!!.TMP';
- Temp_Window := Cur_Window;
- Return_Int := 0;
- Error_Level := 0;
- return_str := temp_string;
- set_global_int('LOAD_COUNT', 0);
- RM('ldfiles /LC=0/MC=1/NW=1/NC=1/PRE=1');
- Working;
- IF error_level <> 0 THEN
- RM('MEERROR^Beeps /C=1');
- Make_Message('File not found, or error loading.');
- Error_Level := 0;
- ELSE
- Goto_Col(1);
- Block_Begin;
- Eof;
- Block_End;
- Switch_Window(Active_Window);
- Messages := False;
- Window_Copy(Temp_Window);
- Switch_Window(Temp_Window);
- Make_Message('"' + file_name + '" inserted into file.');
- END;
- Delete_Window;
- Switch_Window(Active_Window);
- Refresh := Temp_Refresh;
- return_int := 1;
- END;
-
- END_MACRO;
-
- $MACRO FILESTAT TRANS;
- {*******************************MULTI-EDIT MACRO******************************
-
- Name: FILESTAT
-
- Description: Allows the user to examine and change the current filename
- and lock/readonly attribute.
-
- Parameters:
- /Y= Y coordinate of prompt box
- /X= X coordinate of prompt box
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- Def_Int( x, y );
- x := parse_int('/X=', mparm_str );
- y := parse_int('/Y=', mparm_str );
- IF x = 0 THEN
- x := 2;
- END;
- IF y = 0 THEN
- y := 2;
- END;
-
- Set_Global_Str('IHELP3','/C=1/L=2/H=File currently takes up ' + str( cur_file_size ) + ' bytes on disk.');
- Set_Global_Str('ISTR_1', file_name );
- Set_Global_Str('IPARM_1','/T=NAME:/C=1/W=60/ML=80/L=1');
- Set_Global_Str('ISTR_2','/T=LOCKED//READONLY and may NOT be modified/F=NOT LOCKED and may be modified');
- Set_Global_Int('IINT_2', read_only );
- Set_Global_Str('IPARM_2','/T=File is/TP=5/C=1/W=39/L=4');
-
- RM('UserIn^Data_In /H=FILEINFO/S=1/A=1/#=2/T=FILE INFORMATION/X=' + str(x) +
- '/Y=' + str(y));
-
- IF (read_only <> Global_Int('IINT_2')) THEN
- RM('MEERROR^MessageBox /B=1/T=WARNING!/M=Please exercise caution when changing the LOCKED // READONLY attribute of a file. ' +
- 'If you are on a network, this action may have adverse effects on other users.');
- END;
- READ_ONLY := global_int('IINT_2');
- cur_file_attr := (cur_file_attr AND $FFFE) OR (read_only <> 0);
- IF global_str('ISTR_1') <> file_name THEN
- file_name := fexpand(global_str('ISTR_1'));
- END;
- Return_Int := 1;
-
- END_MACRO;
-
-
- $MACRO EDFORMAT TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: EDFORMAT
-
- Description: This macro allows for editing of the format line for an
- individual file.
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- Def_Str(Temp_Line);
- DEF_INT(TEMP_WRAP, Temp_TC, temp_changed );
-
- TEMP_WRAP := WRAP_STAT;
- WRAP_STAT := FALSE;
- temp_tc := file_changed;
-
- Messages := False;
- UNDO_STAT := FALSE;
-
- Push_Labels;
- Flabel('Help',1,$FF);
- Mark_Pos;
- While C_Row > 1 DO
- UP;
- End;
- Temp_Line := Get_Line;
- Temp_Changed := Line_Changed;
- Put_Line(Format_Line);
- Redraw;
- Make_Message('Editing format line.');
- Set_Global_Str('@EFEV#1', '/T=Don''t save/KC=<ESC>/K1=27/K2=1/R=0/W=15/X=40/Y='
- + str(Message_Row));
- Set_Global_Str('@EFEV#2', '/T=Save Changes/KC=<CR>/K1=13/K2=28/R=1/W=16/X=23/Y='
- + str(Message_Row));
- RM('CheckEvents /M=2/G=@EFEV#/#=2');
-
- EF_Loop:
- Read_Key;
- If Key1 = 13 THEN
- ENTER:
- temp_tc := true;
- Make_Message('Format line changes saved. The format line WILL BE SAVED with the file.');
- GOTO Save_Exit;
- END;
- If Key1 = 27 THEN
- ESCAPE:
- Make_Message('Format line changes NOT saved. Old format line restored.');
- GOTO Exit;
- END;
- If Key1 = 9 THEN
- If (Length(Get_Line) < 999) AND (C_Col < 999) THEN
- Text('|16');
- ELSE
- Make_Message('Format line to long!');
- END;
- GOTO Ef_Loop;
- END;
- If Key1 = 8 THEN
- IF C_COL > 1 THEN
- Back_Space;
- END;
- GOTO Ef_Loop;
- END;
- If Key1 = 0 THEN
- IF key2 = 250 THEN
- IF (mou_last_x > win_x1) AND (mou_last_x < win_x2) AND
- (mou_last_y = wherey) THEN
- RM('MOUSE^MouseInWindow');
- IF return_int THEN
- RM('MOUSE^Mouse_Move /H=1');
- END;
- ELSE
- RM('CheckEvents /M=1/G=@EFEV#/#=2');
- IF (Return_Int = 1) THEN
- Goto ESCAPE;
- ELSIF (Return_Int = 2) THEN
- Goto ENTER;
- END;
- END;
- ELSIf Key2 = 77 THEN
- If C_Col < 999 THEN
- RIGHT;
- END;
- GOTO Ef_Loop;
- END;
- If key2 = 75 THEN
- If C_Col > 1 THEN
- LEFT;
- END;
- GOTO EF_Loop;
- END;
- If key2 = 83 THEN
- If NOT( At_Eol ) THEN
- Del_Char;
- END;
- GOTO EF_Loop;
- END;
- If key2 = 79 THEN
- EOL;
- GOTO EF_Loop;
- END;
- If key2 = 71 THEN
- GOTO_COL(1);
- REDRAW;
- GOTO EF_Loop;
- END;
- If key2 = 82 THEN
- Insert_Mode := NOT( Insert_Mode);
- GOTO EF_Loop;
- END;
- If key2 = 116 THEN
- IF C_Col < 999 THEN
- RIGHT;
- While (Cur_Char <> '|0') and (C_Col < 999) and (Cur_Char <> '|16') DO
- RIGHT;
- END;
- END;
- GOTO EF_Loop;
- END;
- If key2 = 115 THEN
- If C_Col > 1 THEN
- LEFT;
- While (Cur_Char <> '|0') and (C_Col > 1) and (Cur_Char <> '|16') DO
- LEFT;
- END;
- END;
- GOTO EF_Loop;
- END;
- If key2 = 59 THEN
- Help('FM');
- END;
- GOTO Ef_Loop;
- END;
-
- If (Length(Get_Line) < 999) AND (C_Col < 999) THEN
- Text(Char(Key1));
- ELSE
- Make_Message('Format line to long!');
- END;
-
- GOTO EF_Loop;
- Save_Exit:
- Format_Line := Get_Line;
- TEMP_WRAP := WRAP_STAT;
- Format_Stat := True;
- Exit:
-
- Put_Line(Temp_Line);
- RM('CheckEvents /M=3/G=@EFEV#/#=2');
- Line_Changed := Temp_Changed;
- file_changed := temp_tc;
- Goto_Mark;
- WRAP_STAT := TEMP_WRAP;
- UNDO_STAT := TRUE;
- Messages := True;
- Pop_Labels;
- redraw;
- END_MACRO;
-
- $MACRO EXEC TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: EXEC
-
- Description: Executes a DOS command or program
-
- Parameters: Return_Str = the command line
- /MEM=nn The amount of memory needed to run the program.
- (in paragraphs).
- 0=ALL available.
- /SWAP=nn The swap method to use
- 0 = Use default method
- 1 = No swap
- 2 = Swap to disk only
- 3 = Swap to ems only
- 4 = Swap to ems then to disk
- /CMD=1 Use COMMAND.COM (or COMSPEC equivalent).
- /SCREEN=1 Restore old dos screen.
- =2 Clear screen, put cursor at top
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- def_int(
- screen_mode,
- t_swap_mode,
- t_swap_mem,
- jx,
- t_status_row,
- tr
- );
-
- tr := refresh;
- refresh := false;
- t_swap_mem := swap_mem;
- t_swap_mode := swap_mode;
- t_status_row := status_row;
- status_row := 0;
- RM( 'XlateCmdLine' );
-
- screen_mode := parse_int('/SCREEN=', mparm_str );
- swap_mem := parse_int('/MEM=', mparm_str);
- jx := parse_int( '/SWAP=', mparm_str );
- IF jx > 0 THEN
- swap_mode := jx - 1;
- END;
-
- IF screen_mode = 1 THEN
- save_box(1,1,screen_width,screen_length);
- rest_dos_screen;
- ELSIF screen_mode = 2 THEN
- save_box(1,1,screen_width,screen_length);
- clear_screen( dos_color + (dos_back shl 4 ));
- gotoxy(1,1);
- END;
- shell_to_dos( return_str, parse_int( '/CMD=', mparm_str ) );
- IF screen_mode = 1 THEN
- save_dos_screen;
- kill_box;
- ELSIF screen_mode = 2 THEN
- kill_box;
- END;
- swap_mem := t_swap_mem;
- swap_mode := t_swap_mode;
- status_row := t_status_row;
- refresh := tr;
- END_MACRO;
-
-
- $MACRO SHELLDOS TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: SHELLDOS
-
- Description: Run DOS from EDIT mode, restoring the original DOS screen.
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
- def_int(tr);
- tr := refresh;
- refresh := false;
- return_str := global_str( '@SHELL_TO_DOS_CMD' );
- IF return_str = '' THEN
- return_str := '<COMSPEC> /E:1000 /c <ME_PATH>DOSPROMPT';
- END;
- RM('EXEC /SWAP=0/MEM=' + str(swap_mem) + '/SCREEN=1');
- refresh := tr;
- END_MACRO;
-
- $MACRO RUNMAC TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: RUNMAC
-
- Description: Prompt for and run a macro.
-
- /Y= Y coordinate of prompt box
- /BC= Amount of boxes currently on screen
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- Def_Int( Y1, kill_count );
-
- Kill_count := Parse_Int('/BC=',mparm_str);
- Y1 := Parse_Int('/Y=',MParm_Str);
- If Y1 = 0 THEN
- Y1 := 2;
- END;
-
- Return_Str := Global_Str('MAC_RUN');
- RM('userin^QUERYBOX /HISTORY=MACRO_HISTORY/H=MC/C=3/L=' + Str(Y1) + '/ML=254/W=65/T=RUN MACRO');
- Set_Global_Str('MAC_RUN',Return_Str);
- IF (Return_Int) THEN
- while box_count > kill_count do
- kill_box;
- end;
- RM(Return_Str);
- END;
- return_int := 100;
- END_MACRO;
-
- $MACRO REPEAT TRANS;
- {******************************************************************************
- MULTI-EDIT MACRO
-
- Name: Repeat
-
- Description: Performs a simple, single key command repeat function.
-
- (C) Copyright 1989 by American Cybernetics, Inc.
- ******************************************************************************}
-
- def_int(
- k1,k2, { Key codes to be repeated }
- count { Number of repeats }
- );
-
- def_str(
- count_str { Stores the inputed string }
- );
-
- count := 0;
- count_str := '1'; { Start with a count of one }
- {Now read keys. Build count_str until a non numeric key is pressed.
- Use that key to repeat}
- LP1:
- make_message('Repeat command ' + count_str + ' times; Type command, count or <ESC>.');
- read_key;
- if ((key1 > 47) and (key1 < 58) and (key2 < 12)) then
- if count = 0 then
- count_str := CHAR(key1);
- else
- count_str := count_str + CHAR(key1);
- end;
- ++count;
- goto lp1;
- else
- make_message('');
- if (key1 = 27) and (key2 = 1) then
- goto exit;
- end;
- if val(count,count_str) = 0 THEN
- k1 := key1;
- k2 := key2;
- Push_Undo;
- while count > 0 do
- Pass_key(k1,k2);
- while check_key do {We must do this to avoid problems with}
- pass_key(key1,key2); { nested keystroke macros }
- end;
- count := count - 1;
- end;
- Pop_Undo;
- redraw;
- end;
- end;
- exit:
- END_MACRO;
-