{*******************************************************} { } { Pascal Script Source File } { Run by RemObjects Pascal Script in CnWizards } { } { Generated by CnPack IDE Wizards } { } {*******************************************************} program FormatSrc; uses Windows, SysUtils, Classes, CnWizIdeUtils; function DupeString(const AText: string; ACount: Integer): string; var i: Integer; begin i := ACount; while i > 0 do begin Result := Result + AText; i := i - 1; end; end; var Lines: TStringList; sTemp: string; i, FirstPos: Integer; IsDelphi: Boolean; begin IsDelphi := WizOptions.CompilerID <> 'CB6'; Lines := TStringList.Create; try if IdeGetEditorSelectedLines(Lines) and (Lines.Count > 0) then begin for i := 0 to Lines.Count - 1 do begin sTemp := Lines[i]; if sTemp = '' then continue; if sTemp[Length(sTemp)] <> ';' then continue; while (Length(sTemp) >=2) and (sTemp[Length(sTemp) - 1] = ' ') do Delete(sTemp, Length(sTemp) - 1, 1); Lines[i] := sTemp; end; IdeSetEditorSelectedLines(Lines); end; finally Lines.Free; end; end.