gece_sisi Posted July 30, 2010 Share Posted July 30, 2010 Merhabalar herkese iyi çalışmalar.Bir konu hakkında bilginize ihtiyacım var. AMS ile bir reg kaydı eklemek istiyorum.Örnek şu olsun: [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main] "Window Title"="TNCTR.com" Bu reg kaydını bir checkbox ile tıklayarak ekliyeceğim.Buraya kadar bir sorun yok. Fakat şöyle bir şey yapmalıyım : Reg kaydının keyindeki TNCTR.com ibaresini elle girmeliyim.Bunuda şöyle düşünüyorum : Checkbox'altına aktif olmayan içinde Buraya yazınız diye kelime bulunan bir input koyacagım.Checkbox'a tıkladıgımda input aktif olacak ve el ile istediğim değeri gireceğim. Sonrada normal AİO lardaki gibi bir butonla şeçili checkbox'ları kuracağım. Sorunum bu regi elle girmeyi nasıl yapabilirim?Bu konuda yardımcı olacak arkadaşlara şimdiden teşekür eder ve iyi çalışmalar dilerim.. Link to comment Share on other sites More sharing options...
KintaRo Posted July 30, 2010 Share Posted July 30, 2010 Aşağıdaki kod, önce checkboxın seçili olup olmadığına bakar eğer seçilirse Soru penceresi çıkar ve değeri girmenizi ister, daha sonra eğer iptal tuşuna basılmamışsa değeri regedite girer. bChecked = CheckBox.GetChecked(this) -- checkboxın seçili olup olmadığına bak if bChecked then -- eğer seçilirse sSoru = Dialog.Input("Giriş", "Lütfen değeri giriniz", "", MB_ICONQUESTION) -- soru penceresini goster if sSoru ~= "CANCEL" then -- eğer iptale basılmamışsa Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Internet Explorer\\Main", "Window Title", sSoru, REG_SZ) -- girilen iletiyi regedite yaz end end 2. alternatif ise checkbox seçili ise inputu gosterir, daha sonra inputa istediğiniz değeri yazıp entera basınca değeri regedite girer ve input gizlenir; Checbox On Click evresi: bChecked = CheckBox.GetChecked(this) -- checkboxın seçili olup olmadığına bak if bChecked then -- eğer seçilirse Input.SetVisible("Input1") -- inputu goster end Input On Key evresi: if e_Key == 13 then -- eğer entera basilirsa sMetin = Input.GetText(this) -- inputtaki metni al if sMetin ~= "" then -- eğert metin boş değilse Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Internet Explorer\\Main", "Window Title", sMetin, REG_SZ) -- inputtaki metni regedite gir Input.SetVisible(this, false) -- inputu gizle end end Not: örnek dosya aşağıdadır, ams 7.5 ile yapılmıştır ki hem 7 de hem 8 de açabilesiniz. Link to comment Share on other sites More sharing options...
gece_sisi Posted July 30, 2010 Author Share Posted July 30, 2010 KintaRo arkadaşım cevabınız için çok teşekür ederim.Kodları inceleyip ve deneyip sonucu yazacagım.Teşekür eder ve hayırlı geceler dilerim. Link to comment Share on other sites More sharing options...
gece_sisi Posted August 5, 2010 Author Share Posted August 5, 2010 KintaRo arkadaşım,verdiğin kodlar ve örnek uygulama güzel olmuş.Alternatif eklemende beni bilgilendirmiş oldu. Eline sağlık çok teşekür ederim.Anca vakit buluyorum incelemek için.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.