Merge remote-tracking branch 'Blu3train/cmdline_paramete_clipboard_selection_at_startup'

This commit is contained in:
Chenx221 2024-09-05 12:39:45 +08:00
commit bdf06b518b
2 changed files with 8 additions and 5 deletions

View File

@ -688,11 +688,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
std::unique_ptr<LPWSTR[], Functor<LocalFree>> argv(CommandLineToArgvW(GetCommandLineW(), &argc)); std::unique_ptr<LPWSTR[], Functor<LocalFree>> argv(CommandLineToArgvW(GetCommandLineW(), &argc));
for (int i = 0; i < argc; ++i) for (int i = 0; i < argc; ++i)
if (std::wstring arg = argv[i]; arg[0] == L'/' || arg[0] == L'-') if (std::wstring arg = argv[i]; arg[0] == L'/' || arg[0] == L'-')
{
if (arg[1] == L'p' || arg[1] == L'P') if (arg[1] == L'p' || arg[1] == L'P')
if (DWORD processId = wcstoul(arg.substr(2).c_str(), nullptr, 0)) Host::InjectProcess(processId); if (DWORD processId = wcstoul(arg.substr(2).c_str(), nullptr, 0)) Host::InjectProcess(processId);
else for (auto [processId, processName] : processes) else for (auto [processId, processName] : processes)
if (processName.value_or(L"").find(L"\\" + arg.substr(2)) != std::string::npos) Host::InjectProcess(processId); 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(); std::thread([] { for (; ; Sleep(10000)) AttachSavedProcesses(); }).detach();
} }

View File

@ -107,7 +107,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 You can do so via the project homepage (issues section) or via email
Source code available under GPLv3 at project homepage 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 :))"; 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)"; 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* UPDATE_AVAILABLE = L"Update available: download it from https://github.com/Artikash/Textractor/releases";
const wchar_t* ALREADY_INJECTED = L"Textractor: already injected"; const wchar_t* ALREADY_INJECTED = L"Textractor: already injected";
@ -617,7 +617,7 @@ padding: длина добавочных данных перед строкой
Сделать это вы можете на домашней странице (секция issues) или через электронную почту Сделать это вы можете на домашней странице (секция issues) или через электронную почту
Исходный код доступен по лицензии GPLv3 на домашней странице проекта Исходный код доступен по лицензии 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)"; пример: Textractor -p4466 -p"My Game.exe" попробует присоединиться к процессу с ID 4466 или с именем My Game.exe)";
UPDATE_AVAILABLE = L"Доступно обновление: загрузите его на https://github.com/Artikash/Textractor/releases"; UPDATE_AVAILABLE = L"Доступно обновление: загрузите его на https://github.com/Artikash/Textractor/releases";
ALREADY_INJECTED = L"Textractor: уже присоединен"; ALREADY_INJECTED = L"Textractor: уже присоединен";
@ -876,7 +876,7 @@ Puoi farlo attraverso la pagina principale del progetto (sezione issues) o via e
Il codice sorgente è disponibile sotto il GPLv3 nella pagina principale 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 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 :))"; 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)"; 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"; UPDATE_AVAILABLE = L"Aggiornamento disponibile: scaricala da https://github.com/Artikash/Textractor/releases";
ALREADY_INJECTED = L"Textractor: già inniettato"; ALREADY_INJECTED = L"Textractor: già inniettato";
@ -1313,7 +1313,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 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 Code source disponible sous GPLv3 sur la page d'accueil du projet
Si vous aimez ce projet, parlez-en à tout le monde :))"; 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)"; 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"; UPDATE_AVAILABLE = L"Mise à jour disponible: téléchargez-la depuis https://github.com/Artikash/Textractor/releases";
ALREADY_INJECTED = L"Textractor: déjà injecté"; ALREADY_INJECTED = L"Textractor: déjà injecté";