Sign in to follow this  
Followers 0
rednimer

Click on link and get URL from new window

4 posts in this topic

Im very new at autoit, or any type of scripting for that matter.

What im trying to do seems very simple.

I need to get a list of url's from a website, which are in a javascript list.

So when I go to the site, i have to click on the link to upen the URL, a new window pops up, and I need to take that URL from the browser, and copy/paste it to word or something similar.

I can get the keystrokes recorded so it click the link, but when the new window opens I cant get it to click the web address.

It seems like i need

(_IEPropertyGet($oIE, "locationurl")
in the script, but i dont know how to incorporate it, and to get it to paste into a document.

And then to have it loop a set amount of times.

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites



I need to get a list of url's from a website, which are in a javascript list.

Can you provide a link or source for the page containing this list of URL's?

So when I go to the site, i have to click on the link to upen the URL, a new window pops up, and I need to take that URL from the browser, and copy/paste it to word or something similar.

It seems to me that it would be easier to retrieve the HREF Property of the link and navigate to it manually. In doing this it would eliminate the need to attach to the new browser window.

It seems like i need

(_IEPropertyGet($oIE, "locationurl")
in the script, but i dont know how to incorporate it, and to get it to paste into a document.
As for pasting it into a document I would suggest taking a look at my MS Word Automation Library (see my signature for the link).

Share this post


Link to post
Share on other sites

thanks for the extra quick response. There is probably a better way to it but I was just going to do a crl+v to paste the text.

Here is the site im trying to get links from http://proxy.org

Share this post


Link to post
Share on other sites

I'm still not exactly sure what you are trying to do, but here is a script that will hopefully give you some ideas.

#include <IE.au3>

$sVisitURL = "www.autoitscript.com"

$sURL = "http://proxy.org/"
$oIE = _IECreate($sURL)
$oForm = _IEFormGetObjByName($oIE, "prf")
$oInput = _IEFormElementGetObjByName($oForm, "url")
$oSelect = _IEFormElementGetObjByName($oForm, "proxy")

_IEFormElementSetValue($oInput, $sVisitURL)

$oItems = $oSelect.Options

For $oItem In $oItems
    ConsoleWrite($oItem.value & @CR)
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  
Followers 0