<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=13011</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13011&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK:GUI, DllCall и еще кое-какие вопросы...».]]></description>
		<lastBuildDate>Mon, 25 Sep 2017 09:56:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119561#p119561</link>
			<description><![CDATA[<div class="quotebox"><cite>Raven пишет:</cite><blockquote><p>Дело в том что (как я понял), в AHK ВСЕ данные хранятся в виде string. А мне нужно было именно числа.</p></blockquote></div><p>Так это хранятся (в переменных). Передаются-то они так, как вы укажете. Или думаете, что АНК делает исключение лично для вас, из вредности?</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Mon, 25 Sep 2017 09:56:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119561#p119561</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119558#p119558</link>
			<description><![CDATA[<p><strong>YMP</strong> Эта функция связи с контроллером. Посмотрел напрямую в контроллере. Дело в том что (как я понял), в AHK ВСЕ данные хранятся в виде string. А мне нужно было именно числа.<br /><strong>Alectric</strong> Плохо я читал вашу тему)) То что нужно. Спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (Raven)]]></author>
			<pubDate>Mon, 25 Sep 2017 09:02:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119558#p119558</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119501#p119501</link>
			<description><![CDATA[<p>5) Как всегда ссылаюсь на свою <a href="http://forum.script-coding.com/viewtopic.php?id=12662">старую тему</a>:<br /></p><div class="codebox"><pre><code>      ; данные для отправки
      b_0=0          ; 1 байт
      b_1++          ; 1 байт
      b_2=255        ; 1 байт
      w_0=1234567890 ; 4 байта
      b_3=128        ; 1 байт

      varsetcapacity(Out_Data,Send_Data_Size) ; задаём размер переменной для отправки
      NumPut(b_0,Out_Data,0,&quot;Uchar&quot;)          ; 1 байт
      NumPut(b_1,Out_Data,1,&quot;Uchar&quot;)          ; 1 байт
      NumPut(b_2,Out_Data,2,&quot;Uchar&quot;)          ; 1 байт
      NumPut(w_0,Out_Data,3,&quot;Uint&quot;)           ; 4 байта
      NumPut(b_3,Out_Data,7,&quot;Uchar&quot;)          ; 1 байт
                                              ; остальные байты резервные

      ; пишем данные в порт
      RS232_Write(RS232_FileHandle,&amp;Out_Data,Send_Data_Size)
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Fri, 22 Sep 2017 16:23:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119501#p119501</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119491#p119491</link>
			<description><![CDATA[<p>Как вы это посмотрели? Если речь о том, что пишет функция Cli_DBWrite, то к ней и вопрос. Наверно, она преобразует число в строковый вид.</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Fri, 22 Sep 2017 11:44:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119491#p119491</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119487#p119487</link>
			<description><![CDATA[<p><strong>YMP</strong> Дело в том что как раз оно и отправляется, но только как символ &quot;1&quot; а не как число. То есть в формате Сhar, а должно быть в Int.</p>]]></description>
			<author><![CDATA[null@example.com (Raven)]]></author>
			<pubDate>Fri, 22 Sep 2017 08:30:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119487#p119487</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119486#p119486</link>
			<description><![CDATA[<p>Всё нормально у вас должно отправляться.</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Fri, 22 Sep 2017 07:54:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119486#p119486</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119483#p119483</link>
			<description><![CDATA[<p>А кто подскажет насчет пятого вопроса?<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p>Ну и последний вопрос, как правильно отправлять числа в DllCall? Именно числа. У меня отправляются символы. Вместо 1 отправляется 49, что является кодом числа 1 в ASCII.<br /></p><div class="codebox"><pre><code>WriteDB(obj, db, start, size, data){
	SetFormat,Integer,DEC
	DllCall(&quot;snap7.dll\Cli_DBWrite&quot;, &quot;Ptr&quot;, obj, &quot;Int&quot;, db, &quot;int&quot;, start, &quot;int&quot;, size, &quot;ptr&quot;, &amp;data) 
	return
}</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (Raven)]]></author>
			<pubDate>Fri, 22 Sep 2017 05:46:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119483#p119483</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119465#p119465</link>
			<description><![CDATA[<p>В методах классов я не разбираюсь. Вот пример с кнопкой, при нажатии по кнопке выводится информация о ней . Аналогично можно вывести информацию о картинке.<br /></p><div class="codebox"><pre><code>GUI, Add, Button, w50 h50 gSub, KNOPKA1
GUI, Add, Button, w100 h100 gSub vKNOPKA2
GUI, Show ; , w100 h100
Return

Sub:
ToolTip,  %A_GuiControlEvent%`n %A_GuiControl%
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Thu, 21 Sep 2017 14:01:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119465#p119465</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119452#p119452</link>
			<description><![CDATA[<p><strong>ypppu</strong> Спасибо за ссылку. Мне это подходит. <br />По второму вопросу, видимо я неправильно выразился, мне нужно просто перетаскивать контролы по GUI окну. Не нужно кидать файлы на GUI.<br />Третье, в классе есть картинка. По клику на этой картинке можно вызвать метод класса. Вот как так сделать что бы этот метод вызывал еще одно окошко и в этом окошке было отображение данных данного объекта?</p>]]></description>
			<author><![CDATA[null@example.com (Raven)]]></author>
			<pubDate>Thu, 21 Sep 2017 05:24:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119452#p119452</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119428#p119428</link>
			<description><![CDATA[<p>По вопросу №1: <a href="http://forum.script-coding.com/viewtopic.php?pid=46934#p46934">http://forum.script-coding.com/viewtopi … 934#p46934</a>.</p><p>По вопросу №2: действуйте согласно справке, там написано.<br /></p><div class="codebox"><pre><code>GUI, Add, Button, w50 h50, KNOPKA1
GUI, Add, Button, w100 h100 vKNOPKA2, 
GUI, Show ; , w100 h100
Return

GuiDropFiles:
MsgBox, Вы перетащили %A_GuiControlEvent%`nна элемент управления %A_GuiControl%
Return</code></pre></div><br /><p>По вопросу №3: что значит <span class="bbu">по клику на картинку класса</span>?</p><p>По вопросу №4: стандартных способов вроде нет, см. GDI plus.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Wed, 20 Sep 2017 14:07:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119428#p119428</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119427#p119427</link>
			<description><![CDATA[<p><strong>ypppu</strong> Будут параллельны рамкам окна и можно одинакового цвета.</p>]]></description>
			<author><![CDATA[null@example.com (Raven)]]></author>
			<pubDate>Wed, 20 Sep 2017 13:55:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119427#p119427</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119426#p119426</link>
			<description><![CDATA[<p>По вопросу №1. Линии и прямоугольники будут одинакового цвета? Будут ли они параллельны рамкам окна, или могут идти по диагонали?</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Wed, 20 Sep 2017 13:49:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119426#p119426</guid>
		</item>
		<item>
			<title><![CDATA[AHK:GUI, DllCall и еще кое-какие вопросы...]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119418#p119418</link>
			<description><![CDATA[<p>Добрый день, форумчане. Накопилось множество вопросов на которые я не нашел ответы на нашем (да и на забугорном) форуме.<br />1) Как в GUI&nbsp; нарисовать линии? Требуется рисовать линии в Gui, в котором содержатся кнопки, картинки, прогресбары и т.д. То есть мне требуется на ряду с обычными элементами Gui, рисовать и линии или прямоугольники.<br />2) Можно ли сделать регистрацию drag and drop по картинке? То есть таскать картинку (Да и вообще любой контрол.) в Gui мышкой?<br />3) Как можно отображать данные объекта во всплывающем окне по клику на картинку (Gui элемент) класса? Как только я не мучался, и в классе инициализировал второе окно, и в начале скрипта, ничего не получается.<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>;Инициализацию второго ГУИ я делал в начале скрипта.
class Valve{
  x:=0, y:=0, db:=0
  __New(x,y,name){
    this.name:=name 
    this.x:=x
    this.y:=y
    Gui, Add, Picture, w30 h-1 x%x% y%y% BackgroundTrans gValve.TEST hwndV1, C:\Users\vic\Pictures\Val-Grey.emf
    this.V1:=V1
    x2:=x+30
    y2:=y+25
    gui, add, text, x%x2% y%y2% hwnddbg, text000
    this.dbg:=dbg
    x3:=x+30
    y3:=y+0
    gui, add, text, x%x3% y%y3% cRed hwndMan, te
    this.Man:=Man
  }
  update(db){
    this.db:=db
    GuiControl,, % this.dbg, % this.name
    if (db==0)
    GuiControl,, % this.V1, C:\Users\vic\Pictures\Val-Grey.emf
    else if (db==1) or (db==5)
    GuiControl,, % this.V1, C:\Users\vic\Pictures\Val-Green.emf
    else if (db==2) or (db==6)
    GuiControl,, % this.V1, C:\Users\vic\Pictures\Val-Red.emf
    else if (TicTak==1) and ((db==3) or (db==7)) 
    GuiControl,, % this.V1, C:\Users\vic\Pictures\Val-Green.emf
    Else if (TicTak==0) and ((db==3) or (db==7))
    GuiControl,, % this.V1, C:\Users\vic\Pictures\Val-Grey.emf
    else if (TicTak==1) and ((db==4) or (db==8))
    GuiControl,, % this.V1, C:\Users\vic\Pictures\Val-Red.emf
    else if (TicTak==0) and ((db==4) or (db==8))
    GuiControl,, % this.V1, C:\Users\vic\Pictures\Val-Grey.emf

    GuiControl,2:, % this.TT1, % db

    if (db=5) or (db=6) or (db=7) or (db=8)
    GuiControl,, % this.Man, M
    else GuiControl,, % this.Man, 

  }
  ;тестирование открытия окна по клику на клапан. Открываться должны с данными клапана.
  ;какие только варианты не были испробованы... 
  TEST() {
    ;gui, 2:Submit
    ;Gui, 2:add, text,hwndTT1, text
    ;this.TT1:=TT1
    ;GuiControl,2:, % this.TT1, % db
    ;this.TEST:=TEST
    gui, 2:show, h100 w100
    
  }
}</code></pre></div></div></div><p>4) Можно ли как то перевернуть картинку на 90 градусов? <br />5) Ну и последний вопрос, как правильно отправлять числа в DllCall? Именно числа. У меня отправляются символы. Вместо 1 отправляется 49, что является кодом числа 1 в ASCII.<br /></p><div class="codebox"><pre><code>WriteDB(obj, db, start, size, data){
	SetFormat,Integer,DEC
	DllCall(&quot;snap7.dll\Cli_DBWrite&quot;, &quot;Ptr&quot;, obj, &quot;Int&quot;, db, &quot;int&quot;, start, &quot;int&quot;, size, &quot;ptr&quot;, &amp;data) 
	return
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Raven)]]></author>
			<pubDate>Wed, 20 Sep 2017 07:06:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119418#p119418</guid>
		</item>
	</channel>
</rss>
