<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Изменить msctls_statusbar32]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10624&amp;type=atom" />
	<updated>2016-01-12T16:52:26Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10624</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100265#p100265" />
			<content type="html"><![CDATA[<p>Всем огромное спасибо! Добился чего хотел. Выложу пример быть может кому то поможет.</p><p>Sender<br /></p><div class="codebox"><pre><code>Send_WM_COPYDATA(&quot;Text1|1&quot;, &quot;Title&quot;)
Send_WM_COPYDATA(&quot;Text2|2&quot;, &quot;Title&quot;)
Send_WM_COPYDATA(&quot;Text3|3&quot;, &quot;Title&quot;)

Send_WM_COPYDATA(ByRef StringToSend, ByRef TargetScriptTitle)
{
    VarSetCapacity(CopyDataStruct, 3*A_PtrSize, 0)
    SizeInBytes := (StrLen(StringToSend) + 1) * (A_IsUnicode ? 2 : 1)
    NumPut(SizeInBytes, CopyDataStruct, A_PtrSize)
    NumPut(&amp;StringToSend, CopyDataStruct, 2*A_PtrSize)
    Prev_DetectHiddenWindows := A_DetectHiddenWindows
    Prev_TitleMatchMode := A_TitleMatchMode
    DetectHiddenWindows On
    SetTitleMatchMode 2
    SendMessage, 0x4a, 0, &amp;CopyDataStruct,, %TargetScriptTitle%
    DetectHiddenWindows %Prev_DetectHiddenWindows%
    SetTitleMatchMode %Prev_TitleMatchMode%
    Return ErrorLevel
}
</code></pre></div><p>Receive</p><div class="codebox"><pre><code>OnMessage(0x4a, &quot;Receive_WM_COPYDATA&quot;)
Receive_WM_COPYDATA(wParam, lParam)
{
    StringAddress := NumGet(lParam + 2*A_PtrSize)
    CopyOfData := StrGet(StringAddress)
	StringSplit, TextArrya, CopyOfData, |
	SB_SetText(TextArrya1, TextArrya2)
    return true
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Strongest]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30412</uri>
			</author>
			<updated>2016-01-12T16:52:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100265#p100265</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100240#p100240" />
			<content type="html"><![CDATA[<p>Почему же нельзя.<br />В самом конце пример:<br /><a href="https://autohotkey.com/docs/commands/OnMessage.htm">https://autohotkey.com/docs/commands/OnMessage.htm</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-01-11T07:18:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100240#p100240</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100239#p100239" />
			<content type="html"><![CDATA[<p>Как вариант от безысходности будем использовать... </p><div class="codebox"><pre><code>SendMessage, 0x40,,,, ahk_id %BarHWND%
SendMessage, 0x42,,,, ahk_id %BarHWND%</code></pre></div><br /><div class="codebox"><pre><code>OnMessage(0x40, &quot;SetText&quot;)
OnMessage(0x42, &quot;SetText2&quot;)</code></pre></div><div class="codebox"><pre><code>SetText()
{
	   SB_SetText(&quot;test&quot;, 1)
	   return
}
SetText2()
{
	   SB_SetText(&quot;test2&quot;, 2)
	   return
}</code></pre></div><p>Плохо конечно что нельзя текст передать.</p>]]></content>
			<author>
				<name><![CDATA[Strongest]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30412</uri>
			</author>
			<updated>2016-01-11T06:07:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100239#p100239</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100238#p100238" />
			<content type="html"><![CDATA[<p>Если окно своё, то из другого скрипта делать это ни к чему, достаточно<br /></p><div class="codebox"><pre><code>SB_SetText(&quot;test&quot;, 1)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-01-11T05:29:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100238#p100238</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100237#p100237" />
			<content type="html"><![CDATA[<p>Так можно:<br />sender.ahk<br /></p><div class="codebox"><pre><code>SendMessage, 0x40,,,, receiver.ahk</code></pre></div><p>receiver.ahk<br /></p><div class="codebox"><pre><code>OnMessage(0x40, &quot;SetText&quot;) 
Gui Add, StatusBar
SB_SetParts(100, 100)
Gui Show, w300 h300
return

SetText()
{
   SB_SetText(&quot;test&quot;, 1)
   return
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-01-10T22:40:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100237#p100237</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100236#p100236" />
			<content type="html"><![CDATA[<p>По идее с помощью сообщения <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb760758%28v=vs.85%29.aspx">SB_SETTEXT</a>, но у меня что-то не вышло.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-01-10T16:16:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100236#p100236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100233#p100233" />
			<content type="html"><![CDATA[<p>Я имел ввиду если сам StatusBar поделен таким образом </p><div class="codebox"><pre><code>SB_SetParts(100, 100)</code></pre></div><p> Как изменять отдельно 1 и 2 поля из отдельного окна?</p>]]></content>
			<author>
				<name><![CDATA[Strongest]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30412</uri>
			</author>
			<updated>2016-01-10T13:44:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100233#p100233</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100200#p100200" />
			<content type="html"><![CDATA[<p>В примере выше в слове <em>msctls_statusbar321</em> последняя цифра 1 — это номер контрола. Если контролов насколько — эти номера у всех будут разными. Определив номер конкретного контрола с помощью Window Spy, можно обращаться к нему.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-01-07T05:15:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100200#p100200</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100191#p100191" />
			<content type="html"><![CDATA[<p>А если несколько полей у StatusBar как с помощью ControlSetText менять текст в определенном поле?</p>]]></content>
			<author>
				<name><![CDATA[Strongest]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30412</uri>
			</author>
			<updated>2016-01-05T18:31:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100191#p100191</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93799#p93799" />
			<content type="html"><![CDATA[<p>Если задача изменить текст контрола msctls_statusbar32, то в своём окне так:<br /></p><div class="codebox"><pre><code>Gui, Add, StatusBar
SB_SetText(&quot;This is status bar text&quot;)
Gui, Show, w300 h200</code></pre></div><p>если в чужом, так:<br /></p><div class="codebox"><pre><code>ControlSetText, msctls_statusbar321, This is status bar text, A</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-05-04T12:04:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93799#p93799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93798#p93798" />
			<content type="html"><![CDATA[<p>Он у меня всегда просто пустой.</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2015-05-04T11:54:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93798#p93798</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93797#p93797" />
			<content type="html"><![CDATA[<p>Ничего менять не надо, если это действительно msctls_statusbar32, его содержание должно считываться.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-05-04T11:33:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93797#p93797</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Изменить msctls_statusbar32]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=93794#p93794" />
			<content type="html"><![CDATA[<p>Собственно, как изменить msctls_statusbar32, чтобы можно было проверить при помощи StatusBarWait?</p><p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Desire]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30401</uri>
			</author>
			<updated>2015-05-04T09:58:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=93794#p93794</id>
		</entry>
</feed>
