<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Как можно вытащить слово из строки и вставить его в другое место?]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=15042&amp;type=atom" />
	<updated>2019-10-29T18:43:18Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=15042</id>
		<entry>
			<title type="html"><![CDATA[AHK: Как можно вытащить слово из строки и вставить его в другое место?]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=136488#p136488" />
			<content type="html"><![CDATA[<p>Тут всё нормально, всё вытаскивается как я хочу. ([29.10.2019][Perdo_Brudda][Гражданский - Охраник][Собеседование])</p><div class="codebox"><pre><code>Numpad1::  
checkfile = %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt 
FileDelete %checkfile% 
FileAppend %checkfile% 
Sleep 200 
SendMessage, 0x50,, 0x4190419,, A
Sendinput, {F6}Введите ID для принятия: {SPASE}
Input, ID, V I M, {enter}
SendInput {end}+{home}{del}{esc}
Sleep 200
SendInput, {F6}/me взял со стола кейс с формой.{Enter}
Sleep 1000
SendInput, {F6}/do Кейс в руках.{Enter}
Sleep 1000
SendInput, {F6}/me открыл кейс.{Enter}
Sleep 1000
SendInput, {F6}/me достал форму сотрудника Больницы и передал человеку напротив.{Enter}
Sleep 1000
SendInput, {F6}Поздравляю.{Enter}
Sleep 1000
SendInput,{f6}/invite %ID%{Enter}
Sleep 500 
FileRead, info, %checkfile% 
RegExMatch(info, &quot;Вы пригласили (.*)_(.*) присоединится к ЦГБ Арзамаса&quot;, pname) 
name = %pname1%
family = %pname2%  
Sleep 1000
Keywait ,F3,D 
SendMessage, 0x50,, 0x4190419,, A
Sendinput, {F6}Введите причину: {SPASE}
Input, prich, V I M, {enter}
SendInput {end}+{home}{del}{esc}
Sleep 100
SendMessage, 0x50,, 0x4190419,, A
Sendinput, {F6}Введите звание после принятия: {SPASE}
Input, after, V I M, {enter}
SendInput {end}+{home}{del}{esc}
Sleep 200
SendInput {f6}{[}%A_DD%.%A_MM%.%A_Year%{]}
Sleep 200
SendInput {[}%pname1%_%pname2%{]}
Sleep 200
SendInput {[}Гражданский - %after%{]}
Sleep 200
SendInput {[}%prich%{]}
Sleep 200
SendInput {shift down}{left 100}{shift up}^{vk58}{backspace}{f6}
Return </code></pre></div><p>Но тут меня напрягает что вытягивается более чем пол строки вместо нужных слов ([29.10.2019][Вы уволили игрока Kostya_Nadtochiy из организации. Прична: проф. непригоден][Инфекционист - Гражданский][с/ж])</p><div class="codebox"><pre><code>Numpad2::
checkfile = %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt 
FileDelete %checkfile% 
FileAppend %checkfile% 
SendMessage, 0x50,, 0x4190419,, A 
Sleep 200 
SendMessage, 0x50,, 0x4190419,, A
Sendinput, {F6}Введите ID для увольнянения: {SPASE}
Input, ID, V I M, {enter}
SendInput {end}+{home}{del}{esc}
Sleep 200
SendMessage, 0x50,, 0x4190419,, A
Sendinput, {F6}Введите причину: {SPASE}
Input, prich, V I M, {enter}
SendInput {end}+{home}{del}{esc}
Sleep 200
Sendinput,{F6}/me достал планшет.{ENTER}
sleep 1000
Sendinput,{F6}/do Планшет в руках.{ENTER}
sleep 1000
Sendinput,{F6}/me зашел в базу данных.{ENTER}
sleep 1000
Sendinput,{F6}/me нашел личное дело cотрудника Больницы{ENTER}
sleep 1000
Sendinput,{F6}/me удалил личное дело сотрудника.{ENTER}
Sleep 1000
SendInput,{f6}/uninvite %ID% %prich%{enter}
Sleep 500 
FileRead, info, %checkfile% 
RegExMatch(info, &quot;Вы уволили игрока (.*)_(.*) из организации. Причина: (.*)&quot;, pname) 
name = %pname1%
family = %pname2%
pricina = %pname3% 
Sleep 1000
Keywait ,F3,D 
SendMessage, 0x50,, 0x4190419,, A
Sendinput, {F6}Введите звание до понижения/повышения: {SPASE}
Input, before, V I M, {enter}
SendInput {end}+{home}{del}{esc}
Sleep 200
SendInput {f6}{[}%A_DD%.%A_MM%.%A_Year%{]}
Sleep 200
SendInput {[}%pname%{]}
Sleep 200
SendInput {[}%before% - 
Sleep 200
SendInput Гражданский{]}
Sleep 200
SendInput {[}%prich%{]}
Sleep 200
SendInput {shift down}{left 100}{shift up}^{vk58}{backspace}{f6}
return</code></pre></div><p>Прошу помочь и сделать чтоб было так-же как и в первом, вытаскивалось лишь то что надо.</p>]]></content>
			<author>
				<name><![CDATA[gordas]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40467</uri>
			</author>
			<updated>2019-10-29T18:43:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=136488#p136488</id>
		</entry>
</feed>
