Jump to content

Download Kod İsteği


Kral__
 Share

Recommended Posts

Ü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]
Link to comment
Share on other sites

[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]

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...