<?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=16134&amp;type=atom" />
	<updated>2021-03-01T12:19:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16134</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146574#p146574" />
			<content type="html"><![CDATA[<p>Я вроде бы понял в чем проблема.&nbsp; При исполнения первого скрипта , слетает курсор с текста и по этому следующие скрепты которые работают с текстом не исполняются.</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-03-01T12:19:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146574#p146574</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146573#p146573" />
			<content type="html"><![CDATA[<p><strong>KusochekDobra</strong><br />Никакой полноценно не срабатывает, только MsgBox срабатывает об ошибки что текст не скопирован. Может есть идеи ?<br /></p><div class="codebox"><pre><code>
^vkA4::
WinActivate, ahk_class Shell_TrayWnd
fileappend, %ClipboardAll%, C:\home\test1.txt
if errorlevel = 0
   msgbox done
      sleep 200

SetBatchLines, -1
ClipBoard =
SendInput, ^{vk41}^{vk43}    ;  ctrl+A crl+C
ClipWait, 2
if ErrorLevel
{
   MsgBox, Буфер обмена пуст!
   Return
 }   
MyVar = %clipboard%
Clipboard := RegExReplace(Clipboard, &quot;s)&lt;table border=&quot;&quot;2&quot;&quot;&gt;.*?&lt;/table&gt;\R?&quot;)
SendInput, ^{vk56}     ;  ctrl+V
     sleep 200
WinActivate, ahk_class Shell_TrayWnd
FileRead, Clipboard, *c C:\home\test1.txt
WinActivate, ahk_class Photoshop
return

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-03-01T11:37:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146573#p146573</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146572#p146572" />
			<content type="html"><![CDATA[<p>А return и клавиши активации, Вы как убирали? Все?<br />Не забывайте так же, что между инструкциями, для надёжности можно, да и наверное стоит, в Вашем случае поставить Sleep`ы. Хоткеи же Вы тоже не одновременно нажимаете, или ищите, КАК перед выполнением следующих инструкций убедиться, что предыдущие выполнились корректно и добавьте эту обработку в сценарий.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2021-03-01T10:54:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146572#p146572</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146570#p146570" />
			<content type="html"><![CDATA[<p><strong>KusochekDobra</strong><br />Это не странный вопрос, прошу в помощи в связание скриптов.<br />Если вставить в таком порядке как надо, ничего от этого не изменится , я по этому попросил помощи в связание скриптов.<br /></p><div class="codebox"><pre><code>
^vkDE::
WinActivate, ahk_class Shell_TrayWnd
fileappend, %ClipboardAll%, C:\home\test1.txt
if errorlevel = 0
   msgbox done
return


^vkA4::
SetBatchLines, -1
ClipBoard =
SendInput, ^{vk41}^{vk43}    ;  ctrl+A crl+C
ClipWait, 2
if ErrorLevel
{
   MsgBox, Буфер обмена пуст!
   Return
 }   
StringReplace, ClipBoard, ClipBoard, &lt;table border=&quot;2&quot;&gt;,&lt;tablez&gt;, All 
MyVar = %clipboard%
Clipboard := RegExReplace(Clipboard, &quot;s)&lt;tablez&gt;.*?&lt;/table&gt;\R?&quot;)
SendInput, ^{vk56}     ;  ctrl+V
return

^vkDC::
WinActivate, ahk_class Shell_TrayWnd
FileRead, Clipboard, *c C:\home\test1.txt
WinActivate, ahk_class Photoshop
return

</code></pre></div><p>Если убрать return и клавиши активации , по прежнему ничего не работает.</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-03-01T10:19:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146570#p146570</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146569#p146569" />
			<content type="html"><![CDATA[<p>Это очень странный вопрос.<br />Настолько же странный, как если бы Вы спросили: &quot;Как из трёх разных чашек высыпать сахар в одну?&quot;<br />Если ответ не очевиден, то я не знаю, как на него ответить.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2021-03-01T09:37:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146569#p146569</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146568#p146568" />
			<content type="html"><![CDATA[<p><strong>KusochekDobra</strong><br />Так как мне связать чтоб от одной клавиши сработали все три?</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-03-01T08:45:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146568#p146568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146567#p146567" />
			<content type="html"><![CDATA[<p>Сценарий всегда выполняется в том же порядке, как Вы читаете текст. Если разместить код всех примеров в одном файле в порядке описания выше — он так и выполнится.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2021-03-01T08:32:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146567#p146567</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Прошу помощи в совмещение трех скриптов в один]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146565#p146565" />
			<content type="html"><![CDATA[<p>Имею три скрипта работающие отдельно, но чтоб все заработало как надо хочу совместить в один полноценный скрипт.<br />По задумки скрипты должны по очереди срабатывать<br />Первый скрипт ( копирует существующий буфер обмена в txt)<br /></p><div class="codebox"><pre><code>
^vkDE::
WinActivate, ahk_class Shell_TrayWnd
fileappend, %ClipboardAll%, C:\home\test1.txt
if errorlevel = 0
   msgbox done
return
</code></pre></div><p>Второй скрипт выполняет ctrl A ctrl C всего текста и удаляет тег &lt;table&gt;<br /></p><div class="codebox"><pre><code>
^vkA4::
SetBatchLines, -1
ClipBoard =
SendInput, ^{vk41}^{vk43}    ;  ctrl+A crl+C
ClipWait, 2
if ErrorLevel
{
   MsgBox, Буфер обмена пуст!
   Return
 }   
StringReplace, ClipBoard, ClipBoard, &lt;table border=&quot;2&quot;&gt;,&lt;tablez&gt;, All 
MyVar = %clipboard%
Clipboard := RegExReplace(Clipboard, &quot;s)&lt;tablez&gt;.*?&lt;/table&gt;\R?&quot;)
SendInput, ^{vk56}     ;  ctrl+V
return
</code></pre></div><p>Третий скрипт возвращает самый первый буфер обмена который находится в txt документе.<br /></p><div class="codebox"><pre><code>
^vkDC::
WinActivate, ahk_class Shell_TrayWnd
FileRead, Clipboard, *c C:\home\test1.txt
WinActivate, ahk_class Photoshop
return
</code></pre></div><p>По задумке это должно все сработать от одного нажатия забиндиной кнопки.</p>]]></content>
			<author>
				<name><![CDATA[edea28_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41481</uri>
			</author>
			<updated>2021-03-01T07:59:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146565#p146565</id>
		</entry>
</feed>
