Jump to content

Hatam Nerede? Progress Dolmuyor...


Xpista7

Recommended Posts

Arkadaşlar kod:

#include <GUIConstantsEx.au3>

#include <ProgressConstants.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=c:\users\admin\desktop\form1.kxf

$Form1_1 = GUICreate("CRYSIS Kurulumu", 401, 161, 347, 423)

GUISetIcon("F:\OYUNLAR\Crysis II\Warhead.ico")

GUISetFont(9, 400, 0, "Segoe UI")

GUISetBkColor(0xFFFFFF)

$Progress1 = GUICtrlCreateProgress(128, 88, 262, 25)

GUICtrlSetColor(-1, 0x000000)

$Pic1 = GUICtrlCreatePic("D:\KaaN\GÖRSELLİK-KOLAYLAŞTIRMA\İconlar-Resimler\resim_412678063.gif", 8, 8, 108, 140, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Label1 = GUICtrlCreateLabel("CRYSIS Sisteminize Yükleniyor, Lütfen Bekleyiniz...", 120, 40, 266, 19)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Label1

EndSwitch

WEnd

1264kuv.png

Yukarıda resimde herşey tamam, sadece progress kendi kendine dolacak ve pencere kendiliğinden kapanacak (progress in dolumu bittikten sonra)... Ayrıca Pencerenin x ile kapatma yeride kapalı olucak yani kullanıcı istesede kapatamayacak... ŞİMDİDEN TEŞEKKÜRLER... :D

Link to comment
Share on other sites

@Xpista7

GUICtrlSetData ile progresi ilerletmelisin...

#include &lt;GUIConstantsEx.au3&gt;
#include &lt;ProgressConstants.au3&gt;
#include &lt;StaticConstants.au3&gt;
#include &lt;WindowsConstants.au3&gt;

#Region ### START Koda GUI section ### Form=c:\users\admin\desktop\form1.kxf
Opt("GUIOnEventMode", 1)
$Form1_1 = GUICreate("CRYSIS Kurulumu", 401, 161, 347, 423)
GUISetOnEvent(-3, "_Exit")
GUISetIcon("F:\OYUNLAR\Crysis II\Warhead.ico")
GUISetFont(9, 400, 0, "Segoe UI")
GUISetBkColor(0xFFFFFF)
$Progress1 = GUICtrlCreateProgress(128, 88, 262, 25)
GUICtrlSetColor(-1, 0x000000)
$Pic1 = GUICtrlCreatePic("D:\KaaN\GÖRSELLİK-KOLAYLAŞTIRMA\İconlar-Resimler\resim_412678063.gif", 8, 8, 108, 140, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("CRYSIS Sisteminize Yükleniyor, Lütfen Bekleyiniz...", 120, 40, 266, 19)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $i = 0
While 1
	GUICtrlSetData($Progress1, $i)
	$i +=1
	Sleep(100)
WEnd

Func _Exit()
	Exit
EndFunc

Link to comment
Share on other sites

Peki bu progress dolduktan sonra otomatik olarak nasıl kapanacak? çok yeniyim ProgressOff() diyom birşey olmuyor... ProcessClose() da dedim gene bişi olmadı... ProcessExists() da dedim gene olmadı ama sizin verdiğiniz kodla progress doluyor TEŞEKKÜRLER ....

Link to comment
Share on other sites

#include &lt;GUIConstantsEx.au3&gt;
#include &lt;ProgressConstants.au3&gt;
#include &lt;StaticConstants.au3&gt;
#include &lt;WindowsConstants.au3&gt;

#Region ### START Koda GUI section ### Form=c:\users\admin\desktop\form1.kxf
Opt("GUIOnEventMode", 1)
$Form1_1 = GUICreate("CRYSIS Kurulumu", 401, 161, 347, 423)
GUISetOnEvent(-3, "_Exit")
GUISetIcon("F:\OYUNLAR\Crysis II\Warhead.ico")
GUISetFont(9, 400, 0, "Segoe UI")
GUISetBkColor(0xFFFFFF)
$Progress1 = GUICtrlCreateProgress(128, 88, 262, 25)
GUICtrlSetColor(-1, 0x000000)
$Pic1 = GUICtrlCreatePic("D:\KaaN\GÖRSELLİK-KOLAYLAŞTIRMA\İconlar-Resimler\resim_412678063.gif", 8, 8, 108, 140, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Label1 = GUICtrlCreateLabel("CRYSIS Sisteminize Yükleniyor, Lütfen Bekleyiniz...", 120, 40, 266, 19)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $i = 0
While 1

	$i +=1
	GUICtrlSetData($Progress1, $i)
	Sleep(100)
	If $i &gt; 100 Then
		ExitLoop
	EndIf
WEnd
GUICtrlSetData($Label1,"Program kuruldu")
Sleep(2000)

Func _Exit()
	Exit
EndFunc

Link to comment
Share on other sites

Autoitte bazı komutlar görevini bitirmeden alt satırlara geçmez. Filecopy komutuda bunlardan birisidir. Sen kısacası birinci kopyalama bitince, ilgili satırırn altına progresi ilerletmek için bir satır ekleyebilirsin. Örneği incele. Tabi filecopy için farklı yöntemlerde izlenebilir...

Opt("GUIOnEventMode", 1)
Global $Form1_1 = GUICreate("CRYSIS Kurulumu", 401, 161, 347, 423)
GUISetOnEvent(-3, "_Exit")
GUISetFont(9, 400, 0, "Segoe UI")
GUISetBkColor(0xFFFFFF)
Global $Progress1 = GUICtrlCreateProgress(128, 88, 262, 25)
GUICtrlSetColor(-1, 0x000000)
Global $Pic1 = GUICtrlCreatePic("D:\KaaN\GÖRSELLİK-KOLAYLAŞTIRMA\İconlar-Resimler\resim_412678063.gif", 8, 8, 108, 140)
Global $Label1 = GUICtrlCreateLabel("CRYSIS Sisteminize Yükleniyor, Lütfen Bekleyiniz...", 120, 40, 266, 19)
GUISetState(@SW_SHOW)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 10)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 20)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 30)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 40)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 50)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 60)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 70)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 80)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 90)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 100)
GUICtrlSetData($Label1,"Program kuruldu")
Sleep(2000)

