1. Как заставить прогу Прочитать текст из блокнота?
There are several ways. It depends on the exact situation. Here are 2 examples (Text file example is attached).
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.1.9-->
<commandGroup open="True" name="чтение из текстового файла" enabled="True" prefix="" priority="0" requiredProcess="" description="">
<command id="136" name="читать текст на линии номер {1}" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>File.Read</cmdType>
<params>
<param>C:\Users\[имя пользователя]\Desktop\test.txt</param>
<param>{1}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>линии № {1}:</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.AddText</cmdType>
<params>
<param>{LastResult}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<phrase>читать текст на линии номер</phrase>
<payloadRange>0,100</payloadRange>
</command>
<command id="169" name="найти Петр Иванович" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="Results.RegEx == 'regular expressions'. https://msdn.microsoft.com/ru-ru/library/az24scfc(v=vs.110).aspx">
<action>
<cmdType>File.Read</cmdType>
<params>
<param>C:\Users\[имя пользователя]\Desktop\test.txt</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>Results.RegEx</cmdType>
<params>
<param>\.\s(.*?Петр\sИванович.*?\.\s)</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.ShowText</cmdType>
<params>
<param>Я нашел {#M} предложений, содержащий имя 'Петр Иванович'</param>
<param>10000</param>
<param>-20</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
<action>
<cmdType>OSD.AddText</cmdType>
<params>
<param>Вот номер 2: {Match.2}</param>
</params>
<cmdRepeat>1</cmdRepeat>
</action>
</command>
</commandGroup>
File.Read is the action that can read a text file on your computer.
The text retrieved is then stored as
{LastResult}