<?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="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15570&amp;type=atom" />
	<updated>2020-08-06T15:44:00Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15570</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141501#p141501" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Фу, противно от состояния данной клавиатуры!</p>]]></content>
			<author>
				<name><![CDATA[SuBrex]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40829</uri>
			</author>
			<updated>2020-08-06T15:44:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141501#p141501</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141498#p141498" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong></p><p>На первой же строке возникла ошибка, попытался разобраться в чем дело, но по инструкциям вроде все верно.</p>]]></content>
			<author>
				<name><![CDATA[ustarta]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40980</uri>
			</author>
			<updated>2020-08-06T14:52:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141498#p141498</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141495#p141495" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong></p><p>Исправил. Спасибо</p>]]></content>
			<author>
				<name><![CDATA[ustarta]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40980</uri>
			</author>
			<updated>2020-08-06T14:41:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141495#p141495</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141494#p141494" />
			<content type="html"><![CDATA[<p><strong>ustarta</strong>, откуда там ф1? У Вас <a href="https://red-innovations.su/index/photos_c/keys/100_6881.jpg">такая</a> что ли?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2020-08-06T14:40:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141494#p141494</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141493#p141493" />
			<content type="html"><![CDATA[<p><strong>ustarta</strong><br /></p><div class="codebox"><pre><code>
Gui, New, -Caption +ToolWindow +AlwaysOnTop +HwndИнтерфейсБуфераОбмена
Gui, Add, xLeft yTop w100 h200 vБуферОбмена, %Clipboard%
Gui, Show, xCener yCenter w100 h200
Gui, % ИнтерфейсБуфераОбмена &quot;:Show&quot;, Hide
Return

F1::
Clipboard = Trim(Clipboard)
GuiControl, Text, БуферОбмена, %Clipboard%
Gui, % ИнтерфейсБуфераОбмена &quot;:Show&quot;
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[SuBrex]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40829</uri>
			</author>
			<updated>2020-08-06T14:34:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141493#p141493</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141490#p141490" />
			<content type="html"><![CDATA[<p><strong>SuBrex</strong></p><br /><div class="codebox"><pre><code>F1::
RegExMatch (Clipboard, &quot; (.*) &quot;, bufer1)
Clipboard := %bufer1%

GUI, Show
GuiControl, +default, Cancel
GUI, Add, Text, %bufer1%

return
</code></pre></div><p>Что делаю не так? <br /> В моем понимание должно работать так - выделяем текст, при нажатии F1 должно появится окошко с текстом данного текста.</p>]]></content>
			<author>
				<name><![CDATA[ustarta]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40980</uri>
			</author>
			<updated>2020-08-06T14:25:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141490#p141490</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141443#p141443" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />А Вы не перестаёте удивлять! Не знал о функции Trim, спасибо в очередной раз за просвещение!</p>]]></content>
			<author>
				<name><![CDATA[SuBrex]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40829</uri>
			</author>
			<updated>2020-08-03T19:55:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141443#p141443</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141439#p141439" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>text := &quot;   test test   &quot;
newText = %text%
MsgBox, % &quot;|&quot; newText &quot;|&quot;
newText := Trim(text)
MsgBox, % &quot;|&quot; newText &quot;|&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2020-08-03T17:20:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141439#p141439</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141438#p141438" />
			<content type="html"><![CDATA[<p>^\s*(\S.*?)\s*$</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2020-08-03T17:16:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141438#p141438</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141432#p141432" />
			<content type="html"><![CDATA[<p>По идее шаблон должен быть таким: &quot;\s?(.*)\s?&quot;.<br />Но у меня скрипт отказывается работать, даже с примером от <strong>SuBrex</strong>.</p><p>Проверял на <a href="https://regex101.com/">этом</a> сайте.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2020-08-03T16:26:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141432#p141432</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141419#p141419" />
			<content type="html"><![CDATA[<p><strong>ustarta</strong><br /></p><div class="codebox"><pre><code>
F1::
RegExMatch (Clipboard, &quot; (.*) &quot;, БуферОбмена)
Clipboard := БуферОбмена1
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[SuBrex]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40829</uri>
			</author>
			<updated>2020-08-03T14:36:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141419#p141419</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141418#p141418" />
			<content type="html"><![CDATA[<p><strong>SuBrex</strong> Да, все верно</p>]]></content>
			<author>
				<name><![CDATA[ustarta]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40980</uri>
			</author>
			<updated>2020-08-03T14:16:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141418#p141418</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141410#p141410" />
			<content type="html"><![CDATA[<p><strong>ustarta</strong><br />Так получается вам по факту нужно очищать буфер обмена от пробелов?</p>]]></content>
			<author>
				<name><![CDATA[SuBrex]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40829</uri>
			</author>
			<updated>2020-08-03T11:23:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141410#p141410</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141398#p141398" />
			<content type="html"><![CDATA[<p>Ниже код. Я к сожалению так и не понял как добавить в него код </p><div class="codebox"><pre><code>ControlGet, asd, Selected,, Edit1, ahk_class Notepad</code></pre></div><p> написанный выше.</p><p>Я распишу как вижу все я взглядом который знает мало возможностей ahk.<br />В коде есть параметр %copytext%. вот этот параметр должен содержать мной выделенный текст (это как правило 1 слово) с убранными пробелами перед и после него. </p><br /><div class="codebox"><pre><code>
GUI, Add, Text, %copytext%
GUI, Add, Button, g1, Добавить метку 1
GUI, Add, Button, g2, Добавить метку 2
GUI, Add, Button, g3, Добавить метку 3
Return

!2:: GUI, Show


1:
Gui Cancel
SendInput, %copytext% Метка 1
Return
2:
Gui Cancel
SendInput, %copytext% Метка 2
Return
3:
Gui Cancel
SendInput, %copytext% Метка 3
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ustarta]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40980</uri>
			</author>
			<updated>2020-08-03T01:16:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141398#p141398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Работа с выделенным текстом]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=141397#p141397" />
			<content type="html"><![CDATA[<p><strong>SuBrex</strong><br />Вообщем то это и имею ввиду. Что бы при выделении слова в полотне текста, не думать о том, захватил ли лишние пробелы до или после этого слова. <br />Т.е при вызове графич. интерфейса над выделенным словом, перед тем как проводить какие либо манипуляции или копирование в буфер обмена слово очищалось от пробелов если они есть.</p>]]></content>
			<author>
				<name><![CDATA[ustarta]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40980</uri>
			</author>
			<updated>2020-08-03T01:00:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=141397#p141397</id>
		</entry>
</feed>
