Kral__ Posted January 19, 2012 Share Posted January 19, 2012 Üstadlarım Bir İdman Gibi Bir Program Yapmak İstiyorum Fakat Bir Sorunla Karşılaştım Lütfen Yardım Edin ~ Buton ~ [spoiler] [code] nSize = HTTP.GetFileSize(Kanal1(strURL), MODE_BINARY, 20, 80, nil, nil, nil); Image.SetSize("1indir", 44, 27); Image.SetSize("1yok", 0, 0); session = Download.Start(Application.GetWndHandle(), Kanal1(strURL), Kanal1(DestFile), "", "", "", nil, 0, "", ""); [/code] [/spoiler] ~ Global ~ [spoiler] [code] function Kanal1() ------ Sor Dialog.TimedMessage("Kral vVv İndirici", "Lütfen Linki Direk Link Olarak Veriniz Aksi Taktirde Dosya Bozuk Çıkacaktır.", 3000, MB_ICONINFORMATION); function Sor() link = Dialog.Input("Kral vVv İndirici", "Link:", "", MB_ICONNONE); uaznti = Dialog.Input("Kral vVv İndirici", "Kaydedilecek Dosyanın Uzantısı:", ".", MB_ICONNONE); end Sor() ------ İndirme session = 0; strURL = link DestFile = _DesktopFolder.."\\İndirilen Dosya"..uaznti function Download.OnProgress(tblData) if ( tblData ~= nil) then local strinfo = string.format("Hız : %d Kb/s",tblData.CurrentSpeed); Label.SetText("durum", strinfo); end end function Download.OnComplete(tblData) Download.Delete(tblData.Session); Paragraph.SetText("son", "İndirme Tamamlandı"); result = Dialog.Message("Kral vVv İndirici", "Dosya Masaüstüne [İndirilen Dosya] Adlı Olarak Kaydedilmiştir.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); Image.SetSize("1indir", 0, 0); Image.SetSize("1yok", 22, 13); end function Download.OnError(tblData) Download.Delete(tblData.Session); -- Important !! - do not forget to call this first Paragraph.SetText("son", "İndirmede Hata Oluştu"); Image.SetSize("1indir", 0, 0); Image.SetSize("1yok", 22, 13); end end [/code] [/spoiler] ~ Hata ~ [spoiler][img]http://e1201.hizliresim.com/t/m/1xg0d.png[/img][/spoiler] Quote Link to comment Share on other sites More sharing options...
ali::12 Posted January 19, 2012 Share Posted January 19, 2012 Çağırdığın kanal1 fonksiyonunda sıkıntı var global functions ta 46. satıra bak Quote Link to comment Share on other sites More sharing options...
blackman12 Posted January 19, 2012 Share Posted January 19, 2012 [code]function Kanal1() ------ Sor Dialog.TimedMessage("Kral vVv İndirici", "Lütfen Linki Direk Link Olarak Veriniz Aksi Taktirde Dosya Bozuk Çıkacaktır.", 3000, MB_ICONINFORMATION); function Sor()[/code] function içinde function var, inception mı bu evladım! Quote Link to comment Share on other sites More sharing options...
Kral__ Posted January 19, 2012 Author Share Posted January 19, 2012 "if" kullansam olurmu peki ? Quote Link to comment Share on other sites More sharing options...
galetis Posted January 19, 2012 Share Posted January 19, 2012 [code]function Sor() link = Dialog.Input("Kral vVv İndirici", "Link:", "", MB_ICONNONE); uaznti = Dialog.Input("Kral vVv İndirici", "Kaydedilecek Dosyanın Uzantısı:", ".", MB_ICONNONE); end function Kanal1() Dialog.TimedMessage("Kral vVv İndirici", "Lütfen Linki Direk Link Olarak Veriniz Aksi Taktirde Dosya Bozuk Çıkacaktır.", 3000, MB_ICONINFORMATION); Sor()[/code] yukarıdaki kodları aşağıdakine göre düzenle. Fonksiyon içine fonksiyonu ne düşünceyle soktun bilmiyorum. [code]function Sor() link = Dialog.Input("Kral vVv İndirici", "Link:", "", MB_ICONNONE); uaznti = Dialog.Input("Kral vVv İndirici", "Kaydedilecek Dosyanın Uzantısı:", ".", MB_ICONNONE); end function Kanal1() Dialog.TimedMessage("Kral vVv İndirici", "Lütfen Linki Direk Link Olarak Veriniz Aksi Taktirde Dosya Bozuk Çıkacaktır.", 3000, MB_ICONINFORMATION); Sor()[/code] Quote Link to comment Share on other sites More sharing options...
Kral__ Posted January 19, 2012 Author Share Posted January 19, 2012 neyse hocam gerek kalmadı ilginizden dolayı çok tşkler diliyorum 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.