Example-Extension/README.md

20 lines
1.2 KiB
Markdown
Raw Normal View History

2019-03-17 10:05:13 +08:00
# Example Extension
2018-07-14 01:35:39 +08:00
2019-09-05 00:54:55 +08:00
Every time Textractor has a sentence of text ready, it will call `ProcessSentence` on all extensions it finds sequentially (via `OnNewSentence`)
2018-07-14 01:35:39 +08:00
After the sentence has been processed by all extensions, it will be displayed.
2018-09-23 05:33:40 +08:00
# SentenceInfo
2018-08-18 02:30:06 +08:00
2019-09-05 00:54:55 +08:00
## The following properties are in `SentenceInfo`
`"current select"`: always 0 unless the sentence is in the text thread selected by the user.<br>
`"process id"`: process id that the sentence is coming from. 0 for console and clipboard.<br>
`"text number"`: number of the current text thread. Counts up one by one as text threads are created. 0 for console, 1 for clipboard.<br>
`"text name"`: pointer to start of a wchar array of the name of the current text thread.<br>
2020-08-12 21:02:25 +08:00
`"void (*AddSentence)(int64_t number, const wchar_t* sentence)"`: pointer to function that adds a sentence to the text thread with the specified number.<br>
`"void (*AddText)(int64_t number, const wchar_t* text)"`: similar to AddSentence, but doesn't treat the text like it's a full sentence.<br>
`"DWORD (*GetSelectedProcessId)()"`: pointer to function that returns the process id currently selected in Textractor's top left dropdown.
2018-08-18 02:30:06 +08:00
2018-07-14 01:35:39 +08:00
# Notes
2019-09-05 00:54:55 +08:00
You just need Visual Studio with basic C++ support to compile this project.