2018-12-17 20:48:14 -05:00
|
|
|
#include "extension.h"
|
2018-08-19 00:13:19 -04:00
|
|
|
|
2018-09-22 15:08:31 -04:00
|
|
|
bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo)
|
2018-08-19 00:13:19 -04:00
|
|
|
{
|
2018-11-03 23:26:27 -04:00
|
|
|
if (sentenceInfo["current select"] && sentenceInfo["hook address"] != -1)
|
2018-08-19 00:13:19 -04:00
|
|
|
{
|
2018-11-15 00:06:10 -05:00
|
|
|
if (!OpenClipboard(FindWindowW(NULL, L"Textractor"))) return false;
|
2018-09-01 04:24:22 -04:00
|
|
|
HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, (sentence.size() + 2) * sizeof(wchar_t));
|
|
|
|
memcpy(GlobalLock(hMem), sentence.c_str(), (sentence.size() + 2) * sizeof(wchar_t));
|
|
|
|
EmptyClipboard();
|
|
|
|
SetClipboardData(CF_UNICODETEXT, hMem);
|
2018-11-15 00:06:10 -05:00
|
|
|
GlobalUnlock(hMem);
|
2018-09-01 04:24:22 -04:00
|
|
|
CloseClipboard();
|
2018-08-19 00:13:19 -04:00
|
|
|
}
|
2018-09-01 04:24:22 -04:00
|
|
|
return false;
|
2018-12-18 16:55:07 -05:00
|
|
|
}
|