<?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=15365&amp;type=atom" />
	<updated>2020-05-15T11:55:29Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15365</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Индикатор прогресса на панели задач]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139534#p139534" />
			<content type="html"><![CDATA[<p>В классической теме не работает. Но наверное можно надпись на кнопке заменить на &quot;XX %&quot;.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2020-05-15T11:55:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139534#p139534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Индикатор прогресса на панели задач]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139531#p139531" />
			<content type="html"><![CDATA[<p><a href="https://autohotkey.com/board/topic/97866-hide-all-traces-of-an-external-program-taskbar-button-alttab-order-main-window/">https://autohotkey.com/board/topic/9786 … in-window/</a><br /></p><div class="codebox"><pre><code>#SingleInstance Force
#Persistent 
 

Gui, Font, s15
Gui, Add, Text,, % &quot;This GUI should show a progress bar on its taskbar button.`n&quot;
                 . &quot;It will demonstrate the four different progress states:`n&quot;
                 . &quot;(N)ormal, (P)aused, (E)rror and (I)ndeterminate.&quot;
Gui, Show        ; Show the window and taskbar button.
Gui, +LastFound  ; SetTaskbarProgress will use this window.
; WinExist(&quot;ahk_class CabinetWClass&quot;)
Sleep 200
Loop
{
    progress_states=NPE
    Loop, Parse, progress_states
    {
        SetTaskbarProgress(0, A_LoopField)
        Loop 50 {
            SetTaskbarProgress(A_Index*2)
            Sleep 50
        }
        Sleep 1000
        Loop 50 {
            SetTaskbarProgress(100-A_Index*2)
            Sleep 50
        }
        SetTaskbarProgress(0)
        Sleep 1000
    }
    SetTaskbarProgress(&quot;I&quot;)
    Sleep 4000
}

; SetTaskbarProgress  -  Requires Windows 7.
;
; pct    -  A number between 0 and 100 or a state value (see below).
; state  -  &quot;N&quot; (normal), &quot;P&quot; (paused), &quot;E&quot; (error) or &quot;I&quot; (indeterminate).
;           If omitted (and pct is a number), the state is not changed.
; hwnd   -  The ID of the window which owns the taskbar button.
;           If omitted, the Last Found Window is used.
;

SetTaskbarProgress(pct, state=&quot;&quot;, hwnd=&quot;&quot;)
{
    static tbl, s0:=0, sI:=1, sN:=2, sE:=4, sP:=8
    if !tbl 
		tbl := ComObjCreate(&quot;{56FDF344-FD6D-11d0-958A-006097C9A090}&quot;, &quot;{ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf}&quot;)  
    if hwnd =
        hwnd := WinExist()
    if pct is not number
        state := pct, pct := &quot;&quot;
    else if (pct = 0 &amp;&amp; state=&quot;&quot;)
        state := 0, pct := &quot;&quot;
    if state in 0,I,N,E,P   ; ITaskbarList3::SetProgressState
        DllCall(NumGet(NumGet(tbl+0)+10*A_PtrSize), &quot;ptr&quot;, tbl, &quot;ptr&quot;, hwnd, &quot;uint&quot;, s%state%)
    if pct !=               ; ITaskbarList3::SetProgressValue
        DllCall(NumGet(NumGet(tbl+0)+9*A_PtrSize), &quot;ptr&quot;, tbl, &quot;ptr&quot;, hwnd, &quot;int64&quot;, pct*10, &quot;int64&quot;, 1000)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2020-05-15T11:28:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139531#p139531</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Индикатор прогресса на панели задач]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=139530#p139530" />
			<content type="html"><![CDATA[<p>Привет, всем. Хочу реализовать в скрипте вот эту вещь.<br /><span class="postimg"><img src="https://i.imgur.com/Rd67iiz.png" alt="https://i.imgur.com/Rd67iiz.png" /></span></p><p>Нашел статью на Хабре: <a href="https://habr.com/ru/post/68867">https://habr.com/ru/post/68867</a> (надеюсь за ссылки тут не забанят).<br />Интересует, возможно ли это реализовать на AHK?</p>]]></content>
			<author>
				<name><![CDATA[morgan]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39372</uri>
			</author>
			<updated>2020-05-15T10:28:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=139530#p139530</id>
		</entry>
</feed>
