Jump to content

Asking for script: Get an URL link


Recommended Posts

Hi,

Hi everybody, i need you, because my knowledge are not enough

i would like to make a function what get in a variable an URL of destination about a picture.

For example on this website:

http://www.autoitscript.com/autoit3/

The picture Posted Image link on http://www.autoitscript.com/autoit3/downloads_gfx.shtml.

So, for me, I want to get this link http://www.autoitscript.com/autoit3/downloads_gfx.shtml in a variable

For information, if can be usefull,

The mouse pointer is always on the picture

Best Regards

CortX

Link to comment
Share on other sites

$Var = "http://www.autoitscript.com/autoit3/downloads_gfx.shtml"
ShellExecute($Var)
Sleep(5000)

8)

I think you have not understand my ask.

You code execute the url, for me I just want to get it in a variable for write it in a log file.

The link behind the image is not know by me, it's only for example as I give you that.

If you want an other example:

How to get the URL link under the first picture on this site AZERTY search in google image

Thanks

Edited by cortx
Link to comment
Share on other sites

Hello everybody.

I found an answer seams to be work, I get the information in the status bar.

AutoItSetOption("WinTitleMatchMode", 2)
$x = StatusbarGetText("Internet Explorer")
MsgBox(0, "Internet Explorer's status bar says:", $x)

Thanks.

Link to comment
Share on other sites

#include <INet.au3>

$source = _INetGetSource("http://www.autoitscript.com/autoit3/")

$array = StringRegExp($source,'(<a href=".*"><img src=")',3)

for $i = 0 to ubound($array) -1
$array[$i] = stringtrimleft($array[$i],9)
$array[$i] = stringtrimright($array[$i],12)
consolewrite("Array[" & $i & "] = " & $array[$i] & @CRLF)
Next

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...