Func _Exit()
	Exit
EndFunc

Link to comment
Share on other sites

Öncelikle bir değişken kullanabilirsin. Misal;

Global $Progres_Data = 0
Opt("GUIOnEventMode", 1)
Global $Form1_1 = GUICreate("CRYSIS Kurulumu", 401, 161, 347, 423)
GUISetOnEvent(-3, "_Exit")
GUISetFont(9, 400, 0, "Segoe UI")
GUISetBkColor(0xFFFFFF)
Global $Progress1 = GUICtrlCreateProgress(128, 88, 262, 25)
GUICtrlSetColor(-1, 0x000000)
Global $Pic1 = GUICtrlCreatePic("D:\KaaN\GÖRSELLİK-KOLAYLAŞTIRMA\İconlar-Resimler\resim_412678063.gif", 8, 8, 108, 140)
Global $Label1 = GUICtrlCreateLabel("CRYSIS Sisteminize Yükleniyor, Lütfen Bekleyiniz...", 120, 40, 266, 19)
GUISetState(@SW_SHOW)

FileCopy("kaynak","hedef")
$Progres_Data = 10
GUICtrlSetData($Progress1, $Progres_Data)
Sleep(1000) ;

FileCopy("kaynak","hedef")
$Progres_Data = $Progres_Data - 10
GUICtrlSetData($Progress1, $Progres_Data)
Sleep(1000) ;

Func _Exit()
	Exit
EndFunc

Veyahut GUICtrlRead ile mevcut değeri okutup yeni çıkartabilirsin. Misal;

Opt("GUIOnEventMode", 1)
Global $Form1_1 = GUICreate("CRYSIS Kurulumu", 401, 161, 347, 423)
GUISetOnEvent(-3, "_Exit")
GUISetFont(9, 400, 0, "Segoe UI")
GUISetBkColor(0xFFFFFF)
Global $Progress1 = GUICtrlCreateProgress(128, 88, 262, 25)
GUICtrlSetColor(-1, 0x000000)
Global $Pic1 = GUICtrlCreatePic("D:\KaaN\GÖRSELLİK-KOLAYLAŞTIRMA\İconlar-Resimler\resim_412678063.gif", 8, 8, 108, 140)
Global $Label1 = GUICtrlCreateLabel("CRYSIS Sisteminize Yükleniyor, Lütfen Bekleyiniz...", 120, 40, 266, 19)
GUISetState(@SW_SHOW)

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, 10)
Sleep(1000) ;

FileCopy("kaynak","hedef")
GUICtrlSetData($Progress1, GUICtrlRead($Progress1) -10)
Sleep(1000) ;

Func _Exit()
	Exit
EndFunc

Kolay gelsin...

Link to comment
Share on other sites

Katılımsız bir kurulum yapacaksan ve tek bir yere kurulacaksa şöyle de yapabilirsin.Dirgetsize ile kurulmuş exe'nin boyutunu alırsın.Sonra run ile başlattıktan sonra 100 ms 'de bir kontrol ettirerek yüzdesini yazdırırsın.Eğer katılımsızsa yardımcı olacak bi örnek yazabilirim.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...