Jump to content
Sign in to follow this  
jerwin

[Help]About 2 Progress Bar

Recommended Posts

jerwin

Thread Edited: Problem Solved

But i have 3 problem,..

See This,...

#1 i wish i can put 100% in Progress Bar 1 and Progress Bar 2 i try look for a clue but im failed sorry my english is not really fluent

Posted Image

#2 it is possible to change the green progress bar in a picture like picture.bmp?

and how?

#3 when the progress and downloading start the label keep blinking like this,..

Posted Image

is ther a way that the label not to blink?

thanx in advance my latest script here:

#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <Array.au3>
#include <GuiEdit.au3>
#include <WinAPI.au3>
#include <Constants.au3>
#include <ProgressConstants.au3>
#NoTrayIcon

$REGPATH = IniRead("lsetting.ini", "notice", "reg", "http://trows-rancp.servegame.com/ep4/register.php")
$NOTICE = IniRead("lsetting.ini", "notice", "reg", "http://notices.tropangwidgets.com")
$OIE = ObjCreate("Shell.Explorer.2")
FileInstall('testgui.png', "testgui.png",0)
FileInstall('grey.gif', "grey.gif",0)

$MY_GUIIMAGE = 'testgui.png'
$MY_GUIIMAGE2 = 'grey.gif'

#include <GUIConstantsEx.au3>
#include <skin.au3>
Opt("GUIOnEventMode", 1)
HotKeySet('{esc}','CLOSEClicked')



