Jump to content
Sign in to follow this  
lionfaggot

new tab issues with ie

Recommended Posts

lionfaggot

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?

Share this post


Link to post
Share on other sites
lionfaggot

well? anyone have any ideas? a buddy of mine figured this out with webforms in C# but idk how to do this in autoit

Share this post


Link to post
Share on other sites
lowray1975

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 by lowray1975

Share this post


Link to post
Share on other sites
lionfaggot

apparently there is an event called New Window for webforms in C# but ive no clue how to do this in autoit

Share this post


Link to post
Share on other sites
lionfaggot

bump, come on man, this cant be too hard to solve. :(

Share this post


Link to post
Share on other sites
water

If nobody replies then nobody seems to have a solution :ermm:


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Kidney

i use the FF.au3 and it works much better for managing tabs. i would give it a shot

Share this post


Link to post
Share on other sites
lionfaggot

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

Share this post


Link to post
Share on other sites
DaleHohm

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

Share this post


Link to post
Share on other sites
musahi0128

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

Share this post


Link to post
Share on other sites
Melba23

musahi0128,

Do not hijack other threads - stick to your own. :naughty:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______Open Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
musahi0128

musahi0128,

Do not hijack other threads - stick to your own. :naughty:

M23

My bad, but i think it has something to do in this threads, maybe the problem identical or did i misundertood something??

Share this post


Link to post
Share on other sites
karlkar

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.

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  

×