kimtakar Posted January 2, 2014 Share Posted January 2, 2014 ams ile usb belleğimi daha kullanışlı yapabilmek adına bikaç projem oldu(http://www.tnctr.com/topic/233270-ebed-amiralv11-gelithtirme/) fakat geliştirmede yeterli ilgiyi göremedim, uzun lafın kısası yine benzer bi proje ile yardımınıza ihtiyacım var sorunlar: 1- ini dosyasına kaydettiğim dosya yolu, örnek= "C://Resimler/avatar/image.png" şeklinde oluyor ancak uygulamayı usb bellek ile beraber taşıyacağımdan başka bir pc de bu ini dosyası bir işe yaramıyor, yapmak isteğim ini dosyasına katdediceğim dosya yolu "Resimler/avatar/image.png" şeklinde olması. bunu halledersek büyük bi kısmı bitmiş olucak, ilgilenicek üsdat ve arkadaşlara şimdiden teşekkürler... link: http://yadi.sk/d/muYS2AjTFMyaf kullanıcı adı: admin şifre: 12345 Quote Link to comment Share on other sites More sharing options...
ugur4721 Posted January 2, 2014 Share Posted January 2, 2014 dosyayı C:\Users\"Kullanıcı ismi"\AppData\Local\Temp yolunda çalıştırabilirseniz buna göre kod %temp% örneğin: %temp%Resimler/avatar/image.png Quote Link to comment Share on other sites More sharing options...
xarax Posted January 2, 2014 Share Posted January 2, 2014 INI'ye kaydedeceğin dosya yollarındaki dosyalar bellek içinde olmayacak mı? Kaydederken "/Resimler/avatar/image.png" şeklinde kaydet sadece C: kısmı değişeceğinden INIden çağırdığın veriyi şu şekle getirip kullan. _SourceFolder..INIFile.GetValue(...) Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted January 2, 2014 Share Posted January 2, 2014 result = Shell.GetFolder(SHF_MYPICTURES); Koduyla alabilirsiniz Resimlerim yolunu. Quote Link to comment Share on other sites More sharing options...
xarax Posted January 2, 2014 Share Posted January 2, 2014 (edited) result = Shell.GetFolder(SHF_MYPICTURES); Koduyla alabilirsiniz Resimlerim yolunu. iniden çağıracağı dosya yollarındaki dosyalar her PC de olmayacağından bu işe yaramaz. Projeyi yeni açıp baktım; Projede Ayarlar sayfasındaki avatar resmindeki aşağıdaki ilgili kodlarda şu değişikliği yap. INI'ye sadece dosya adı ve uzantısını yazdırır. sFilepath = String.SplitPath(nSecilen[1]) INIFile.SetValue("AutoPlay\\Docs\\data.ini", "avatar", "1", sFilepath.Filename..sFilepath.Extension) Geri çekerken de şu şekilde çekersin. _SourceFolder.."\\Resimler\\avatar\\"..INIFile.GetValue("AutoPlay\\Docs\\data.ini", "avatar", "1") Edited January 2, 2014 by xarax Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 deneyip sonucu yazıcam Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 """""""""""""""""""""" tDosya = Dialog.FileBrowse(true, "Avatar Seçin", _DesktopFolder, "Tüm Dosyalar (*.*)|*.*|", "", "", true, true) if tDosya[1] ~= "CANCEL" then for i,v in pairs(tDosya) do StatusDlg.Show() File.Copy(v, _SourceFolder .. "\\Resimler\\avatar\\" .. String.SplitPath(v).Filename .. String.SplitPath(v).Extension, false, true, false, true, nil) StatusDlg.Hide() end sFilepath = String.SplitPath(nSecilen[1]) if nSecilen[1] ~= "CANCEL" then INIFile.SetValue("AutoPlay\\Docs\\data.ini", "avatar", "1", sFilepath.Filename..sFilepath.Extension) end end """""""""""""""""""""" basit bi hata yapıyorum ama nerde çözemedim Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted January 2, 2014 Share Posted January 2, 2014 Avatarı tek mi yoksa çoklu mu seçeceksiniz? Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 tek olucak dosyayı C:\Users\"Kullanıcı ismi"\AppData\Local\Temp yolunda çalıştırabilirseniz buna göre kod %temp% örneğin: %temp%Resimler/avatar/image.png uygulama usb üzerinde çalışıcak, temp dosyasına açmıcak yani, ilgin için eyvallah Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted January 2, 2014 Share Posted January 2, 2014 O zaman for döngüsüne sokmanıza gerek yok. tDosya = Dialog.FileBrowse(true, "Avatar Seçin", _DesktopFolder, "Tüm Dosyalar (*.*)|*.*|", "", "", false, true) if tDosya[1] ~= "CANCEL" then StatusDlg.Show() File.Copy(tDosya[1], _SourceFolder .. "\\Resimler\\avatar\\" .. String.SplitPath(v).Filename .. String.SplitPath(v).Extension, false, true, false, true, nil) StatusDlg.Hide() end Yazmanız yeterli. Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 O zaman for döngüsüne sokmanıza gerek yok. tDosya = Dialog.FileBrowse(true, "Avatar Seçin", _DesktopFolder, "Tüm Dosyalar (*.*)|*.*|", "", "", false, true) if tDosya[1] ~= "CANCEL" then StatusDlg.Show() File.Copy(tDosya[1], _SourceFolder .. "\\Resimler\\avatar\\" .. String.SplitPath(v).Filename .. String.SplitPath(v).Extension, false, true, false, true, nil) StatusDlg.Hide() end Yazmanız yeterli. hata verdi üsdat 4de takıldı Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted January 2, 2014 Share Posted January 2, 2014 tDosya = Dialog.FileBrowse(true, "Avatar Seçin", _DesktopFolder, "Tüm Dosyalar (*.*)|*.*|", "", "", false, true) if tDosya[1] ~= "CANCEL" then StatusDlg.Show() File.Copy(tDosya[1], _SourceFolder .. "\\Resimler\\avatar\\" .. String.SplitPath(tDosya[1]).Filename .. String.SplitPath(tDosya[1]).Extension, false, true, false, true, nil) StatusDlg.Hide() end Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 tDosya = Dialog.FileBrowse(true, "Avatar Seçin", _DesktopFolder, "Tüm Dosyalar (*.*)|*.*|", "", "", false, true) if tDosya[1] ~= "CANCEL" then StatusDlg.Show() File.Copy(tDosya[1], _SourceFolder .. "\\Resimler\\avatar\\" .. String.SplitPath(tDosya[1]).Filename .. String.SplitPath(tDosya[1]).Extension, false, true, false, true, nil) StatusDlg.Hide() end usta hata yok ancak bir sorun daha olucak, diceksinki "çok oldun!" ama bunu nasıl göstericem? Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted January 2, 2014 Share Posted January 2, 2014 Olurmu öyle şey bilmemek değil öğrenmemek ayıp. Göstermek derken kastetmek istediğinizi anlamadım? Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 yani (image.load) şeklinde olucak tam olarak nasıl anlatılır onuda bilemedim Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted January 2, 2014 Share Posted January 2, 2014 İster böyle; Image.Load("Image1",_SourceFolder .. "\\Resimler\\avatar\\" .. String.SplitPath(tDosya[1]).Filename .. String.SplitPath(tDosya[1]).Extension) İster böyle yapabilirsiniz Image.Load("Image1",tDosya[1]) Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 İster böyle; Image.Load("Image1",_SourceFolder .. "\\Resimler\\avatar\\" .. String.SplitPath(tDosya[1]).Filename .. String.SplitPath(tDosya[1]).Extension) İster böyle yapabilirsiniz Image.Load("Image1",tDosya[1]) göstermedi, ancak şöyle bir ayrıntı var, resmi farklı page de göstermem gerekiyo Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted January 2, 2014 Share Posted January 2, 2014 O zaman global bir değişken kullanmalısınız. Dosya yolunu değişkene atayıp sayfaya geçtiğinizde değişkeni çağıracaksınız. Quote Link to comment Share on other sites More sharing options...
kimtakar Posted January 2, 2014 Author Share Posted January 2, 2014 daha sade bi yapım şekli olmuyomu? k. bakma senide yoruyorum 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.