Jump to content

Finding the location of a text on IE


Recommended Posts

Hi, everyone, this is the site that im trying to work with. i know there is a command called pixelsearch which search for the location of a colour. However I need Autoit to search for the location (x,y) of the word "frequency", and then click on the drop down menu to the right of it,

Edited by ToyBoi
Link to comment
Share on other sites

Don't know what your end goal is, but you could do something with _IECreate and _IEFormElementSetValue

Look up the IE functions

Sorry I forgot to include the picture, oh and I did read the IE functions in the help file, but I'm not exactly sure which one is the best for this situation

Link to comment
Share on other sites

i guess to simplify it i jsut need it too return the x y coordinate of the word frequency on the screen, I know there is a function which clicks a specific image and there is one that can tell you if it has found a text on a webpage, but I couldn't find one that can tell me the x y coordinates of a string.

Link to comment
Share on other sites

sorry i forgot to do that, when i click the dropdown menu, it will show a list of frequencies. such as 103Mhz, 105Mhz etc all the way to 999Mhz. Autoit should click on each one of them which will cause IE to show a chart with specific information.

I then have a command from the help file that can save the page, so I parse it later with vba

Link to comment
Share on other sites

...I know there is a function which clicks a specific image...

PixelCheckSum()

...but, it may be faster to tab your way to that drop down and then use UP or DOWN to get to the desired selection.

If you send the browser an Alt-d [send("!d")] then you will always have a starting point in your tab sequence. Then have AutoIt watch for the text in the status bar to be sure that you are getting near the correct location on the page. You also maybe able to check several tab position/status bar indications to determine if the page has changed formats.

"Tab around" using code like:

Do

Send("{TAB}")

Until WinExists("title", "some unique status bar text")

Here is a post where I ramble on at length about "tabbing around" within IE:

http://www.autoitscript.com/forum/index.php?showtopic=14395

If you want to stick with PixelCheckSum, see if you can make sense out of this tool that I posted: http://www.autoitscript.com/forum/index.php?showtopic=19722

It goes without saying the the _IE UDFs are the best way to go, but until you have the time/desire to dig into them - just "tab around".

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

_IEFormElementOptionselect

See the helpfile, run the examples.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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