nightmare3519 Posted May 23, 2012 Share Posted May 23, 2012 Benim bu dragdropla bir sorunum vardı kodlar bu şekilde Buradaki kodu [spoiler][code]function CopyCallback (Source,Destination,Copied,Total) Progress.SetCurrentPos("Progress1", (Copied / Total) * 100); Label.SetText("Label1", String.SplitPath(Destination).Filename..""..String.SplitPath(Destination).Extension) Label.SetText("Label3", String.GetFormattedSize(Copied, FMTSIZE_MB, true)) Label.SetText("Label4", String.GetFormattedSize(Total, FMTSIZE_MB, true)) yuzde = Math.Floor((Copied / Total) * 100); Progress.SetText("Progress1", "%"..yuzde..""); end File.Copy("AutoPlay\\Docs\\AIDA 64.EXE", _DesktopFolder, true, true, false, true, CopyCallback); error = Application.GetLastError(); if error ~= 0 then Dialog.Message("Hata!", "Kopyalanma sırasında bir hata oluştu!", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end[/code][/spoiler] Buradakiyle Dialog açtırarak yaptırmasını istiyorum [spoiler][code]DragAndDrop.SetDataFormat(DataFormat.FileDrop); DragAndDrop.Start(Application.GetWndHandle()); nFile = DragAndDrop.GetDataObject(); for i,v in pairs(nFile) do if String.SplitPath(v).Extension == ".exe" then File.Copy(v, _SourceFolder.."\\AutoPlay\\Docs\\Programlar", true, true, false, true, CopyCallback); sys.init(); end end [/code][/spoiler] Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 23, 2012 Editor Share Posted May 23, 2012 Dialog açtırarak derken anlamadım oluşturdugun fonksiyonu drag droptamı kullanmak istiyorsun. Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted May 23, 2012 Author Share Posted May 23, 2012 [quote name='pairs' date='23 May 2012 - 10:43 ' timestamp='1337759038' post='1204034'] Dialog açtırarak derken anlamadım oluşturdugun fonksiyonu drag droptamı kullanmak istiyorsun. [/quote] Evet abi ben denedim ama fareyi hareket ettirince dialog açıldı Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 23, 2012 Editor Share Posted May 23, 2012 Dragdrop plugini proje üzerine bir nesne bırakınca çalışır sende sanırım proje üzerine atılan dosyaları bir yere kopyalatacaksın. Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted May 23, 2012 Author Share Posted May 23, 2012 Şİmdi abi amaç şu; Kullanıcı dosyayı tutup program üzerine getirecek Dosya kopyalanması Dialog içinde gösterilecek (program adı boyutu vs. Bu kod fonksiyonda var) İsteğim bu ama yapamadım ben sizden yardım istedim umarım yapabilirsiniz... Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 23, 2012 Editor Share Posted May 23, 2012 Tamamda bütün dosyaları aynı dizinemi kopyalayacak. Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 23, 2012 Editor Share Posted May 23, 2012 --####Global function###-- function CopyCallback (Source,Destination,Copied,Total) Progress.SetCurrentPos("Progress1", (Copied / Total) * 100); Label.SetText("Label1", String.SplitPath(Destination).Filename..""..String.SplitPath(Destination).Extension) Label.SetText("Label3", String.GetFormattedSize(Copied, FMTSIZE_MB, true)) Label.SetText("Label4", String.GetFormattedSize(Total, FMTSIZE_MB, true)) yuzde = Math.Floor((Copied / Total) * 100); Progress.SetText("Progress1", "%"..yuzde..""); end --#####################-- DragAndDrop.SetDataFormat(DataFormat.FileDrop); DragAndDrop.Start(Application.GetWndHandle()); nFile = DragAndDrop.GetDataObject(); for i,v in pairs(nFile) do if String.SplitPath(v).Extension == ".exe" then File.Copy(v,_SourceFolder.."\\AutoPlay\\Docs\\Programlar", true, true, false, true, CopyCallback); error = Application.GetLastError(); if error ~= 0 then Dialog.Message("Hata!", "Kopyalanma sırasında bir hata oluştu!", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end sys.init(); end end Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted May 23, 2012 Author Share Posted May 23, 2012 (edited) [quote name='pairs' date='23 May 2012 - 11:07 ' timestamp='1337760449' post='1204046'] --####Global function###-- function CopyCallback (Source,Destination,Copied,Total) Progress.SetCurrentPos("Progress1", (Copied / Total) * 100); Label.SetText("Label1", String.SplitPath(Destination).Filename..""..String.SplitPath(Destination).Extension) Label.SetText("Label3", String.GetFormattedSize(Copied, FMTSIZE_MB, true)) Label.SetText("Label4", String.GetFormattedSize(Total, FMTSIZE_MB, true)) yuzde = Math.Floor((Copied / Total) * 100); Progress.SetText("Progress1", "%"..yuzde..""); end --#####################-- DragAndDrop.SetDataFormat(DataFormat.FileDrop); DragAndDrop.Start(Application.GetWndHandle()); nFile = DragAndDrop.GetDataObject(); for i,v in pairs(nFile) do if String.SplitPath(v).Extension == ".exe" then File.Copy(v,_SourceFolder.."\\AutoPlay\\Docs\\Programlar", true, true, false, true, CopyCallback); error = Application.GetLastError(); if error ~= 0 then Dialog.Message("Hata!", "Kopyalanma sırasında bir hata oluştu!", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1); end sys.init(); end end [quote name='pairs' date='23 May 2012 - 11:05 ' timestamp='1337760328' post='1204044'] Tamamda bütün dosyaları aynı dizinemi kopyalayacak. [/quote] Evet dosyaları _SourceFolder.."\\AutoPlay\\Docs\\Programlar" dizinine kopyalayacak [/quote] Abi teşekkür edrim fakat dialog açtırmayı nasıl yapıcaz? Progress.SetCurrentPos("Progress1", (Copied / Total) * 100); Label.SetText("Label1", String.SplitPath(Destination).Filename..""..String.SplitPath(Destination).Extension) Label.SetText("Label3", String.GetFormattedSize(Copied, FMTSIZE_MB, true)) Label.SetText("Label4", String.GetFormattedSize(Total, FMTSIZE_MB, true)) yuzde = Math.Floor((Copied / Total) * 100); Progress.SetText("Progress1", "%"..yuzde..""); Bu koddaki objeler dialogda kopyalanırken bunların olmasını istiyorum mümkünmüdür? Edited May 23, 2012 by nightmare3519 Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 23, 2012 Editor Share Posted May 23, 2012 Onları dialogda gösteremezsin ama status dialog ile olabilir belki bir deneyip dönerim sana. Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted May 23, 2012 Author Share Posted May 23, 2012 Peki tamam abi Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 23, 2012 Editor Share Posted May 23, 2012 http://www.mediafire.com/download.php?2rsfu6ycocu42mv al dostum istediğini yaptım dialog ta gösteriyor. Quote Link to comment Share on other sites More sharing options...
HalilYanar Posted May 23, 2012 Share Posted May 23, 2012 Pairs saygısızlık etmek istemem ama link kırık. "[color="#FF0000"]Invalid or Deleted File.[/color]" Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted May 23, 2012 Editor Share Posted May 23, 2012 Drag Drop Olayı ekledim pencere üstüne bırakınca çalışması için o yüzden eskisini sildim. http://www.mediafire.com/download.php?r356oc3d05vpq5o 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.