Jump to content
Sign in to follow this  
ausssieautomate

Scripting Query

Recommended Posts

ausssieautomate

Hi Guys/Gals,

Is it possible to select a specific link on a webpage say www.google.com, "images" on a webpage that is already been created. I.e

#include <IE.au3>

$oIE = _IECreate("http://www.autoitscript.com"); This part omitted

$sMyString = "wallpaper"

$oLinks = _IELinkGetCollection($oIE)

For $oLink in $oLinks

$sLinkText = _IEPropertyGet($oLink, "innerText")

If StringInStr($sLinkText, $sMyString) Then

_IEAction($oLink, "click")

ExitLoop

EndIf

Next

Cheers.

http://www.autoitscript.com/forum/style_im...icons/icon1.gif


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
Share on other sites
AzKay

Look at _IEAttach() in place of the _IECreate()


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites
dillonlim

Hi Guys/Gals,

Is it possible to select a specific link on a webpage say www.google.com, "images" on a webpage that is already been created. I.e

#include <IE.au3>

$oIE = _IECreate("http://www.autoitscript.com"); This part omitted

$sMyString = "wallpaper"

$oLinks = _IELinkGetCollection($oIE)

For $oLink in $oLinks

$sLinkText = _IEPropertyGet($oLink, "innerText")

If StringInStr($sLinkText, $sMyString) Then

_IEAction($oLink, "click")

ExitLoop

EndIf

Next

Cheers.

http://www.autoitscript.com/forum/style_im...icons/icon1.gif

_IECreate has an option to attach to existing window. It's just off by default.

Share this post


Link to post
Share on other sites
ausssieautomate

_IECreate has an option to attach to existing window. It's just off by default.

Thanks man I got it working now.


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
Share on other sites
ausssieautomate

Hi Guys Gals ,

Sorry I thought it I had it working, I am trying to get a basic script running to get a feel for the Ie_Attach command. Can someone tell me whats wrong with this.

#include <IE.au3>

$oIE = _IEAttach("Google - Microsoft Internet Explorer")

$oForm = _IEFormGetObjByName ($oIE, "f")

$oQuery = _IEFormElementGetObjByName ($oForm, "q")

_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")

_IEFormSubmit ($oForm)

When I load the script nothing happens.


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

Share this post


Link to post
Share on other sites
PsaltyDS

Hi Guys Gals ,

Sorry I thought it I had it working, I am trying to get a basic script running to get a feel for the Ie_Attach command. Can someone tell me whats wrong with this.

#include <IE.au3>

$oIE = _IEAttach("Google - Microsoft Internet Explorer")

$oForm = _IEFormGetObjByName ($oIE, "f")

$oQuery = _IEFormElementGetObjByName ($oForm, "q")

_IEFormElementSetValue ($oQuery, "AutoIt IE.au3")

_IEFormSubmit ($oForm)

When I load the script nothing happens.

Look at the parameters for _IEAttach() in the help file. The default match is the DOCUMENT TITLE, not the WINDOW TITLE. It will work if you do this:
$oIE = _IEAttach("Google - Microsoft Internet Explorer", "WindowTitle")

:mellow:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
ausssieautomate

Ah I see thanks for your help man.


Frequent sufferer of ID10T Syndrome and CRAFT (Can't Remember A "BLEEP" Thing)

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  

×