Quantcast
Channel: Latest Questions by IWannaTaco
Viewing all articles
Browse latest Browse all 7

How to get text from input box and more in script

$
0
0
So I got a couple of questions here. First one is how can I make it to where the Inputbox text can be saved as a string in code/script (preferably C#). This is what i've tried so far with UserInput & Pass being called on the OnEditEnd() event of the inputbox's. and with UserName_Checked on the OnClick() of the button. Basically it downloads the page from the api and checks if they have an account set up. public void UserInput (string UserInput) { UserName = UserInput; } public void PassInput (string PassInput) { Password = PassInput; } public void UserName_Checked(string Lobby) { string ActiveCheck = "http://d************?u=" + UserName + "&p=" + Password + "&****"; WebRequest request = WebRequest.Create(ActiveCheck); request.Method = "GET"; WebResponse response = request.GetResponse(); Stream stream = response.GetResponseStream(); StreamReader reader = new StreamReader(stream); string Active = reader.ReadToEnd(); reader.Close(); response.Close(); if (Active == "accepted") { Application.LoadLevel(Lobby); } else if (Active == "wrong") { //Plan on doing a popup that says no user exists. } } Image of what Call event looks like ![alt text][1] [1]: http://i.gyazo.com/6895ba033daef7ff21347f92cbb1b2ca.png

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>