Jump to content
Sign in to follow this  

Need help to get contents from a webpage into autoit variable

Recommended Posts



I am trying to create an AutoIt script that will do some action depending on the contents of a webpage.

The webpage in question will only have the IP address of the computer calling the page. For example, the webpage might simply have this text:

Does anyone know how to do this? I need this value to be put into a string variable within AutoIt so that I can tell it what to do. For example, I want to do this:

- go to http://www.mysite.com/WhatIsMyIP/

- Get the response (ip address) into AutoIt variable called "$myIP".

- If $myIP is NOT equal to, then display a big popup dialogue box on the computer.

- Else, do nothing.

Does anyone have any suggestions?


Share this post

Link to post
Share on other sites

Welcome to the AutoIt Forums ! Posted Image


#include <Inet.au3>

$myIP = _GetIP ( )
MsgBox(0, "IP Address", "Your IP Address is: " & $myIP )
If $myIP <> '' Then
    SplashTextOn ( "Title", "Wrong IP.", -1, -1, -1, -1, 4, "", 24 )
    Sleep ( 3000 )
    SplashOff ( )

AutoIt X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.