Jump to content

Help me, progress bar full without close window


Recommended Posts

#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

Link to comment
Share on other sites

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

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...