Я довольно новичок в создании скриптов через окна. Возможно, мне даже нужно что-то другое, кроме скрипта. Я сделал некоторые подобные вещи в linux, используя sed с файлом csv, но я хочу создать файл сценария .bat (или что-то подобное), который будет использоваться в файле заголовка c и удалить все завершающие пробелы..bat скрипт для удаления конечных пробелов
редактировать Причина: (Мой Svn репо не позволяет завершающим пробела и при работе с C++ UI Form добавляет комментарии с завершающими пробелами каждый раз, когда я добавить новый объект, как кнопка, например)
редактировать: это происходит после того, как эти комментарии, показанные ниже
"//
// outputStringsTab
// "
пример Snippit:
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->tabCollection = (gcnew System::Windows::Forms::TabControl());
this->outputStringsTab = (gcnew System::Windows::Forms::TabPage());
this->justificationComboBox = (gcnew System::Windows::Forms::ComboBox());
this->stringSizeDropBox = (gcnew System::Windows::Forms::ComboBox());
this->stringFontLabel = (gcnew System::Windows::Forms::Label());
this->label7 = (gcnew System::Windows::Forms::Label());
this->stringSizeLabel = (gcnew System::Windows::Forms::Label());
this->stringBackgroundLabel = (gcnew System::Windows::Forms::Label());
this->fontCheckListBox = (gcnew System::Windows::Forms::CheckedListBox());
this->greenRadio = (gcnew System::Windows::Forms::RadioButton());
this->blueRadio = (gcnew System::Windows::Forms::RadioButton());
this->whiteRadio = (gcnew System::Windows::Forms::RadioButton());
this->blackRadio = (gcnew System::Windows::Forms::RadioButton());
this->label4 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label1 = (gcnew System::Windows::Forms::Label());
this->shapePage = (gcnew System::Windows::Forms::TabPage());
this->circleAngleGroupBox = (gcnew System::Windows::Forms::GroupBox());
this->circleAngleLabel = (gcnew System::Windows::Forms::Label());
this->circleAngleStartTextBox = (gcnew System::Windows::Forms::TextBox());
this->circleAngleEndTextBox = (gcnew System::Windows::Forms::TextBox());
this->circleAngleButton = (gcnew System::Windows::Forms::Button());
this->startAngleLabel = (gcnew System::Windows::Forms::Label());
this->degreesLabel2 = (gcnew System::Windows::Forms::Label());
this->endAngleLabel = (gcnew System::Windows::Forms::Label());
this->degreesLabel1 = (gcnew System::Windows::Forms::Label());
this->lineSuppresionGroupBox = (gcnew System::Windows::Forms::GroupBox());
this->squareLineLabel = (gcnew System::Windows::Forms::Label());
this->noneSuppressRadio = (gcnew System::Windows::Forms::RadioButton());
this->topSuppressRadio = (gcnew System::Windows::Forms::RadioButton());
this->bottomSuppressRadio = (gcnew System::Windows::Forms::RadioButton());
this->leftSuppressRadio = (gcnew System::Windows::Forms::RadioButton());
this->rightSuppressRadio = (gcnew System::Windows::Forms::RadioButton());
this->sizeGroupBox = (gcnew System::Windows::Forms::GroupBox());
this->circleRadioButton = (gcnew System::Windows::Forms::RadioButton());
this->shapesHeightWidthLabel = (gcnew System::Windows::Forms::Label());
this->squareRadioButton = (gcnew System::Windows::Forms::RadioButton());
this->heightTextBox = (gcnew System::Windows::Forms::TextBox());
this->heightLabel = (gcnew System::Windows::Forms::Label());
this->sizeSendButton = (gcnew System::Windows::Forms::Button());
this->widthLabel = (gcnew System::Windows::Forms::Label());
this->widthTextBox = (gcnew System::Windows::Forms::TextBox());
this->gaugeTabPage = (gcnew System::Windows::Forms::TabPage());
this->gaugeValueGroupBox = (gcnew System::Windows::Forms::GroupBox());
this->barValueRadioButton = (gcnew System::Windows::Forms::RadioButton());
this->label5 = (gcnew System::Windows::Forms::Label());
this->meterValueRadioButton = (gcnew System::Windows::Forms::RadioButton());
this->label6 = (gcnew System::Windows::Forms::Label());
this->arcValueRadioButton = (gcnew System::Windows::Forms::RadioButton());
this->gaugeValueTrackBar = (gcnew System::Windows::Forms::TrackBar());
this->trackBarLabel = (gcnew System::Windows::Forms::Label());
this->tabCollection->SuspendLayout();
this->outputStringsTab->SuspendLayout();
this->shapePage->SuspendLayout();
this->circleAngleGroupBox->SuspendLayout();
this->lineSuppresionGroupBox->SuspendLayout();
this->sizeGroupBox->SuspendLayout();
this->gaugeTabPage->SuspendLayout();
this->gaugeValueGroupBox->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->gaugeValueTrackBar))->BeginInit();
this->SuspendLayout();
//
// tabCollection
//
this->tabCollection->Controls->Add(this->outputStringsTab);
this->tabCollection->Controls->Add(this->shapePage);
this->tabCollection->Controls->Add(this->gaugeTabPage);
this->tabCollection->Location = System::Drawing::Point(12, 12);
this->tabCollection->Name = L"tabCollection";
this->tabCollection->SelectedIndex = 0;
this->tabCollection->Size = System::Drawing::Size(827, 396);
this->tabCollection->TabIndex = 0;
//
// outputStringsTab
//
this->outputStringsTab->BackColor = System::Drawing::Color::White;
this->outputStringsTab->Controls->Add(this->justificationComboBox);
this->outputStringsTab->Controls->Add(this->stringSizeDropBox);
this->outputStringsTab->Controls->Add(this->stringFontLabel);
this->outputStringsTab->Controls->Add(this->label7);
this->outputStringsTab->Controls->Add(this->stringSizeLabel);
this->outputStringsTab->Controls->Add(this->stringBackgroundLabel);
this->outputStringsTab->Controls->Add(this->fontCheckListBox);
this->outputStringsTab->Controls->Add(this->greenRadio);
this->outputStringsTab->Controls->Add(this->blueRadio);
this->outputStringsTab->Controls->Add(this->whiteRadio);
this->outputStringsTab->Controls->Add(this->blackRadio);
this->outputStringsTab->Controls->Add(this->label4);
this->outputStringsTab->Controls->Add(this->label3);
this->outputStringsTab->Controls->Add(this->label2);
this->outputStringsTab->Controls->Add(this->label1);
this->outputStringsTab->Location = System::Drawing::Point(4, 22);
this->outputStringsTab->Name = L"outputStringsTab";
this->outputStringsTab->Padding = System::Windows::Forms::Padding(3);
this->outputStringsTab->Size = System::Drawing::Size(819, 370);
this->outputStringsTab->TabIndex = 0;
this->outputStringsTab->Text = L"Output Strings";
//
// justificationComboBox
//
this->justificationComboBox->FormattingEnabled = true;
this->justificationComboBox->Items->AddRange(gcnew cli::array<System::Object^>(3) { L"Left", L"Middle", L"Right" });
... и т.д.
Почему это проблема C или C++? Я предлагаю удалить теги C и C++, так как вы говорите о пакетном файле, используя язык сценариев MSDOS. –
My Svn repo не позволяет заканчивать пробелы, а при работе с формой C++ UI он добавляет комментарии с завершающим пробелом каждый раз, когда я добавляю новый объект, например, например, с помощью кнопки – user3542604
. Если бы это было о C или C++, вы бы представить нам программу C или C++, которая обрезает конечное пробел. –