0

関連するコードは次のとおりです。

#Persistent
#SingleInstance, Force
#NoEnv

Gui, 2:New
Gui, 2: +Owner
Gui, 2:Color, 000000
Gui, 2:+hwndGUIaddress2
Gui, 2:Show, w500 h137, WinB
Gui, 2: +LastFound
WinSet, Transparent, 190

Gui, New
Gui, +Owner
Gui, Font, s8 cB4FFFF, Tahoma
Gui, Add, Text, x5  y5  w130, Filename:
;Gui, Add, Text, vProgress
Gui, Add, Text, x80 y5  w650 vFilename
Gui, Add, Text,     y+1 w650 vProgress

Gui, Color, EEAA99
Gui, +LastFound
Gui, +hwndGUIAddress1
WinSet, TransColor, EEAA99 225
Gui,    Show, w500 h137
OnMessage(0x03, "WM_MOVE")

Loop, D:\MOVIES_in\*.ts,0,1
{
    title = %A_LoopFileFullPath%
    LongPath = %A_LoopFileLongPath%
    SplitPath LongPath, FileName, OutDir, OutExtension, OutNameNoExt, OutDrive
    FileGetSize, Size_In, %A_LoopFileFullPath%
}


GuiControl, , Filename, %title%

Gosub Check_D_Drive

SetTimer, Check_D_Drive, 5000
return

Check_D_Drive:
{
    Loop, D:\MOVIES_out\*.ts,0,1
    {
        FileGetSize, Size_Out, %A_LoopFileFullPath%
    }

    sleep 5000

    Loop, D:\MOVIES_out\*.ts,0,1
    {
        FileGetSize, Size_Out2, %A_LoopFileFullPath%
    }

    complete:= Size_Out / Size_In
    msgbox,,,%complete%,1
    GuiControl,, Progress, %complete%

    if (  complete > .98 )
    {
        if (%Size_Out% == %Size_Out2%)
        {
            SetTimer, Check_I_Drive, Off
            msgbox Job is complete
        }
    }
}
return
;---------------------------------------------------------------------------------
WM_MOVE()
{
    global GUIAddress1, global GUIAddress2
    WinGetPos, mainX, mainY, Width, Height, Ahk_id %GUIAddress1%
    WinMove, Ahk_id %GUIAddress2%,, %mainX%, %mainY%
    WinSet, AlwaysOnTop,, Ahk_id %GUIAddress1%
}

メッセージボックスは正常に動作します。GUI に更新が表示されないだけです。

4

1 に答える 1