$Form1 = _UDF_SKINGUI_MAKE('Form1')
    $LAUNCH =  GUICtrlCreateButton("Button1", 741, 443, 184, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
GUICtrlSetImage(-1, "data\start.bmp", -1)
   $Button2 =  GUICtrlCreateButton("Button1", 741, 486, 184, 40, BitOR($BS_PUSHLIKE, $BS_BITMAP))
GUICtrlSetImage(-1, "data\register.bmp", -1)

$PB = GUICtrlCreateProgress(280, 467, 436, 10)
GUICtrlSetColor(-1, 0x00ff00)
GUICtrlSetBkColor(-1, 0x585858)
$PB2 = GUICtrlCreateProgress(280, 480, 436, 10)
GUICtrlSetColor(-1, 0x00ff00)
GUICtrlSetBkColor(-1, 0x585858)

$GUIACTIVEX = GUICtrlCreateObj($OIE, 369, 130, 540, 297)
GUICtrlSetState($LAUNCH, $GUI_ENABLE)
InetGet("http://patch.tropangwidgets.com/serverversion.ini", "serverversion.ini")
Sleep(500)
$chk = IniRead("serverversion.ini", "version", "ver", "NotFound")
$chk2 = IniRead("clientversion.ini", "version", "ver", "NotFound")
If $chk2 < $chk Then
    GUICtrlSetState($LAUNCH, $GUI_ENABLE)
    $Label = GUICtrlCreateLabel("Please Press Start!, Patch will start automatically!!", 280, 495, 375, 14)
    GUICtrlSetBkColor(-1,0x000000)
    GUICtrlSetColor(-1,0x00ff00)
ElseIf $chk2 = $chk Then
    GUICtrlSetState($LAUNCH, $GUI_ENABLE)
    GUICtrlSetData($PB, 100)
    GUICtrlSetData($PB2, 100)
    $Label = GUICtrlCreateLabel("Client is Updated !! You can Start The Game!!", 280, 495, 375, 14)
    GUICtrlSetBkColor(-1,0x000000)
    GUICtrlSetColor(-1,0x00ff00)
EndIf
FileDelete("serverversion.ini")
GUISetState()
$OIE.navigate($NOTICE)


GUICtrlSetOnEvent($Button2, "_Buttonclick1")
GUICtrlSetOnEvent($LAUNCH, "_Buttonclick2")



Func _Buttonclick1()
      $OIE3 = _IECREATE($REGPATH)
            Sleep(100)

    EndFunc

    Func _Buttonclick2()
       InetGet("http://patch.tropangwidgets.com/serverversion.ini", "serverversion.ini")
            Sleep(500)
            $chk = IniRead("serverversion.ini", "version", "ver", "NotFound")
            $chk2 = IniRead("clientversion.ini", "version", "ver", "NotFound")

            $patch1 = InetGetSize("http://patch.tropangwidgets.com/patch01.exe")
            $param = InetGetSize("http://patch.tropangwidgets.com/param.ini")
            $clientver = InetGetSize("http://patch.tropangwidgets.com/clientversion.ini")

            If $chk2 < $chk Then
                GUICtrlSetState($LAUNCH, $GUI_ENABLE)

                If ($patch1 > "0") Then
                    InetGet("http://patch.tropangwidgets.com/patch01.exe", "patch01.exe", 1, 1)
                    While @InetGetActive
                        $Label = GUICtrlCreateLabel("Downloading" & " Latest Patch" & " / Downloaded Size = " &@InetGetBytesRead & " of " & $patch1, 280, 495, 375, 14)
                        GUICtrlSetBkColor(-1,0x000000)
                        GUICtrlSetColor(-1,0x00ff00)
                        GUICtrlSetData($PB, @InetGetBytesRead * 100 / $patch1)
                        GUICtrlSetData($PB2, @InetGetBytesRead * 90 / $patch1)
Sleep(250)
                            WEnd
                    $Label = GUICtrlCreateLabel("Updating Files,.. Please Wait,...",  280, 495, 375, 14)
                        GUICtrlSetBkColor(-1,0x000000)
                        GUICtrlSetColor(-1,0x00ff00)
                    ShellExecute("patch01.exe")
                    Sleep(300)

                EndIf



                If ($param > "0") Then
                    InetGet("http://patch.tropangwidgets.com/param.ini", "param.ini", 1, 1)
                    While @InetGetActive
                        $Label = GUICtrlCreateLabel("Checking" & " Server Ip Address" & " / Checked Size = " &@InetGetBytesRead & " of " & $param, 280, 495, 375, 14)
                        GUICtrlSetBkColor(-1,0x000000)
                        GUICtrlSetColor(-1,0x00ff00)
                        GUICtrlSetData($PB2, @InetGetBytesRead * 100 / $param)
                        Sleep(250)
                    WEnd
                    FileMove("param.ini", "param.ini", 1)
                EndIf


                If ($clientver > "0") Then
                    InetGet("http://patch.tropangwidgets.com/clientversion.ini", "clientversion.ini", 1, 1)
                    While @InetGetActive
                        $Label = GUICtrlCreateLabel("Checking" & " Client Version" & " / Checked Size = " &@InetGetBytesRead & " of " & $param, 280, 495, 375, 14)
                        GUICtrlSetBkColor(-1,0x000000)
                        GUICtrlSetColor(-1,0x00ff00)
                        GUICtrlSetData($PB, @InetGetBytesRead * 100 / $clientver)
                        Sleep(250)
                    WEnd
                    FileMove("clientversion.ini", "clientversion.ini", 1)
                EndIf

                FileDelete("serverversion.ini")
                FileDelete("patch01.exe")
                GUICtrlSetState($LAUNCH, $GUI_ENABLE)

            ElseIf $chk2 = $chk Then

                FileDelete("serverversion.ini")
                FileDelete("patch01.exe")

            EndIf

            If ($param > "0") Then
                    InetGet("http://patch.tropangwidgets.com/param.ini", "param.ini", 1, 1)
                    While @InetGetActive
                        $Label = GUICtrlCreateLabel("Checking" & " Server Ip Address" & " / Checking Complete = " & "Status" & " OK " & "!", 280, 495, 375, 14)
                        GUICtrlSetBkColor(-1,0x000000)
                        GUICtrlSetColor(-1,0x00ff00)
                        GUICtrlSetData($PB2, @InetGetBytesRead * 100 / $param)
                        Sleep(250)
                    WEnd
                    FileMove("param.ini", "param.ini", 1)
                EndIf

FileDelete("serverversion.ini")
FileDelete("patch01.exe")
    GUICtrlSetData($PB, 100)
    GUICtrlSetData($PB2, 100)
    $Label = GUICtrlCreateLabel("Client is Updated !! You can Start The Game!!", 280, 495, 375, 14)
    GUICtrlSetBkColor(-1,0x000000)
    GUICtrlSetColor(-1,0x00ff00)
ShellExecute("TrowsEP4.exe", "/app_run")
            WinWait("Ran Client")
            $hWnd = WinGetHandle("Ran Client")
            _WinAPI_SetWindowText($hWnd, "Trows Ran Online EPX-Mix Edition Powered by: Jerwin System Software Development")
        WinActivate("Trows Ran Launcher", "")
        Send('{esc}')
EndFunc

Func CLOSEClicked()
    _UDF_SKINGUI_DELETE($Form1)
  Exit
EndFunc

While 1

    Sleep(1000)
WEnd
Edited by jerwin

[font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font]

Share this post


Link to post
Share on other sites
KaFu
jerwin
thanx for the reply i update my 1st post thanx

[font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.