korasoglu Posted April 3, 2014 Share Posted April 3, 2014 Arkadaşlar ListBoxExte Check yapılma olayını çözemedim yardimcı olursanız sevinirim seçilirse şu işlem seçilmezse şu işlem gibi kullandığım kodlar sec = ListBoxEx.GetCheckedItems("Plugin1"); if (sec ~= nil) then Dialog.Message("Notice", "Seçilen Index : "..sec[1], MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); INIFile.SetValue(_DesktopFolder.."\\aa.ini", sec[1], "1", "text"); end İlk seçimimde doğru sayıyı veriyor diğer tıklarda sonuç hep aynı oluyor. Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted April 3, 2014 Editor Share Posted April 3, 2014 ListBoxEx in oncheckbox kısmından bu kodlarla kullanabilirsiniz. if e_Checked then Dialog.Message("",e_Index); end Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 3, 2014 Author Share Posted April 3, 2014 Tamamdır Pairs çaalışyor teşekkür ederim Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted April 3, 2014 Editor Share Posted April 3, 2014 Ben olayı yanlış anlamışım :D Siz seçilenleri listelemek istemişsiniz sanırım. result = ListBoxEx.GetCheckedItems("Plugin1"); for i,v in pairs(result) do local sText = ListBoxEx.GetItemText("Plugin1", v, true); Dialog.Message("",sText); end bu şekilde seçilenleri listeleyebilirsiniz. Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 3, 2014 Author Share Posted April 3, 2014 (edited) Doğru anlamışın ben seçilirse yazmasını iptal edilirse silmesini istiyorum Peki Neresi yanlış bu kodun Birde local eklemenin anlamı nedir sec = ListBoxEx.GetCheckedItems("Plugin1"); if (sec == true) then INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "1", text); INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "2", link); Dialog.Message("Notice", "Seçildi", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else INIFile.DeleteSection(_DesktopFolder.."\\aa.ini", e_Index); Dialog.Message("Notice", "İptal", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end Edited April 3, 2014 by korasoglu Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted April 3, 2014 Editor Share Posted April 3, 2014 Abi anlamadığım şu şimdi sen seçiceskin ve bi butona basınca seçilileri ekleyecek seçili olmayanları silecekmi yoksa sen listboxdan seçtikçe varsa ekleyecek seçmediysende silecekmi. Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 3, 2014 Author Share Posted April 3, 2014 (edited) hayır seçecem iniye yezacak seçimi iptal edince silecek buton filan yok aşağıdaki gibi Duzeltme: text değişkeni itemin texti sorun yok alıyor link değişkeni itemin datası ondada sorun yok alıyor seçildimi itemin texttini text değişkenine yükleyip yazacak itemindatasını link değişkenine yükleyip yazacak iptal edersede yazdıklarını silecek sec = ListBoxEx.GetCheckedItems("Plugin1"); if (sec == true) then INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "1", text); INIFile.SetValue(_DesktopFolder.."\\aa.ini", e_Index, "2", link); Dialog.Message("Notice", "Seçildi", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); else INIFile.DeleteSection(_DesktopFolder.."\\aa.ini", e_Index); Dialog.Message("Notice", "İptal", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end Edited April 3, 2014 by korasoglu Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 3, 2014 Author Share Posted April 3, 2014 Sevgili Pairs bana sadece mesaj olarak seçildim seçilmedim desin yeter Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted April 3, 2014 Editor Share Posted April 3, 2014 O zaman on Checkbox kısmında if e_Checked then seçildim else seçilmedim end Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 3, 2014 Author Share Posted April 3, 2014 Yani bukadar kolaymışta bende uğraşıyorum plugini bilmeyince çok büyük sorun oluyor tşk ederim Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 4, 2014 Author Share Posted April 4, 2014 butonla seçilen itemi tersine nasıl çevirebiliriz ama hepsini değil sadece seçileni Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted April 4, 2014 Editor Share Posted April 4, 2014 local sSelected = ListBoxEx.GetSelectedItem("Plugin1"); ListBoxEx.SetItemCheck("Plugin1", sSelected, false, true); Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 4, 2014 Author Share Posted April 4, 2014 Pairs olmadı yapamadım elseif secim == 300 then local sSelected = ListBoxEx.GetSelectedItem("Plugin1"); ListBoxEx.SetItemCheck("Plugin1", sSelected,false, false); end Bu sekilde table menude seçimi iptal etmedi ama buton da deneyince yapıyor gözden kaçan ne anlamadım Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted April 4, 2014 Editor Share Posted April 4, 2014 table menü deki ID ler eşleşmiyor olabilir. Quote Link to comment Share on other sites More sharing options...
korasoglu Posted April 4, 2014 Author Share Posted April 4, 2014 ListBoxEx -------------- if e_Checked then text = INIFile.GetValue(_TempFolder .."\\_Listem.ini", "Liste", e_Index); link = ListBoxEx.GetItemData("Plugin1", e_Index) menu() if sonuc ~= 1 then Dialog.Message("Notice", "İndirme Türünü Seçmediniz", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); menu() end nasil = File.DoesExist(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini"); if nasil == true then toplam=toplam+1 INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "isim", text); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "id", link); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "icon", _SourceFolder.."\\MP3\\Download\\Indir\\Beklemede.png"); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "tur", tur); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "durum", "Beklemede"); else toplam=0 toplam=toplam+1 INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "isim", text); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "id", link); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "icon", _SourceFolder.."\\MP3\\Download\\Indir\\Beklemede.png"); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "tur", tur); INIFile.SetValue(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam, "durum", "Beklemede"); --Shell.Execute(_SourceFolder.."\\Isa Avci\\Download\\Indir.exe", "open", "", "", SW_SHOWNORMAL, false); end else INIFile.DeleteSection(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam); toplam=toplam-1 end -------------- Global ------------ function menu() tblMenu = {}; tblMenu[1] ={}; tblMenu[1].Text = "Mp3 İndir"; tblMenu[1].ID = 100; tblMenu[1].IconID = 1; tblMenu[1].Checked = false; tblMenu[1].Enabled = true; tblMenu[2] ={}; tblMenu[2].Text = "İptal"; tblMenu[2].ID = 200; tblMenu[2].IconID = 2; tblMenu[2].Checked = false; tblMenu[2].Enabled = true; konum = System.GetMousePosition(true, Application.GetWndHandle()); islem = Application.ShowPopupMenu(konum.X, konum.Y, tblMenu, TPM_LEFTALIGN, TPM_TOPALIGN, true, true); if islem == 100 then sonuc=1 tur = "Mp3" elseif islem == 200 then local sSelected = ListBoxEx.GetSelectedItem("Plugin1"); ListBoxEx.SetItemCheck("Plugin1", sSelected, true, false); INIFile.DeleteSection(_SourceFolder.."\\MP3\\Download\\Indir\\Indir.ini", toplam); toplam=toplam-1 end 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.