Jump to content

Get Unicoded $Link.Href..??


cypher175
 Share

Recommended Posts

I need to get the exact $Link.Href of a link on a website, but part of the link is in Unicode..

how can I extract the full $Link.Href into an Array without the Unicode characters being converted into their normal text characters..??

"&_#104;&_#116;tp://website.com" is how it's displayed in the html source, but without the _'s after the &'s

how can I get the complete $Link.Href with the UniCode intact into my $LinkArray..??

Dim $LinkArray[1]

$Links = _IELinkGetCollection($IE)
For $Link in $Links
   $LinkText = _IEPropertyGet($Link, "outertext")

    If StringInStr($LinkText, 'UniCodeLink') Then
        _ArrayAdd($LinkArray, $Link.Href)
    EndIf

Next

_ArrayDelete($LinkArray, 0)
_ArrayDisplay($LinkArray)
Link to comment
Share on other sites

AutoIt uses Unicode, and IE interprets the HTML to return valid Unicode. If you want the uninterpreted text, try $Link.InnerHtml, or if that also gets interpreted into Unicode, then try _IEBodyReadHTML() and parse for the link.

:D

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
Link to comment
Share on other sites

guys.. I just want to get the inner link URL that is "&_#104;&_#116;tp://website.com" without the _'s

i have to put the _'s or this board auto converts it to HTML..

But i just want it to look exactly like "&_#104;&_#116;tp://website.com" displayed in my $LinkArray

what is the best way to get the inner link url symbol for symbol without it converting anything..??

Link to comment
Share on other sites

I think by "Unicode characters" he means the HTML encoded characters.

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

I got that, but I think he wants the literal "&#104", while IE is interpreting it into "h". Using a converter function won't help because how would you know which characters were originally HTML encoded and which were not? As in the OP example "http", the "ht" is encoded but "tp" is not. The task (I think) is to get the original HTML used.

:D

guys.. I just want to get the inner link URL that is "&_#104;&_#116;tp://website.com" without the _'s

i have to put the _'s or this board auto converts it to HTML..

But i just want it to look exactly like "&_#104;&_#116;tp://website.com" displayed in my $LinkArray

what is the best way to get the inner link url symbol for symbol without it converting anything..??

Did you try either of the two techniques suggested in post #2?

:D

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