PColik Posted February 28, 2020 Share Posted February 28, 2020 Arkadaşlar merhaba, Input'ın OnKey kısmına aşağıdaki kodu yazdım: if e_key ~= (48 or 49 or 50 or 51 or 52 or 53 or 54 or 55 or 56 or 57) then Dialog.Message("",""); end Dialog.Message kısmını konuyu basitleştirmek için ekledim. Sorunu çözersem oraya kodlarımı ekleyeceğim. Ben Input'a sadece 0,1,2,3,4,5,6,7,8,9 harici birşey girilirse kodumun çalışmasını istiyorum. Yukarıda ki kodda or yerine and operatörü de kullandım fakat ikisi de olmadı. Bunu sorunu nasıl çözebilirim? Quote Link to comment Share on other sites More sharing options...
Xerkan Posted February 29, 2020 Share Posted February 29, 2020 if (e_Key < 48 or e_Key > 57) then Dialog.Message("","Sadece rakam girebilirsin"); end Bu kodu deneyebilirsin 1 Quote Link to comment Share on other sites More sharing options...
PColik Posted March 1, 2020 Author Share Posted March 1, 2020 Xerkan, 23 saat önce yazdı: if (e_Key < 48 or e_Key > 57) then Dialog.Message("","Sadece rakam girebilirsin"); end Bu kodu deneyebilirsin Bu kod çalıştı, çok teşekkür ederim kardeşim. Fakat uyarıyı verdikten sonra harf input a giriliyor. Bu son girilen harfi sildirmemin bir yolu var mı? Quote Link to comment Share on other sites More sharing options...
Dark_Angel Posted March 1, 2020 Share Posted March 1, 2020 (edited) PColik, 1 saat önce yazdı: Bu kod çalıştı, çok teşekkür ederim kardeşim. Fakat uyarıyı verdikten sonra harf input a giriliyor. Bu son girilen harfi sildirmemin bir yolu var mı? if (e_Key < 48 or e_Key > 57) then Input.SetText(this, ""); Dialog.Message("Hata", "Sadece rakam girebilirsin"); end Edited March 1, 2020 by Dark_Angel 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.