From 85f9d73868a7b96e658fd3000122c8fd9e36b7c0 Mon Sep 17 00:00:00 2001 From: Blu3train Date: Sun, 22 May 2022 15:52:43 +0200 Subject: [PATCH] cmdline parameter -c clipboard selection at startup --- GUI/mainwindow.cpp | 5 ++++- text.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index d95af3c..2501c5f 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -679,11 +679,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) std::unique_ptr> argv(CommandLineToArgvW(GetCommandLineW(), &argc)); for (int i = 0; i < argc; ++i) if (std::wstring arg = argv[i]; arg[0] == L'/' || arg[0] == L'-') + { if (arg[1] == L'p' || arg[1] == L'P') if (DWORD processId = wcstoul(arg.substr(2).c_str(), nullptr, 0)) Host::InjectProcess(processId); else for (auto [processId, processName] : processes) if (processName.value_or(L"").find(L"\\" + arg.substr(2)) != std::string::npos) Host::InjectProcess(processId); - + if (arg[1] == L'c' || arg[1] == L'C') + ViewThread(1); + } std::thread([] { for (; ; Sleep(10000)) AttachSavedProcesses(); }).detach(); } diff --git a/text.cpp b/text.cpp index b68a1f7..871b8f8 100644 --- a/text.cpp +++ b/text.cpp @@ -105,7 +105,7 @@ Please contact Artikash with any problems, feature requests, or questions relati You can do so via the project homepage (issues section) or via email Source code available under GPLv3 at project homepage If you like this project, please tell everyone about it! It's time to put AGTH down :))"; -const wchar_t* CL_OPTIONS = LR"(usage: Textractor [-p{process ID|"process name"}]... +const wchar_t* CL_OPTIONS = LR"(usage: Textractor [-c] [-p{process ID|"process name"}]... example: Textractor -p4466 -p"My Game.exe" tries to inject processes with ID 4466 or with name My Game.exe)"; const wchar_t* UPDATE_AVAILABLE = L"Update available: download it from https://github.com/Artikash/Textractor/releases"; const wchar_t* ALREADY_INJECTED = L"Textractor: already injected"; @@ -576,7 +576,7 @@ padding: длина добавочных данных перед строкой Сделать это вы можете на домашней странице (секция issues) или через электронную почту Исходный код доступен по лицензии GPLv3 на домашней странице проекта Если эта программа вам понравилась, расскажите всем о ней :))"; - CL_OPTIONS = LR"(использование: Textractor [-p{process ID|"process name"}]... + CL_OPTIONS = LR"(использование: Textractor [-c] [-p{process ID|"process name"}]... пример: Textractor -p4466 -p"My Game.exe" попробует присоединиться к процессу с ID 4466 или с именем My Game.exe)"; UPDATE_AVAILABLE = L"Доступно обновление: загрузите его на https://github.com/Artikash/Textractor/releases"; ALREADY_INJECTED = L"Textractor: уже присоединен"; @@ -833,7 +833,7 @@ Puoi farlo attraverso la pagina principale del progetto (sezione issues) o via e Il codice sorgente è disponibile sotto il GPLv3 nella pagina principale Al momento sono in cerca di un nuovo lavoro: contattatemi per email se conoscete qualcuno che ingaggia periti informatici statunitensi Se ti piace questo progetto, parlane con tutti per favore :))"; - CL_OPTIONS = LR"(utilizzo: Textractor [-p{process ID|"process name"}]... + CL_OPTIONS = LR"(utilizzo: Textractor [-c] [-p{process ID|"process name"}]... esempio: Textractor -p4466 -p"My Game.exe" sta tentando di inniettare i processi con l'ID 4466 o con il nome My Game.exe)"; UPDATE_AVAILABLE = L"Aggiornamento disponibile: scaricala da https://github.com/Artikash/Textractor/releases"; ALREADY_INJECTED = L"Textractor: già inniettato"; @@ -1269,7 +1269,7 @@ Veuillez me contacter pour tout problème, demande de fonctionnalité ou questio Vous pouvez le faire via la page d'accueil du projet (section problèmes) ou par e-mail Code source disponible sous GPLv3 sur la page d'accueil du projet Si vous aimez ce projet, parlez-en à tout le monde :))"; - CL_OPTIONS = LR"(usage: Textractor [-p{process ID|"process name"}]... + CL_OPTIONS = LR"(usage: Textractor [-c] [-p{process ID|"process name"}]... example: Textractor -p4466 -p"My Game.exe" tries to inject processes with ID 4466 or with name My Game.exe)"; UPDATE_AVAILABLE = L"Mise à jour disponible: téléchargez-la depuis https://github.com/Artikash/Textractor/releases"; ALREADY_INJECTED = L"Textractor: déjà injecté";