Jump to content

Recommended Posts

Posted (edited)

Read up on the _IE* functions of the IE.au3 UDF. Once you can identify the DOM element that contains what you want, get the text with something simple like:

$sText = $oElement.innerText

Or maybe:

$sURL = $oLink.href

This demo opens the AutoIt home page and gets the URL from the "graphics and wallpapers" link in the text:

#include <IE.au3>

$sURL = "http://www.autoitscript.com"
$oIE = _IECreate($sURL)
$colLinks = _IELinkGetCollection($oIE)
For $oLink In $colLinks
    If StringInStr($oLink.innerText, "graphics and wallpapers") Then
        $sHref = $oLink.href
        MsgBox(64, "Result", "The 'graphics and wallpapers' link points to:  " & $sHref)
        ExitLoop
    EndIf
Next

:D

Edit: Added demo.

Edited by PsaltyDS
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
Posted

Actually, the string i am looking for and want to center on (so i can capture it) is not in an IE window. It is in an email like application. The string is an URL and starts with "http."

I want to capture it and launch it automatically in IE.

PK

Posted

Yeah, but I will be honest, I am fairly new to AutoIt and don't really know what I am looking at. I know how to get to a control if it is clearly named, but this control information I don't understand so well. I have attached a screenshot.

The Window info tool can see the text I am looking for, i know that. I just need to figure out how to get to that control (or text) so I can capture it.

Right now i am using a MouseClick command at coordinates in the window. It works, but seems sloppy.

pk

post-53927-12658960146529_thumb.jpg

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...