Jump to content

Fileınstall


mustafakara
 Share

Recommended Posts

sevgili arkadaşlar FileInstall komutu çalışırken progressbar ın
hareketini nasıl sağlayabiliriz
yani fileınstall komutu işini yaparken yüklediği dosyanın yüzdesini alark progres çubuğunda gösterecek aşağıda ben bi örnek yaptım ama progres birden bire doluyor


{code}

#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
Local $progressbar1,$button, $s, $msg, $m

GUICreate("My GUI Progressbar", 220, 100, 100, 200)
$progressbar1 = GUICtrlCreateProgress(10, 10, 200, 20)
GUICtrlSetColor(-1, 32250); not working with Windows XP Style

$button = GUICtrlCreateButton("Start", 75, 70, 70, 20)
GUISetState()

$s = "0"
Do
$msg = GUIGetMsg()
If $msg = $button Then
GUICtrlSetData($button, "Stop")
Do
Sleep(1)
$s = FileGetSize(@TempDir & "\m.spd")
Local $size = "118618996"
$s /= $size
$s *= "100"

GUICtrlSetData($progressbar1,$s)
FileInstall("m.spd",@TempDir & "\m.spd")
Until $s = 100

EndIf
Until $msg = $GUI_EVENT_CLOSE
EndFunc ;==>Example


{/code}
Link to comment
Share on other sites

@mustafakara

FileInstall komutu yürütülürken alt satırlara geçilmez.
Kısaca fileinstall satırıyla işlem bitmeden alt satırlara geçilmez veyahut döngü devam etmez (durur)

Sen tek bir dosya için mi progress yapmak itiyorsun? Birden fazla dosya için progresi ilerletebilirsin.

Link to comment
Share on other sites

@mustafakara

Malesef fileinstall komutunda tek bir dosyayı çıkartırken progresi ilerletmek mümkün deyil.
Fileinstall komutu işletildiğinde, bildiğim kdarıyla önce diskte dosyanın boyutu kadar boş bir dosya oluşturup içine yazar.
Bu yüzden fileinstall komutuyla mümkün olmuyor.

Lakin autoit bu konularda geniş bir yelpazeye sahip. Farklı udf veyahut pluginler ile bu söylediğin büyük ihtimal yapılabilir.
Tabi benim böyle bir şeye daha önce ihtiyacım olmadığı için herangi bir bilgim yok. Autoit forumlarını araştırmak lazım...

Birden fazla dosya için ise her fileinstall satırından sonra progresi ilerletebilirsin.
Neyse başarılar dilerim, klay gelisn...

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...