Bitmap Posted August 27, 2011 Share Posted August 27, 2011 (edited) Herkese Günaydın.. Sabah Sabah kafama takılan bir soru ile karşınızdayım.. Ams ile Birlikte aç Mümkün mü? En basitinden bir bir örnek vereyim notepad... yani txt dosyasını exenin üstüne sürüklediğimzde yada birlikte aç tan programı seçtiğimizde txt dosyasındaki yazı inputa yazılabiliri mi? yazılabilirse. bir kod yada parametre örneği verebilirmisiniz?.. Saygılarımla..İyi günler.. edit : aşağıdaki kod ile yapabilirsiniz... [code]if _CommandLineArgs then sOku = TextFile.ReadToString(_CommandLineArgs[1]); Input.SetText("Input1", sOku); end[/code] Edited August 27, 2011 by byvistakazim Quote Link to comment Share on other sites More sharing options...
nano68 Posted August 27, 2011 Share Posted August 27, 2011 Hocam Kintaro abimiz öyle bişi yapmıştı bi şuna bak istersen ama bi reg kaydı gerekiyor:(bu müzik çalar sen uyarlayabilirsin heralde) http://www.tnctr.com/topic/138127-muzik-calar/page__st__40 Quote Link to comment Share on other sites More sharing options...
Bitmap Posted August 27, 2011 Author Share Posted August 27, 2011 (edited) [quote name='nano68' date='27 August 2011 - 08:46 ' timestamp='1314423973' post='1070551'] Hocam Kintaro abimiz öyle bişi yapmıştı bi şuna bak istersen ama bi reg kaydı gerekiyor:(bu müzik çalar sen uyarlayabilirsin heralde) http://www.tnctr.com/topic/138127-muzik-calar/page__st__40 [/quote] uyarlarımda tamotomatik.org açılmıyor... Edited August 27, 2011 by byvistakazim Quote Link to comment Share on other sites More sharing options...
nano68 Posted August 27, 2011 Share Posted August 27, 2011 (edited) [quote name='byvistakazim' date='27 August 2011 - 05:49 ' timestamp='1314424159' post='1070552'] uyarlarımda tamotomatik.org açılmıyor... [/quote] Hocam ben bunu kastediyorum: [code]Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\[color="#FF0000"].tx[/color]t] @="[color="#FF0000"]MMPlayer[/color]" [HKEY_CLASSES_ROOT\[color="#FF0000"].txt[/color]\shell] [HKEY_CLASSES_ROOT\[color="#FF0000"].txt[/color]\shell\open] [HKEY_CLASSES_ROOT\[color="#FF0000"].txt[/color]\shell\open\command] @="[color="#FF0000"]C:\Program Files\Makromedia\MMPlayer\MMPlayer.exe[/color] %1" [HKEY_CLASSES_ROOT\.txt\DefaultIcon] @="[color="#FF0000"]C:\Program Files\Makromedia\MMPlayer\icon.ico[/color],0"[/code] Edited August 27, 2011 by nano68 Quote Link to comment Share on other sites More sharing options...
Bitmap Posted August 27, 2011 Author Share Posted August 27, 2011 (edited) [quote name='nano68' date='27 August 2011 - 08:56 ' timestamp='1314424616' post='1070553'] Hocam ben bunu kastediyorum: [code]Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.mp3] @="MMPlayer" [HKEY_CLASSES_ROOT\.mp3\shell] [HKEY_CLASSES_ROOT\.mp3\shell\open] [HKEY_CLASSES_ROOT\.mp3\shell\open\command] @="C:\Program Files\Makromedia\MMPlayer\MMPlayer.exe %1" [HKEY_CLASSES_ROOT\.mp3\DefaultIcon] @="C:\Program Files\Makromedia\MMPlayer\icon.ico,0"[/code] [/quote] benim sorunum bu değilki... ben bunu yapsam bile txt ye çift tıkladığıda program açılıyor sadece txt yüklenmiyor... benim sorunum bu.. regedit verilerini zaten biliyorum.. Edited August 27, 2011 by byvistakazim Quote Link to comment Share on other sites More sharing options...
nano68 Posted August 27, 2011 Share Posted August 27, 2011 [quote name='byvistakazim' date='27 August 2011 - 05:58 ' timestamp='1314424735' post='1070555'] benim sorunum bu değilki... ben bunu yapsam bile txt ye çift tıkladığıda program açılıyor sadece txt yüklenmiyor... benim sorunum bu.. regedit verilerini zaten biliyorum.. [/quote] Hocam bu olurmu uyarlasan: [codebox]for i,v in pairs(_CommandLineArgs) do if String.SplitPath(v).Extension == ".mp3" then ListBox.AddItem("ListBox1", String.SplitPath(v).Filename, v) end end[/codebox] Quote Link to comment Share on other sites More sharing options...
KintaRo Posted August 27, 2011 Share Posted August 27, 2011 [kh]EVET BU KONU PAGE ON SHOW EVRESİNE EKLERSENİZ KAZIMIN DEDİĞİ GİBİ OLUR.[/kh] Quote Link to comment Share on other sites More sharing options...
Bitmap Posted August 27, 2011 Author Share Posted August 27, 2011 (edited) Bilgisayarı kapatmadan öncelikle nano68 e fonksiyonu bulduğu için.. kintaro abiye de mp3 player projesini hazırladığı için teşekkür ediyorum.. [code]for i,v in pairs(_CommandLineArgs) do sOku = TextFile.ReadToString(v); Input.SetText("Input1", sOku); end[/code] yazdığım kodu sadeleştirdim örnek olarak vereyim... belki birinin işine yarar.. Edited August 27, 2011 by byvistakazim Quote Link to comment Share on other sites More sharing options...
KintaRo Posted August 27, 2011 Share Posted August 27, 2011 kodu sadeleştirmişsin ama bir problem var. gelen verileri döngüye soktuğun için input nesnesine en son nesneyi yazdırır. Eğer çoklu dosya sürükle bırak yaptığınızda sadece ilk dosyayı almak istiyorsanız [code]Input.SetText("Input1", _CommandLineArgs[1]);[/code] yazmanız yeterli. Quote Link to comment Share on other sites More sharing options...
Bitmap Posted August 27, 2011 Author Share Posted August 27, 2011 (edited) Kintaro abi ; [code]Input.SetText("Input1", _CommandLineArgs[1]);[/code] şeklinde yazdığımızda dosya yolunu ekliyor inputa. [code]if _CommandLineArgs = "" then sOku = TextFile.ReadToString(_CommandLineArgs[1]); Input.SetText("Input1", sOku); end[/code] yazarsak çalışıyor .. kopyalama sepeti gibi birşey yaptımda.. o nedenle for döngüsü kullandım. seçilen dosyaları listboxa yüklemek için.. direkt evden çıkmam gerektiği için incelemeden yazdım... demekki hata yapmışım.? Edited September 10, 2011 by byvistakazim Quote Link to comment Share on other sites More sharing options...
MostWanted Posted August 27, 2011 Share Posted August 27, 2011 Split ile uzantısını .txt olup olmadığına da bak.Birisi üstüne sürükleyip bırakırsa mp3 dosyasını falan okumaya çalışır.Hata verebilir, çökebilir vs. Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted September 10, 2011 Share Posted September 10, 2011 [b]Ben niye yapamadım ya. byvistakazım'ın verdiği kodları on show evresine yazınca, programı normal açtığımda hata veriyor. Ayrıca nano68'in verdiği regedit ayarları da yetersiz galiba. İlişkilendirmeyi tam olarak kuramıyor.[/b] Quote Link to comment Share on other sites More sharing options...
Bitmap Posted September 10, 2011 Author Share Posted September 10, 2011 [b][color="#8B0000"]Page On Show Event :[/color][/b] [code] if _CommandLineArgs[1] ~= nil and _CommandLineArgs[1] ~="" then sOku = TextFile.ReadToString(_CommandLineArgs[1]); Input.SetText("Input1", sOku); end [/code] Bu kodu çalışıyor.. Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted September 10, 2011 Share Posted September 10, 2011 [b]Evet, Şimdi Sorun Çözüldü [/b] 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.