cypher175 Posted September 22, 2009 Share Posted September 22, 2009 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 More sharing options...
PsaltyDS Posted September 22, 2009 Share Posted September 22, 2009 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. 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 More sharing options...
jvanegmond Posted September 22, 2009 Share Posted September 22, 2009 I think by "Unicode characters" he means the HTML encoded characters. http://www.autoitscript.com/forum/index.php?showtopic=51084 github.com/jvanegmond Link to comment Share on other sites More sharing options...
cypher175 Posted September 22, 2009 Author Share Posted September 22, 2009 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 More sharing options...
PsaltyDS Posted September 22, 2009 Share Posted September 22, 2009 (edited) I think by "Unicode characters" he means the HTML encoded characters.http://www.autoitscript.com/forum/index.php?showtopic=51084I got that, but I think he wants the literal "h", 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. guys.. I just want to get the inner link URL that is "&_#104;&_#116;tp://website.com" without the _'si 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 $LinkArraywhat 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? Edited September 22, 2009 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 More sharing options...
cypher175 Posted September 22, 2009 Author Share Posted September 22, 2009 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. Link to comment Share on other sites More sharing options...
jvanegmond Posted September 22, 2009 Share Posted September 22, 2009 im not sure how to code a function to _IEBodyReadHTML() and parse for the link.What part are you not sure about? github.com/jvanegmond Link to comment Share on other sites More sharing options...
cypher175 Posted September 22, 2009 Author Share Posted September 22, 2009 after i do _IEDocReadHTML how would i find all the links that have "h" in them & then add them to a $LinkArray..?? Link to comment Share on other sites More sharing options...
jvanegmond Posted September 22, 2009 Share Posted September 22, 2009 StringRegExp _StringBetween StringInStr github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now