forked from Public-Mirror/Textractor
improve UX
This commit is contained in:
parent
b290392034
commit
34acf4f300
@ -175,10 +175,10 @@ void MainWindow::on_attachButton_clicked()
|
||||
{
|
||||
bool ok;
|
||||
QString process = QInputDialog::getItem(this, "Select Process",
|
||||
"If you don't see the process you want to inject, try running with admin rights",
|
||||
"If you don't see the process you want to inject, try running with admin rights\r\nYou can also just type in the process id if you know it",
|
||||
GetAllProcesses(), 0, true, &ok);
|
||||
if (!ok) return;
|
||||
if (!Host::InjectProcess(process.split(":")[1].toInt())) Host::AddConsoleOutput(L"Failed to attach");
|
||||
if (!Host::InjectProcess(process.split(":")[0].toInt())) Host::AddConsoleOutput(L"Failed to attach");
|
||||
}
|
||||
|
||||
void MainWindow::on_detachButton_clicked()
|
||||
|
@ -28,7 +28,9 @@ QStringList GetAllProcesses()
|
||||
for (int i = 0; i < spaceUsed / sizeof(DWORD); ++i)
|
||||
if (GetModuleName(allProcessIds[i]).size())
|
||||
ret.push_back(GetModuleName(allProcessIds[i]) + ":" + QString::number(allProcessIds[i]));
|
||||
ret.sort();
|
||||
ret.sort(Qt::CaseInsensitive);
|
||||
for (int i = 0; i < ret.size(); ++i)
|
||||
ret[i] = ret[i].split(":")[1] + ": " + ret[i].split(":")[0];
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user