Jump to content

Please help with web search script


Recommended Posts

#include <IE.au3>

;opens webpage

$o_IE = _IECreate ()

_IENavigate ($o_IE, "www.*****.com")

WinActivate( "title", "")

WinSetState ( "Search for jobs in the UK. Online job search", "" , @SW_MAXIMIZE )

sleep ("3000")

_IELoadWait($o_IE)

; enters test in search field.

$search = "test"

;Get pointers to the fields needed.

$o_form = _IEFormGetObjByName ( $o_IE, "form1" )

$o_search = _IEFormElementGetObjByName ( $o_form, "Search_TX" )

;Clicks button on webpage to go to new webpage

$oSubmite = _IEGetObjByName($o_form, "Search_Button")

_IEAction($oSubmite, "click")

_IELoadWait ( $o_IE )

Sleep (5000)

exit

;Navigate to new web page and clicks on link text name more.

#include <IE.au3>

$oIE = _IECreate("")

$sMyString = "more"

$oLinks = _IELinkGetCollection($oIE)

For $oLink in $oLinks

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

If StringInStr($sLinkText, $sMyString) Then

_IEAction($oLink, "click")

ExitLoop

EndIf

Next

Hi

This program works untill you go to new page and it does not click "more" link.

I am unable to unable to hard code the $oIE = _IECreate("") with webpage as this changes daily.

Please Help....

how do i populate the (" ")?? or am i using wrong command.

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...