vb ip

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
conjure
Pro Scripter
Posts: 63
Joined: Thu Jan 12, 2012 3:05 pm

vb ip

Post by conjure » Wed Aug 24, 2016 6:18 pm

Dim client as New System.Net.WebClient
Dim ip as String = client.DownloadString("https://api.ipify.org")

how can i use this VB.NET code inside MS to get my ip as a result??

User avatar
JRL
Automation Wizard
Posts: 3347
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: vb ip

Post by JRL » Wed Aug 24, 2016 7:44 pm

No idea how to alter VB.NET code to run in Macro Scheduler but if you want to know your web IP try the sample code included in the help for PyExec>. Works for me.

https://www.mjtnet.com/manual/index.html?pyexec.htm

hagchr
Macro Veteran
Posts: 277
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: vb ip

Post by hagchr » Fri Aug 26, 2016 11:44 am

Alt.

Code: Select all

HTTPRequest>http://api.ipify.org,,GET,,strHTML
MDL>strHTML

User avatar
JRL
Automation Wizard
Posts: 3347
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: vb ip

Post by JRL » Fri Aug 26, 2016 2:59 pm

@hagchr
Good job. Works faster than the python code and is only two lines. :)

conjure
Pro Scripter
Posts: 63
Joined: Thu Jan 12, 2012 3:05 pm

Re: vb ip

Post by conjure » Fri Aug 26, 2016 4:17 pm

:D :D :D :shock:

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts