1 (изменено: Hydrogenium, 2013-07-14 00:00:07)

Тема: AHK: Как очистить GUI

+ открыть спойлер


#NoEnv               
#Persistent          

SetTimer, InfoWin, 1000

InfoWin:
    WinGet, this_id, ID, A   
    WinGetTitle, this_title, ahk_id %this_id%
    
    ;~ Gui, Destroy     
    Gui, -SysMenu
    
    Gui, Add, Text,, Active Table
    Gui, Add, Text,, this_id = %this_id%
    Gui, Add, Text,, this_title = %this_title%
    
    Gui, Show, NoActivate, My Window    
Return

Вот код, создаётся окно и показывается инфа о активном окне, но this_id и this_title  не обновляются

Если делать

Gui, Destroy

то окно моргает и.т.п.

2

Re: AHK: Как очистить GUI

Чтобы обновлялось:


#NoEnv               
#Persistent          

Gui, -SysMenu
    
Gui, Add, Text,, Active Table
Gui, Add, Text, vthis_id w200
Gui, Add, Text, vthis_title w200
    
Gui, Show, NoActivate, My Window    

SetTimer, InfoWin, 1000

InfoWin:
    WinGet, this_id, ID, A   
    WinGetTitle, this_title, ahk_id %this_id%
    GuiControl,, this_id, this_id = %this_id%
    GuiControl,, this_title, this_title = %this_title%
Return

3

Re: AHK: Как очистить GUI

YMP, спасиб ))