WolfmanTR_ Posted November 9, 2012 Share Posted November 9, 2012 arkadaşlar, şimdi bir .exe şeçilecek, bunu seçince .ini ye kaydedecek. buraya kadar sorun yok. ama 2. tık ta seçilen .exe yi .ini den(kaydedilen yoldan) okuyacak ve açacak . ben bu açma işlemini yapamadım [CODE] if nSayi == 1 then nSayi=0 nDosya = INIPlus.ValueDoesExist("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu"); if nDosya == false then nSecilen = Dialog.FileBrowse(true, "Driver Pack Seçiniz", _DesktopFolder, "Exe Files (*.exe)|*.exe|", "", "dat", false, false); if nSecilen[1] ~= "CANCEL" then INIFile.SetValue("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu", nSecilen[1]) end elseif nDosya == true then elseif nSayi==0 then nYol = INIFile.GetValue("AutoPlay\\Docs\\dps.ini","DriverPack","Dosyayolu") Shell.Execute(nYol, "open", "", "", SW_SHOWNORMAL, false); end end [/CODE] Quote Link to comment Share on other sites More sharing options...
KintaRo Posted November 10, 2012 Share Posted November 10, 2012 Global Functions: [code]nSecim = 0;[/code] xButton On Click: [code]if nSecim == 0 then sDosya = INIFile.GetValue("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu"); if sDosya == "" then nSecilen = Dialog.FileBrowse(true, "Driver Pack Seçiniz", _DesktopFolder, "Exe Files (*.exe)|*.exe|", "", "dat", false, false); if nSecilen[1] ~= "CANCEL" then INIFile.SetValue("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu", nSecilen[1]) end end nSecim = 1 xButton.SetText(this, "Çalıştır") else nYol = INIFile.GetValue("AutoPlay\\Docs\\dps.ini","DriverPack","Dosyayolu") Shell.Execute(nYol, "open", "", "", SW_SHOWNORMAL, false); nSecim = 0; xButton.SetText(this, "Seç") end[/code] Quote Link to comment Share on other sites More sharing options...
kaan_karabey Posted December 24, 2013 Share Posted December 24, 2013 ben burdakini değiştirmek istiyorum ama yapamadım nasıl bir kod ekleyecem ki şu şekilde olacak: her program açıldığında 1 kere tıklıyorum açmıyor ikinci tıkladığımda açıyor ben bir kere kaydettiğimde hep onu hafızasında tutmasını istiyorum bunun için veri tabanı mı gerekiyor?????? Quote Link to comment Share on other sites More sharing options...
kaan_karabey Posted January 4, 2014 Share Posted January 4, 2014 (edited) Global Functions: nSecim = 0; xButton On Click: if nSecim == 0 then sDosya = INIFile.GetValue("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu"); if sDosya == "" then nSecilen = Dialog.FileBrowse(true, "Driver Pack Seçiniz", _DesktopFolder, "Exe Files (*.exe)|*.exe|", "", "dat", false, false); if nSecilen[1] ~= "CANCEL" then INIFile.SetValue("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu", nSecilen[1]) end end nSecim = 1 xButton.SetText(this, "Çalıştır") else nYol = INIFile.GetValue("AutoPlay\\Docs\\dps.ini","DriverPack","Dosyayolu") Shell.Execute(nYol, "open", "", "", SW_SHOWNORMAL, false); nSecim = 0; xButton.SetText(this, "Seç") end ben burdaki kodu normal buton için yazdım xButton yazan yere Button yazdım ama programı çalıştırdığımda program sonlandırıldı diyor http://www.tnctr.com/topic/213743-treelist-ile-ao-rnei/ Burdaki Programın içine yazıyorum bu kodları ama sonlandırıyor yani yazdığım kodlar Global Functions: nSecim = 0; Button Kodu: if nSecim == 0 then sDosya = INIFile.GetValue("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu"); if sDosya == "" then nSecilen = Dialog.FileBrowse(true, "Driver Pack Seçiniz", _DesktopFolder, "Exe Files (*.exe)|*.exe|", "", "dat", false, false); if nSecilen[1] ~= "CANCEL" then INIFile.SetValue("AutoPlay\\Docs\\dps.ini", "DriverPack", "Dosyayolu", nSecilen[1]) end end nSecim = 1 Button.SetText(this, "Çalıştır") else nYol = INIFile.GetValue("AutoPlay\\Docs\\dps.ini","DriverPack","Dosyayolu") Shell.Execute(nYol, "open", "", "", SW_SHOWNORMAL, false); nSecim = 0; Button.SetText(this, "Seç") end nerde yanlışlık yapıyorum da programı sonlandırıyor Edited January 4, 2014 by kaan_karabey Quote Link to comment Share on other sites More sharing options...
kaan_karabey Posted January 9, 2014 Share Posted January 9, 2014 arkadaşlar 1 kere tıkladığımda açılmasını nasıl sağlarım yardımcı olurmusunuz???? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted January 9, 2014 Share Posted January 9, 2014 ilk seferde yolu kaydeder, daha sonraki tıklamalarda direk kaydedilen dosyayı açar. sYol = INIFile.GetValue(_SourceFolder .. "\\AutoPlay\\Docs\\data.ini", "genel", "yol"); if sYol == "" then tDosya = Dialog.FileBrowse(true, "Dosya Seçin", _DesktopFolder, "Tüm Dosyalar (*.*)|*.*|", "", "", false, true); if tDosya[1] ~= "CANCEL" then INIFile.SetValue(_SourceFolder .. "\\AutoPlay\\Docs\\data.ini", "genel", "yol", tDosya[1]); end else sKlasor = String.SplitPath(sYol).Drive .. String.SplitPath(sYol).Folder; File.Run(sYol, "", sKlasor, SW_SHOWNORMAL, false); end 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.