Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TForm2.BitBtn2Click(Sender: TObject);
- var I: Integer; Line: string; Found: Integer;
- begin
- I:= 0;
- Found:= 0;
- while I< AdvMemo1.Lines.Count do begin
- if Found= 0 then
- if Pos( 'G1 E-', AdvMemo1.Lines[I])= 1 then
- if Pos( '; process Color', AdvMemo1.Lines[I+1])= 1 then
- if Pos( 'G1 E', AdvMemo1.Lines[I+ 6])= 1 then begin
- Found:= 1;
- Line:= AdvMemo1.Lines[I+ 6];
- end;
- I:= I+ 1;
- end;
- I:= 0;
- while I< AdvMemo1.Lines.Count do begin
- if Found= 1 then
- if Pos( 'G1 E-', AdvMemo1.Lines[I])= 1 then
- if Pos( '; process Color', AdvMemo1.Lines[I+1])= 1 then
- if Pos( 'G1 X', AdvMemo1.Lines[I+ 6])= 1 then begin
- Found:= 2;
- AdvMemo1.Lines.Insert( I+ 6, Line);
- Line:= AdvMemo1.Lines[I+ 6];
- AdvMemo1.ActiveLine:= I+ 6;
- end;
- I:= I+ 1;
- end;
- if Found= 2 then BitBtn2.Enabled:= False;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement