Sign in to follow this  
Followers 0
harryKumar

Help me, progress bar full without close window

3 posts in this topic

#NoTrayIcon

Global Const $gui_event_close = -3

$main = GUICreate("UPX In Progress Bar", 237, 129, 372, 328)
GUISetBkColor(16777215)

$input1 = GUICtrlCreateInput("", 24, 24, 153, 21)
$button1 = GUICtrlCreateButton(".......", 184, 24, 35, 25)
$button2 = GUICtrlCreateButton("Run", 80, 56, 59, 25)
$progress1 = GUICtrlCreateProgress(16, 96, 206, 17)
GUISetState(@SW_SHOW)

While 1
    $nmsg = GUIGetMsg()
    Switch $nmsg
        Case $gui_event_close
            Exit

        Case $button1
            $fo = FileOpenDialog("File", "", "(*.dll;*.exe)")
            GUICtrlSetData($input1, $fo)
            FileChangeDir(@ScriptDir)

        Case $button2
            If GUICtrlRead($input1) Then
                $r = Run(@ScriptDir & "\upx.exe -9 -f -k" & " " & GUICtrlRead($input1))
                GUICtrlSetData($progress1, ($r))
            Else
            EndIf

    EndSwitch
WEnd

How to reset progress bar....


66726565776172656F6E74686973373737

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Look into helpfile at example for StdOutRead().

You have to read output from console and parse desired information, here value of progress of UPX displaied on console output.

Edited by Zedna

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You can also set the function/value to 0 if you check the fonction name into your *.au3 input

I did somthing similare for FileCopy

exemple the value of the copy size dest was implementing so i was seting the value to 0 after each copy.

Edited by caramen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0