tmraslan Posted May 7, 2011 Share Posted May 7, 2011 (edited) [img]http://www.tnctr.com/uploads/imgs/pre_1304772330__224737_201563753215526_127782523926983_490461_6634398_n.jpg[/img] Resimdekine Aşağıdaki kodları nasıl benzetebilirim indirme ogesi ve boyutunu? [code] #Include <File.au3> #Include <GuiConstants.au3> #include <IE.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #NoTrayIcon Global $m2ordner = @ScriptDir Global $ScriptDir = @ScriptDir Global $TempDir = @TempDir Global $url = FileReadLine($ScriptDir & "\patch.ini", 1) Global $adurl = FileReadLine ($ScriptDir & "\patch.ini",2) Global $fensterurl = FileReadLine ($ScriptDir & "\patch.ini",3) Global $buttonurl = FileReadLine ($ScriptDir & "\patch.ini",4) FileInstall("PFADADRESSE ZU PICTURE.BMP (NAME VON --->)", @Tempdir&"\metin2start.bmp",1) FileInstall("PFADADRESSE ZU PICTURE.BMP (NAME VON --->)", @Tempdir&"\btn_startgame_up.bmp",1) FileInstall("PFADADRESSE ZU PICTURE.BMP (NAME VON --->)", @Tempdir&"\btn_settings_up.bmp",1) FileInstall("PFADADRESSE ZU PICTURE.BMP (NAME VON --->)", @Tempdir&"\btn_newaccount_up.bmp",1) FileInstall("PFADADRESSE ZU PICTURE.BMP (NAME VON --->)", @Tempdir&"\btn_idpwd_up.bmp",1) FileInstall("PFADADRESSE ZU PICTURE.BMP (NAME VON --->)", @Tempdir&"\btn_quit_up.bmp",1) ;GUI###################################################### Opt("GUIOnEventMode", 1) $Form1 = GUICreate("Metin2 Patcher", 373, 541, 193, 125) GUISetOnEvent($GUI_EVENT_CLOSE, "_close") $stat = GUICtrlCreateEdit("", 16, 8, 337, 281) GUICtrlSetData(-1, "Metin2 Patcher"&@CRLF&"Dateiüberprüfung von...") $cancel = GUICtrlCreateButton("Cancel", 288, 496, 75, 25, 0) GUICtrlSetOnEvent($cancel, "_close") $Progress1 = GUICtrlCreateProgress(16, 464, 334, 17) ;16, 312, 340, 13 $oIE = _IECreateEmbedded() $oIE_ctrl = GUICtrlCreateObj($oIE, 16, 312, 336, 136) GUISetState(@SW_SHOW) _IENavigate($oIE, $adurl) $Form2 = GUICreate("Metin2 Patcher", 595, 385, 328, 160) GUISetOnEvent($GUI_EVENT_CLOSE, "_close") $Pic1 = GUICtrlCreatePic(@Tempdir&"\metin2start.bmp", 0, 0, 593, 382, $BS_BITMAP) $Pic1 = GUICtrlCreatePic(@Tempdir&"\metin2start.bmp", 0, 0, 593, 382, $BS_BITMAP) $start = GUICtrlCreateButton("(Not allowed)", 464, 40, 127, 41, $BS_BITMAP) GUICtrlSetImage(-1, @Tempdir&"\btn_startgame_up.bmp", 1) GUICtrlSetOnEvent($start, "start") $config = GUICtrlCreateButton("(Not allowed)", 464, 96, 127, 25, $BS_BITMAP) GUICtrlSetOnEvent($config, "config") GUICtrlSetImage(-1, @Tempdir&"\btn_settings_up.bmp", 1) $seite1 = GUICtrlCreateButton("(Not allowed)", 464, 184, 127, 25, $BS_BITMAP) GUICtrlSetImage(-1, @Tempdir&"\btn_newaccount_up.bmp", 1) GUICtrlSetOnEvent($seite1, "seite") $seite2 = GUICtrlCreateButton("(Not allowed)", 464, 160, 129, 25, $BS_BITMAP) GUICtrlSetImage(-1, @Tempdir&"\btn_idpwd_up.bmp", 1) GUICtrlSetOnEvent($seite2, "seite") $ende = GUICtrlCreateButton("(Not allowed)", 464, 352, 127, 25, $BS_BITMAP) GUICtrlSetImage(-1, @Tempdir&"\btn_quit_up.bmp", 1) GUICtrlSetOnEvent($ende, "_close") $oIE1 = _IECreateEmbedded() $oIE_ctrl1 = GUICtrlCreateObj($oIE1, 8, 8, 456, 376) _IENavigate($oIE1, $fensterurl) GUISetState(@SW_HIDE) ;gui##################################################### Func seite () _IECreate($buttonurl) EndFunc func start () run($Scriptdir&"/metin2.bin") Exit EndFunc Func config () Run($ScriptDir&"\config.exe") EndFunc func _close () Exit EndFunc Sleep (500) patch () func patch () $file = @TempDir&"\files.txt" InetGet( $url&"\files.txt" , $file) $lines = _FileCountLines($file) If $lines = 0 Then MsgBox(48,"Error","Patchlist Fehler!") Exit EndIf DirCreate("pack") DirCreate("BGM") DirCreate("lib") DirCreate("mark") DirCreate("miles") DirCreate("screenshot") DirCreate("upload") DirCreate("lib/armor") While ($lines >= 1) $datei = FileReadLine($file,$lines) GUICtrlSetData($stat,"Dateiprüfung startet... "& $datei & @CRLF & GUICtrlRead($stat)) $size_inet = InetGetSize($url&"\"&$datei) If FileExists($ScriptDir&""&$datei) Then If @error Then MsgBox(16 , "Fehler", @error) EndIf $size_ordner = FileGetSize( $ScriptDir&""&$datei) If $size_inet <> $size_ordner Then GUICtrlSetData($stat,"Aktualisierung von..."& $datei & @CRLF & GUICtrlRead($stat)) InetGet($url&$datei , $ScriptDir& "" & $datei , 1 , 1) while 1 $hFileSize = FileGetSize($ScriptDir & "" & $datei) ;Wie viel wurde schon geladen. $iPercent = round ( @InetGetBytesRead / $size_inet *100) ;Rechen Operation ? O.O GUICtrlSetData($Progress1, $iPercent) ;Progressbar einstellen If $hFileSize = $size_inet Then GUICtrlSetData($Progress1, 100) ExitLoop EndIf sleep (50) WEnd Else GUICtrlSetData($stat,"Übersprung..."& $datei & @CRLF & GUICtrlRead($stat)) EndIf Else InetGet($url&$datei , $ScriptDir& "" & $datei , 1 , 1) GUICtrlSetData($stat, "Aktualisieren von..."& $datei& @CRLF & GUICtrlRead($stat)) while 1 $hFileSize = FileGetSize($ScriptDir & "" & $datei) ;Wie viel wurde schon geladen. $iPercent = round ( @InetGetBytesRead / $size_inet *100) ;Rechen Operation ? O.O GUICtrlSetData($Progress1, $iPercent) ;Progressbar einstellen If $hFileSize = $size_inet Then GUICtrlSetData($Progress1, 100) ExitLoop EndIf sleep (50) WEnd EndIf sleep (500) $lines = $lines-1 WEnd FileDelete($TempDir&"files.txt") GUISetState(@SW_HIDE,$Form1) GUISetState(@SW_SHOW,$Form2) while 1 Sleep(100) WEnd EndFunc [/code] Edited May 7, 2011 by tmraslan Quote Link to comment Share on other sites More sharing options...
tmraslan Posted May 7, 2011 Author Share Posted May 7, 2011 (edited) Hiç Mi bilgisi olan yok Edited May 7, 2011 by tmraslan Quote Link to comment Share on other sites More sharing options...
Game.Over Posted May 13, 2011 Share Posted May 13, 2011 Sanırım senin demek istediğin Uzaktan Update (Uzaktan güncelleme) .. Bu soruyu ben Ams bölümünde sorumuştum.. Orda cevabı ve tüm kodları var. Ordan Bakarbilirsin. Not : Programlama bölümünde Quote Link to comment Share on other sites More sharing options...
tmraslan Posted June 3, 2011 Author Share Posted June 3, 2011 Tam olarak istediğim o değil yukarda verdiğim kodu resimdeki görünüme kavuşturmak istiyorum sadece Quote Link to comment Share on other sites More sharing options...
x_files_x Posted June 17, 2011 Share Posted June 17, 2011 B kodta kötü kokular alıyorum ) Quote Link to comment Share on other sites More sharing options...
tmraslan Posted June 21, 2011 Author Share Posted June 21, 2011 Ne gibi kötü koku? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.