Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNowak98 committed Jul 30, 2024
1 parent 1c49602 commit 27d7ad0
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/saves_popup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,22 +273,6 @@ if (ImGui::Button(appLanguage[Key::Save])) {
}
i++;
}
const char* script_path = "script.py";

// Befehl zum Ausführen des Python-Skripts
std::string command = "python3 ";
command += script_path;

// Ausführen des Befehls mit system()
int result = system(command.c_str());

// Überprüfen des Rückgabewerts
if (result == 0) {
std::cout << "Python script executed successfully." << std::endl;
} else {
std::cerr << "Error executing Python script." << std::endl;
}

}

if (savingInProgress) {
Expand All @@ -309,7 +293,25 @@ if (savingInProgress) {
for (auto& field : inptTxtFields) {
field.clear(); // Reset storage location after each save
}
ImGui::CloseCurrentPopup();
ImGui::CloseCurrentPopup();

const char* script_path = "script.py";

// Befehl zum Ausführen des Python-Skripts
std::string command = "python3 ";
command += script_path;

// Ausführen des Befehls mit system()
int result = system(command.c_str());

// Überprüfen des Rückgabewerts
if (result == 0) {
std::cout << "Python script executed successfully." << std::endl;
} else {
std::cerr << "Error executing Python script." << std::endl;
}


} else {
float progressValue = 0.0f;
for (const auto& future : futures) {
Expand Down

0 comments on commit 27d7ad0

Please sign in to comment.