Sign in to follow this  
Followers 0
cypher175

Get Unicoded $Link.Href..??

9 posts in this topic

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)

Share this post


Link to post
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

Share this post


Link to post
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..??

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

i just tried $Link.InnerHtml but that gets only the link text not the link URL..??

im not sure how to code a function to _IEBodyReadHTML() and parse for the link.

Share this post


Link to post
Share on other sites

after i do _IEDocReadHTML how would i find all the links that have "&#104" in them & then add them to a $LinkArray..??

Share this post


Link to post
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
Sign in to follow this  
Followers 0