Jump to content
Sign in to follow this  
cortx

Asking for script: Get an URL link

Recommended Posts

cortx

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

Share this post


Link to post
Share on other sites
cortx

$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

Share this post


Link to post
Share on other sites
cortx

If it's be usefull, the link what I want to get is show in the status bar of Internet Explorer;

Share this post


Link to post
Share on other sites
cortx

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.

Share this post


Link to post
Share on other sites
yyyy273

#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

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.