i have an input where a user enters their LAN ip, then I want to display on another page the result they entered in the input. I want the ip entered from my input field to be displayed on the page, (without a popup) just to print the ip address to the page, how do I accomplish that?
Announcement
Collapse
No announcement yet.
copy/paste results from input
Collapse
X
-
Hi, jackbeans
A way to do this is perhaps to use the registry.
Registry.SetValue in the input field and Registry.GetValue to retrieve the value on the others Pages.
Ip_Lan = Input.GetText("Input1");
if (Ip_Lan == "" or String.Replace(Ip_Lan, " ", "", false) == "") then -- to avoid empty field
-- any action, Dialog etc...
else
Registry.SetValue(HKEY_LOCAL_MACHINE, "Software\\YourApp", "Name_of_the_key", "Ip_Lan", REG_SZ);
end
Comment
-
Don't use registery for anything like this, that is a no no, never mess around with that, create yourself a verb like curious1 said or also like like he said call a website like whats my IP or I used to use IP chicken, any IP site will do.
If you need to save the IP for when you close the app you can use ini/text file or so on.
Comment
-
I don't really do this but since I was little board today and since it's been asked for a few times again, I made a simple little plugin, this plugin uses, IPChicken, WhatsMyIPAddress, IPAPI and IPify
So this is subject to these services running.
I have also coded there urls so you can over ride them so if in the future they went down but you had there source code you could over ride there url and call your own if you really wanted to.
WhatsMyIP + Example.zip
This is a free plugin what is subject to the services it uses, I could of done much more but I couldn't be bothered as I will never use this and I don't think some of the sites will go down.
Comment
Comment