<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GUI смена курсора]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=9834&amp;type=atom" />
	<updated>2014-07-27T09:54:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9834</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85280#p85280" />
			<content type="html"><![CDATA[<p>Это не моё. <a href="http://www.autohotkey.com/board/topic/32608-changing-the-system-cursor/page-4">http://www.autohotkey.com/board/topic/3 … sor/page-4</a></p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-27T09:54:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85280#p85280</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85279#p85279" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong>, спасибо большое. Замена системного курсора изображением хранящимся в виде Hex помогло.<br /><strong>serzh82saratov</strong>, тоже подходит, но вкуривал очень долго. Ваши коды крайне тяжело понять без абсолютных знаний AHK.</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-07-27T09:49:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85279#p85279</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85259#p85259" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Странникх пишет:</cite><blockquote><p>Курсоры, которые сейчас стоят по схеме? Номер, стоящий перед IDC - это ID курсора? Где его брать?</p></blockquote></div><p>Предлагаю воспользоваться <strong><a href="http://forum.script-coding.com/search.php?advanced=1">поиском</a></strong>. &quot;Всё уже придумано до нас&quot;.<br /><a href="http://forum.script-coding.com/viewtopic.php?id=5939">АНК: Как узнать текущий курсор?</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=5685">AHK: Изменение текущего курсора</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=6576">AHK: Замена системного курсора изображением хранящимся в виде Hex</a><br /><a href="http://forum.script-coding.com/viewtopic.php?id=5108">AHK: изменение курсора в зависимости от языка ввода</a></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-07-26T11:25:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85259#p85259</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85257#p85257" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SystemCursors = 32512IDC_ARROW,32513IDC_IBEAM,32514IDC_WAIT,32515IDC_CROSS
   ,32516IDC_UPARROW,32640IDC_SIZE,32641IDC_ICON,32642IDC_SIZENWSE
   ,32643IDC_SIZENESW,32644IDC_SIZEWE,32645IDC_SIZENS,32646IDC_SIZEALL
   ,32648IDC_NO,32649IDC_HAND,32650IDC_APPSTARTING,32651IDC_HELP</code></pre></div><p>Курсоры, которые сейчас стоят по схеме? Номер, стоящий перед IDC - это ID курсора? Где его брать?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-07-26T10:15:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85257#p85257</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85255#p85255" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Такое можно сделать?</p></blockquote></div><div class="codebox"><pre><code>
space::
   SetSystemCursor(&quot;IDC_WAIT&quot;,32,32)
   KeyWait, Space
   RestoreCursors() 
Return 
 
SetSystemCursor( Cursor = &quot;&quot;, cx = 64, cy = 64 )
{
   BlankCursor := 0, SystemCursor := 0, FileCursor := 0 ; init
   
   SystemCursors = 32512IDC_ARROW,32513IDC_IBEAM,32514IDC_WAIT,32515IDC_CROSS
   ,32516IDC_UPARROW,32640IDC_SIZE,32641IDC_ICON,32642IDC_SIZENWSE
   ,32643IDC_SIZENESW,32644IDC_SIZEWE,32645IDC_SIZENS,32646IDC_SIZEALL
   ,32648IDC_NO,32649IDC_HAND,32650IDC_APPSTARTING,32651IDC_HELP
   
   If Cursor = ; empty, so create blank cursor
   {
      VarSetCapacity( AndMask, 32*4, 0xFF ), VarSetCapacity( XorMask, 32*4, 0 )
      BlankCursor = 1 ; flag for later
   }
   Else If SubStr( Cursor,1,4 ) = &quot;IDC_&quot; ; load system cursor
   {
      Loop, Parse, SystemCursors, `,
      {
         CursorName := SubStr( A_Loopfield, 6, 15 ) ; get the cursor name, no trailing space with substr
         CursorID := SubStr( A_Loopfield, 1, 5 ) ; get the cursor id
         SystemCursor = 1
         If ( CursorName = Cursor )
         {
            CursorHandle := DllCall( &quot;LoadCursor&quot;, Uint,0, Int,CursorID )   
            Break               
         }
      }   
      If CursorHandle = ; invalid cursor name given
      {
         Msgbox,, SetCursor, Error: Invalid cursor name
         CursorHandle = Error
      }
   }   
   Else If FileExist( Cursor )
   {
      SplitPath, Cursor,,, Ext ; auto-detect type
      If Ext = ico
         uType := 0x1   
      Else If Ext in cur,ani
         uType := 0x2      
      Else ; invalid file ext
      {
         Msgbox,, SetCursor, Error: Invalid file type
         CursorHandle = Error
      }      
      FileCursor = 1
   }
   Else
   {   
      Msgbox,, SetCursor, Error: Invalid file path or cursor name
      CursorHandle = Error ; raise for later
   }
   If CursorHandle != Error
   {
      Loop, Parse, SystemCursors, `,
      {
         If BlankCursor = 1
         {
            Type = BlankCursor
            %Type%%A_Index% := DllCall( &quot;CreateCursor&quot;
            , Uint,0, Int,0, Int,0, Int,32, Int,32, Uint,&amp;AndMask, Uint,&amp;XorMask )
            CursorHandle := DllCall( &quot;CopyImage&quot;, Uint,%Type%%A_Index%, Uint,0x2, Int,0, Int,0, Int,0 )
            DllCall( &quot;SetSystemCursor&quot;, Uint,CursorHandle, Int,SubStr( A_Loopfield, 1, 5 ) )
         }         
         Else If SystemCursor = 1
         {
            Type = SystemCursor
            CursorHandle := DllCall( &quot;LoadCursor&quot;, Uint,0, Int,CursorID )   
            %Type%%A_Index% := DllCall( &quot;CopyImage&quot;
            , Uint,CursorHandle, Uint,0x2, Int,cx, Int,cy, Uint,0 )      
            CursorHandle := DllCall( &quot;CopyImage&quot;, Uint,%Type%%A_Index%, Uint,0x2, Int,0, Int,0, Int,0 )
            DllCall( &quot;SetSystemCursor&quot;, Uint,CursorHandle, Int,SubStr( A_Loopfield, 1, 5 ) )
         }
         Else If FileCursor = 1
         {
            Type = FileCursor
            %Type%%A_Index% := DllCall( &quot;LoadImageA&quot;
            , UInt,0, Str,Cursor, UInt,uType, Int,cx, Int,cy, UInt,0x10 )
            DllCall( &quot;SetSystemCursor&quot;, Uint,%Type%%A_Index%, Int,SubStr( A_Loopfield, 1, 5 ) )         
         }         
      }
   }   
}
RestoreCursors()
{
   SPI_SETCURSORS := 0x57
   DllCall( &quot;SystemParametersInfo&quot;, UInt,SPI_SETCURSORS, UInt,0, UInt,0, UInt,0 )
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-26T07:40:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85255#p85255</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85252#p85252" />
			<content type="html"><![CDATA[<p>Я же говорю: нужен снимок экрана с курсором. Сначала нужно понять, откуда берёт курсор программа. Затем написать скрипт, который периодически проверяет. Если активно окно программы, и при этом указатель мыши находится над окном AutoHotkey GUI, то заменить курсор на ...</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-07-25T20:27:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85252#p85252</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85251#p85251" />
			<content type="html"><![CDATA[<p>Да, Вы правы. Может тогда в AHK задать в цикл сменять курсор в таких-то координатах, в которых расположено GUI? </p><p>Или нет, даже лучше - сделать так:<br />Когда запущен скрипт курсор в Windows со стандартного меняется на тот, что мне нужен. А по закрытию (выхода) скрипта или неактивном окне программы менять его на предыдущий - стандартный.<br />Такое можно сделать?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-07-25T17:58:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85251#p85251</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85250#p85250" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Странникх пишет:</cite><blockquote><p>Обратно возвращается если взаимодействовать с чем-нибудь в приложении, когда меняется курсор (подсвечивается при наведении на кнопку например).</p></blockquote></div><p>Подтверждается предположение, что сама программа несовершенна. Она изменяет курсор по событию в собственном окне, а смену окна под курсором не учитывает.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-07-25T17:40:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85250#p85250</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85249#p85249" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Ну если так, то:<br /></p><div class="codebox"><pre><code>
Gui, +AlwaysOnTop -Caption +E0x08000020 +Lastfound
Gui, Margin, 0, 0
Gui, Add, Picture,, D:\Images\Newtons_cradle_animation_book_2.gif
Gui, Show, NA x0 y0, NamePic 
WinSet, Transparent, 250
Return
</code></pre></div><div class="quotebox"><blockquote><p>и обратно не возвращается если использовать приложение.</p></blockquote></div><p>Вот почему обратно не возвращается, это конечно загадка, ни разу такого не видел.</p></blockquote></div><p>Обратно возвращается если взаимодействовать с чем-нибудь в приложении, когда меняется курсор (подсвечивается при наведении на кнопку например).</p><div class="codebox"><pre><code>WinSet, Transparent, 250</code></pre></div><p>Опять таки возвращаясь к падению FPS&#039;а.. эта команда его снижает, как я писал уже ранее. Проблему она в целом решает, но создает другую. Есть другое решение?</p><div class="codebox"><pre><code>Я думаю, Странникх как бы забыл поставить запятую. А имелось в виду: &quot;В приложениях - свои курсоры&quot;. То есть сторонние приложения.</code></pre></div><p>Совершенно верно.</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-07-25T15:48:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85249#p85249</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85248#p85248" />
			<content type="html"><![CDATA[<p>Ну если так, то:<br /></p><div class="codebox"><pre><code>
Gui, +AlwaysOnTop -Caption +E0x08000020 +Lastfound
Gui, Margin, 0, 0
Gui, Add, Picture,, D:\Images\Newtons_cradle_animation_book_2.gif
Gui, Show, NA x0 y0, NamePic 
WinSet, Transparent, 250
Return
</code></pre></div><div class="quotebox"><blockquote><p>и обратно не возвращается если использовать приложение.</p></blockquote></div><p>Вот почему обратно не возвращается, это конечно загадка, ни разу такого не видел.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-25T15:04:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85248#p85248</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85247#p85247" />
			<content type="html"><![CDATA[<p>Я думаю, <strong>Странникх</strong> как бы забыл поставить запятую. А имелось в виду: &quot;В приложениях - свои курсоры&quot;. То есть сторонние приложения.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-07-25T14:55:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85247#p85247</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85246#p85246" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>В приложениях, где я использую AHK свои курсоры.</p></blockquote></div><p>Так может быть в вопросе надо привести код того как используете курсор?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-25T14:21:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85246#p85246</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85245#p85245" />
			<content type="html"><![CDATA[<p>Может программа сама какая-то недоработанная? Есть снимок экрана, желательно с курсором?</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-07-25T14:01:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85245#p85245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: GUI смена курсора]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=85237#p85237" />
			<content type="html"><![CDATA[<p>В приложениях, где я использую AHK свои курсоры. Когда я навожу на картинку, которая расположена поверх окон этих приложений, то курсор меняется на тот, что загружен в Windows (стандартный) и обратно не возвращается если использовать приложение.<br />Все приложения в оконном режиме. </p><p>Собственно, вот код GUI на которую иногда наводится курсор и меняется<br /></p><div class="codebox"><pre><code>Gui, +AlwaysOnTop -0xC00000 +E0x08000000
Gui, Margin, 0, 0
Gui, Add, Picture,, pic.jpg
Gui, Show, NA x0 y0, NamePic</code></pre></div><p>Вопрос, что сделать с GUI, чтобы он не менял курсор на стандартный?</p>]]></content>
			<author>
				<name><![CDATA[Странникх]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30605</uri>
			</author>
			<updated>2014-07-25T09:45:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=85237#p85237</id>
		</entry>
</feed>
