K4iTO Posted March 12, 2010 Share Posted March 12, 2010 (edited) Hello I have using a very simple code from autoit1-2-3 demos ; Mini Pandora Radio I have modified a link in it. Now i whant to open links what are runing in side window in new IE window. ; Mini Pandora Radio ; Created By: Frostfel #include <GUIConstants.au3> #include <IE.au3> $PanTask2 = _IECreateEmbedded() GUICreate("Reklama - otwierają się w przeglądarce", 336, 280, 100, 100) $PanGUI = GUICtrlCreateObj($PanTask2, -840, -203, 1390, 1024) GUISetState() _IENavigate ($PanTask2, "http://rozrywka.nazwa.pl/wektor/wordpress/", 0) While 1 $GUI = GUIGetMsg() Select Case $GUI = $GUI_EVENT_CLOSE Exit EndSelect WEnd I'll try to be clearly on it. I don't whant to open http://rozrywka.nazwa.pl/wektor/wordpress/ address but I whant to open links under this link in new browser! Edited March 12, 2010 by K4iTO Link to comment Share on other sites More sharing options...
Steveiwonder Posted March 13, 2010 Share Posted March 13, 2010 (edited) The only way i can think of doing it would be by altering the HTML code on the webpage a link that looks like this... <a href="www.google.com"> Google </a> to <a href="www.google.com" target="_blank"> Google </a> You can use HTMLRead and then some StringReplace to alter the code and then iedocwritehtml to rewrite the links inside the page, but it isn't that simple a task for what i can see is someone who's just learning autoit. If this is your site and it will be only use via a program your creating with AutoIt then... the easier option would be to change the code on your webpage adding target="_blank" to each link element. There may ofcourse be an alternative way to mine and much simpler, but i wouldn't know. Steveiwonder Edited March 13, 2010 by Steveiwonder They call me MrRegExpMan Link to comment Share on other sites More sharing options...
K4iTO Posted March 13, 2010 Author Share Posted March 13, 2010 It's no way to make it happend from Auto it bette mod rewrite... :/ I'll try... But maybe somone has any idea how to make link's to change.. Link to comment Share on other sites More sharing options...
K4iTO Posted March 13, 2010 Author Share Posted March 13, 2010 I don't work even when i;m using a script <script type="text/javascript"><!--//--><![CDATA[//><!-- function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=anchors.length-1; i>=0; i--) { var anchor = anchors[i]; if (anchor.href && anchor.href.substr(0,7) == "http://") anchor.target = "_blank"; } } window.onload = externalLinks; //--><!]]></script> It works for all links but not for google :/ HELP! 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