lionfaggot Posted November 4, 2013 Share Posted November 4, 2013 is there a way to keep all new tabs in the current gui instance of ie? like say i click a link within the instance of ie that doesnt navigate but rather opens a new tab, is there a way to handle that as a navigation instead? Link to comment Share on other sites More sharing options...
lionfaggot Posted November 4, 2013 Author Share Posted November 4, 2013 well? anyone have any ideas? a buddy of mine figured this out with webforms in C# but idk how to do this in autoit Link to comment Share on other sites More sharing options...
lowray1975 Posted November 4, 2013 Share Posted November 4, 2013 (edited) The best way, in my opinion, would be to capture the link and redirect. You could insert the following javascript using _IEHeadInsertEventScript <script type="text/javascript"> window.onclick = function (e) { if (e.target.localName == 'a') { console.log('a tag clicked!'); } } </script> From there you can rewrite the javascript to navigate to the same tab. Actually: Look at the first example for the _IEHeadInsertEventScript function. Edited November 4, 2013 by lowray1975 Link to comment Share on other sites More sharing options...
lionfaggot Posted November 6, 2013 Author Share Posted November 6, 2013 apparently there is an event called New Window for webforms in C# but ive no clue how to do this in autoit Link to comment Share on other sites More sharing options...
lionfaggot Posted November 9, 2013 Author Share Posted November 9, 2013 bump, come on man, this cant be too hard to solve. Link to comment Share on other sites More sharing options...
water Posted November 9, 2013 Share Posted November 9, 2013 If nobody replies then nobody seems to have a solution My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Kidney Posted November 9, 2013 Share Posted November 9, 2013 i use the FF.au3 and it works much better for managing tabs. i would give it a shot Link to comment Share on other sites More sharing options...
lionfaggot Posted November 11, 2013 Author Share Posted November 11, 2013 i know it can be done since webforms in C# is able to pull this off easily. so im not gonna give up just yet Link to comment Share on other sites More sharing options...
DaleHohm Posted November 12, 2013 Share Posted November 12, 2013 AutoIt sets itself up to essentially be "notified" of events instead of putting itself into the event processing flow where you would have the option to intercept the event - see ObjEvent. The only way to do what you want in IE is to insert JavaScript into the page or us the prior suggestion. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
musahi0128 Posted December 2, 2013 Share Posted December 2, 2013 Hey i'm new to forum, i create a script that has an embedded ie (_IECreateEmbedded). When i click a link that "open in new tab" like <a href="http://www.google.com/" target="_blank">, THE SCRIPT CRASHED. Please help.. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 2, 2013 Moderators Share Posted December 2, 2013 musahi0128,Do not hijack other threads - stick to your own. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
musahi0128 Posted December 2, 2013 Share Posted December 2, 2013 musahi0128, Do not hijack other threads - stick to your own. M23 My bad, but i think it has something to do in this threads, maybe the problem identical or did i misundertood something?? Link to comment Share on other sites More sharing options...
karlkar Posted December 3, 2013 Share Posted December 3, 2013 It depends on ie settings if it opens page in new tab or in new window. You can go to internet settings and search for this setting. I have a code, where i modify registry for the moment of clicking to change this setting and then I reset my change. 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