Jump to content

Text Search on a webpage


Recommended Posts

How do i go about creating code to look for text within a webpage I have looked at image search and pixel search however both don't seem to cater for my needs is there anyway i can get it to find the text within the webpage get the co-ordinates and click on it?

Link to comment
Share on other sites

there a several way's to get the needed info, one of them:

; Reading your thread and display it in a MsgBox

#include <MsgBoxConstants.au3>
#include <String.au3>

 $sText = BinaryToString(InetRead("https://www.autoitscript.com/forum/topic/181027-text-search-on-a-webpage/#comment-1299787"))
MsgBox($MB_SYSTEMMODAL, "HTML Source", $sText)
;next step is to filter the needed infos
;use: RegEx, _StringBetween and/or String*-functions

 

Edited by AutoBert
Link to comment
Share on other sites

Thanks I finally got it to work after realising my IE was corrupt.....

Is there anyway for me to make it keywords not needed the whole text?

Also theres 3+ texts that are the same but have colours on a second line is there anyway I can find the keyword nearest to the colour of choice when theres 3+ colours?

Link to comment
Share on other sites

I can't even guess what you were requesting...

After clicking, you can _IELoadWait, and then the new dom will be populated...if it's dynamically generated data, then you need to constantly loop until you get the object you are looking for.

If you want specific answers, you need to provided specific html data.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

http://www.amazon.co.uk/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=iphone+6s&rh=i%3Aaps%2Ck%3Aiphone+6s

For example 

Apple iPhone 6s 16GB (Sim Free, Unlocked) - Space Grey

 is very specific is there a way I can make it so that I can make search for iPhone 6s then click on that link also it says by apple on each item but lets say I wanted to click on the iphone closest to 02. I cant think of a way to explain it....... Hope that helps

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