<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Скрытие системного курсора в FullScreenMode]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=10857</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10857&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Скрытие системного курсора в FullScreenMode».]]></description>
		<lastBuildDate>Tue, 11 Aug 2015 06:12:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96380#p96380</link>
			<description><![CDATA[<p>У меня всё работает без ошибок - проверял ни один день.</p><p>Проблема решена, её раз спасибо <strong>Alectric</strong></p>]]></description>
			<author><![CDATA[null@example.com (Indomito)]]></author>
			<pubDate>Tue, 11 Aug 2015 06:12:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96380#p96380</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96347#p96347</link>
			<description><![CDATA[<p>Опять поймал этот глюк - теперь пострадали курсоры изменения размеров окна, скрипты уже давно выключены.</p><p>...<br />Ладно не важно, закрыли тему про глюк, а то оффтоп, да еще и мультипост.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sun, 09 Aug 2015 08:36:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96347#p96347</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96346#p96346</link>
			<description><![CDATA[<p>Кажется понял - видимо две копии скрипта было запущено.</p><p>Когда уже до разработчиков дойдет сделать &quot;#SingleInstance&quot; по умолчанию &quot;Force&quot;.</p><br /><p>...<br />Хотя нет, две копии запустил - всеравно нормально... и пять копий...<br />Странный глюк...</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sun, 09 Aug 2015 08:26:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96346#p96346</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96345#p96345</link>
			<description><![CDATA[<p>А ты видеоплеер запускаешь скриптом и он не выгружается или просто скрыл, а показ курсора другим скриптом?</p>]]></description>
			<author><![CDATA[null@example.com (Indomito)]]></author>
			<pubDate>Sun, 09 Aug 2015 08:25:47 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96345#p96345</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96344#p96344</link>
			<description><![CDATA[<p>Странный глюк в видеоплеере - скрывает нормально, выхожу из FullScreen&#039;а все курсоры отображаются, кроме основного.<br />Использовал такой код:<br /></p><div class="codebox"><pre><code>loop
{
  if (!doonce and isWindowFullScreen(WinExist(&quot;A&quot;)))
  {
    doonce=1
    SystemCursor(0)
    tooltip,FullScreen
  }
  else if (doonce and !isWindowFullScreen(WinExist(&quot;A&quot;)))
  {
    doonce=
    SystemCursor(1)
    tooltip,Not
  }
  sleep,100
}

isWindowFullScreen(WinID)
{
  WinGet,WinMinMax,MinMax,ahk_id %WinID%
  WinGetPos,WinX,WinY,WinW,WinH,ahk_id %WinID%
  if (WinMinMax=0 and WinX=0 and WinY=0 and WinW=A_ScreenWidth and WinH=A_ScreenHeight)
  {
    WinGetClass,WinClass,ahk_id %WinID%
    WinGet,WinProcessName,ProcessName,ahk_id %WinID%
    SplitPath,WinProcessName,,,WinProcessExt
    if (WinClass!=&quot;Progman&quot;) and (WinProcessExt!=&quot;scr&quot;)
      return true
  }
}

SystemCursor(OnOff=1)   ; INIT = &quot;I&quot;,&quot;Init&quot;; OFF = 0,&quot;Off&quot;; TOGGLE = -1,&quot;T&quot;,&quot;Toggle&quot;; ON = others
{
    static AndMask, XorMask, $, h_cursor
        ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
        , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13   ; blank cursors
        , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13   ; handles of default cursors
    if (OnOff = &quot;Init&quot; or OnOff = &quot;I&quot; or $ = &quot;&quot;)       ; init when requested or at first call
    {
        $ = h                                          ; active default cursors
        VarSetCapacity( h_cursor,4444, 1 )
        VarSetCapacity( AndMask, 32*4, 0xFF )
        VarSetCapacity( XorMask, 32*4, 0 )
        system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
        StringSplit c, system_cursors, `,
        Loop %c0%
        {
            h_cursor   := DllCall( &quot;LoadCursor&quot;, &quot;uint&quot;,0, &quot;uint&quot;,c%A_Index% )
            h%A_Index% := DllCall( &quot;CopyImage&quot;,  &quot;uint&quot;,h_cursor, &quot;uint&quot;,2, &quot;int&quot;,0, &quot;int&quot;,0, &quot;uint&quot;,0 )
            b%A_Index% := DllCall(&quot;CreateCursor&quot;,&quot;uint&quot;,0, &quot;int&quot;,0, &quot;int&quot;,0
                , &quot;int&quot;,32, &quot;int&quot;,32, &quot;uint&quot;,&amp;AndMask, &quot;uint&quot;,&amp;XorMask )
        }
    }
    if (OnOff = 0 or OnOff = &quot;Off&quot; or $ = &quot;h&quot; and (OnOff &lt; 0 or OnOff = &quot;Toggle&quot; or OnOff = &quot;T&quot;))
        $ = b  ; use blank cursors
    else
        $ = h  ; use the saved cursors

    Loop %c0%
    {
        h_cursor := DllCall( &quot;CopyImage&quot;, &quot;uint&quot;,%$%%A_Index%, &quot;uint&quot;,2, &quot;int&quot;,0, &quot;int&quot;,0, &quot;uint&quot;,0 )
        DllCall( &quot;SetSystemCursor&quot;, &quot;uint&quot;,h_cursor, &quot;uint&quot;,c%A_Index% )
    }
}
</code></pre></div><p>...<br />Да сейчас уже не глючит... странный глюк... ну да ладно, все работает.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sun, 09 Aug 2015 08:21:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96344#p96344</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96343#p96343</link>
			<description><![CDATA[<p>Проверил уже на той программе, где два курсора - не помогает... блин.</p><p>Опс... забыл её вызывать. Поправил, скрывает и не глючит.</p>]]></description>
			<author><![CDATA[null@example.com (Indomito)]]></author>
			<pubDate>Sun, 09 Aug 2015 07:39:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96343#p96343</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96342#p96342</link>
			<description><![CDATA[<p><strong>Alectric</strong> Я вот написал так. </p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;То что глючит</div><div class="fancy_spoiler"><div class="codebox"><pre><code>SystemCursor(0)
MsgBox скрыть курор
SystemCursor(1)
MsgBox показать курсор
SystemCursor(1)
Return

; Example: Hides the mouse cursor when you press Win+C. To later show the cursor, press Win+C again.
; This script is from www.autohotkey.com/forum/topic6107.html

;OnExit, ShowCursor  ; Ensure the cursor is made visible when the script exits.
;return

;ShowCursor:
;SystemCursor(&quot;On&quot;)
;ExitApp

;#c::SystemCursor(&quot;Toggle&quot;)  ; Win+C hotkey to toggle the cursor on and off.

SystemCursor(OnOff=1)   ; INIT = &quot;I&quot;,&quot;Init&quot;; OFF = 0,&quot;Off&quot;; TOGGLE = -1,&quot;T&quot;,&quot;Toggle&quot;; ON = others
{
    static AndMask, XorMask, $, h_cursor
        ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
        , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13   ; blank cursors
        , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13   ; handles of default cursors
    if (OnOff = &quot;Init&quot; or OnOff = &quot;I&quot; or $ = &quot;&quot;)       ; init when requested or at first call
    {
        $ = h                                          ; active default cursors
        VarSetCapacity( h_cursor,4444, 1 )
        VarSetCapacity( AndMask, 32*4, 0xFF )
        VarSetCapacity( XorMask, 32*4, 0 )
        system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
        StringSplit c, system_cursors, `,
        Loop %c0%
        {
            h_cursor   := DllCall( &quot;LoadCursor&quot;, &quot;uint&quot;,0, &quot;uint&quot;,c%A_Index% )
            h%A_Index% := DllCall( &quot;CopyImage&quot;,  &quot;uint&quot;,h_cursor, &quot;uint&quot;,2, &quot;int&quot;,0, &quot;int&quot;,0, &quot;uint&quot;,0 )
            b%A_Index% := DllCall(&quot;CreateCursor&quot;,&quot;uint&quot;,0, &quot;int&quot;,0, &quot;int&quot;,0
                , &quot;int&quot;,32, &quot;int&quot;,32, &quot;uint&quot;,&amp;AndMask, &quot;uint&quot;,&amp;XorMask )
        }
    }
    if (OnOff = 0 or OnOff = &quot;Off&quot; or $ = &quot;h&quot; and (OnOff &lt; 0 or OnOff = &quot;Toggle&quot; or OnOff = &quot;T&quot;))
        $ = b  ; use blank cursors
    else
        $ = h  ; use the saved cursors

    Loop %c0%
    {
        h_cursor := DllCall( &quot;CopyImage&quot;, &quot;uint&quot;,%$%%A_Index%, &quot;uint&quot;,2, &quot;int&quot;,0, &quot;int&quot;,0, &quot;uint&quot;,0 )
        DllCall( &quot;SetSystemCursor&quot;, &quot;uint&quot;,h_cursor, &quot;uint&quot;,c%A_Index% )
    }
}</code></pre></div></div></div><p> Долго ждал глюка и не дождался.</p><p>Если написать SystemCursor(&quot;Off&quot;) - то реакции не будет, ты про этот глюк? <br />Просто в таком варианте скрытие плохо отрабатывается, через раз или вообще не скрывает.</p><br /><p>P.S. Видимо из за отсутствия <strong>CaseSensitive := False</strong> и <strong>CaseSensitive := True</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (Indomito)]]></author>
			<pubDate>Sun, 09 Aug 2015 07:01:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96342#p96342</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96341#p96341</link>
			<description><![CDATA[<p><strong>Alectric</strong><br /></p><div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>Определяю FullScreen режим окна таким методом:</p></blockquote></div><p> А как скрывать то?<br /></p><div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>Не знаю как у вас, у меня эта функция не скрывает курсор:</p></blockquote></div><p> Она скрывает, но только в окне.<br /></p><div class="quotebox"><cite>Alectric пишет:</cite><blockquote><p>Вот эта скрывает, но ужасно глючит.</p></blockquote></div><p> А в чём её глюк то?</p>]]></description>
			<author><![CDATA[null@example.com (Indomito)]]></author>
			<pubDate>Sun, 09 Aug 2015 06:50:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96341#p96341</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96339#p96339</link>
			<description><![CDATA[<p>Не знаю как у вас, у меня <a href="https://msdn.microsoft.com/ru-ru/library/windows/desktop/ms648396(v=vs.85).aspx">эта функция</a> не скрывает курсор:<br /></p><div class="codebox"><pre><code>f1::
    tooltip,% a:=DllCall(&quot;ShowCursor&quot;, &quot;Int&quot;, 1)
return

f2::
   tooltip,% a:=DllCall(&quot;ShowCursor&quot;, &quot;Int&quot;, 0)
return
</code></pre></div><br /><br /><p><a href="http://www.autohotkey.com/board/topic/22037-hide-and-show-mouse-cursor-by-macro/">Вот эта</a> скрывает, но ужасно глючит.</p>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sun, 09 Aug 2015 04:24:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96339#p96339</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96338#p96338</link>
			<description><![CDATA[<p>Определяю FullScreen режим окна таким методом:<br /></p><div class="codebox"><pre><code>
loop
{
  if isWindowFullScreen(WinExist(&quot;A&quot;))
    tooltip,FullScreen
  else
    tooltip,Not
  sleep,1
}

isWindowFullScreen(WinID)
{
  WinGet,WinMinMax,MinMax,ahk_id %WinID%
  WinGetPos,WinX,WinY,WinW,WinH,ahk_id %WinID%
  if (WinMinMax=0 and WinX=0 and WinY=0 and WinW=A_ScreenWidth and WinH=A_ScreenHeight)
  {
    WinGetClass,WinClass,ahk_id %WinID%
    WinGet,WinProcessName,ProcessName,ahk_id %WinID%
    SplitPath,WinProcessName,,,WinProcessExt
    if (WinClass!=&quot;Progman&quot;) and (WinProcessExt!=&quot;scr&quot;)
      return true
  }
}
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alectric)]]></author>
			<pubDate>Sun, 09 Aug 2015 03:47:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96338#p96338</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Скрытие системного курсора в FullScreenMode]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=96335#p96335</link>
			<description><![CDATA[<p>Приветствую.</p><p>По сути задача не сложная и она работает в оконном режиме, но программа запускаемая мной не моя.<br />Достаточно несколько раз выполнить последовательность подпрограмм <strong>lMinWinGameKeys</strong> и <strong>lMaxWinGameKeys</strong> и на экране отображаются два курсора - внутрипрограммный и&nbsp; системный.<br />Видимо что ещё нужно - имя окна, доп. параметры, etc.<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Код скрытия курсора</div><div class="fancy_spoiler"><div class="codebox"><pre><code>gShowCursor:
  DllCall(&quot;ShowCursor&quot;, &quot;Int&quot;, 1)
  fSHCursor:=0
return
    
gHideCursor:
  DllCall(&quot;ShowCursor&quot;, &quot;Int&quot;, 0)
  fSHCursor:=1
return

lMaxWinGameKeys:
Thread, NoTimers
Critical
  WinActivate, %WinNameCame%
    Sleep, 1000
    Send, {Escape}
  Gosub gHideCursor
Critical , Off
Thread, NoTimers, false 
Return

lMinWinGameKeys:
Thread, NoTimers
Critical 
    Send, {Escape}
    Sleep, 1000
    WinMinimize, A
  Gosub gShowCursor
Critical , Off
Thread, NoTimers, false 
Return
</code></pre></div></div></div><p> Я, честно говоря, голову сломал, ища аналогичные примеры, но все они относятся к оконному режиму окна.<br />Отключал и включал режим DSR режим - зависимости нет.<br />Ставил отключение в секцию таймера - не помогло.</p><p>P.S. До написания тестировал в скрипте в оконном режиме - всё работает.</p>]]></description>
			<author><![CDATA[null@example.com (Indomito)]]></author>
			<pubDate>Sat, 08 Aug 2015 22:58:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=96335#p96335</guid>
		</item>
	</channel>
</rss>
