Esquared Posted March 1, 2012 Share Posted March 1, 2012 What I'm tring to do is open a new tab in a pre-existing Internet Explorer window. What I have is an internal web application I want to be able to start and log in to from the favorite bar in IE. The reason I want to do it is beacuse it times out all the time and if I have it in my favorite bar I can just click on it and it'll log me back in again. I cann't use _IECreate because it opens up a new window, not what I want when the current tab is timed out.I tried using this script but it just takes over the last used tab I was on.include <IE.au3>$oIE = _IEAttach("", "instance")_IENavigate($oIE, "www.google.com")If anyone has any idea's, I'd love to hear them!Thanks Link to comment Share on other sites More sharing options...
KSum Posted March 1, 2012 Share Posted March 1, 2012 (edited) Have you tried sending a keystroke. A full list of them for IE can be found here: http://windows.microsoft.com/en-US/windows7/Internet-Explorer-keyboard-shortcuts Expand the "Working with tabs" section. Here are what may be the key ones: Ctrl+click - Open links in a new tab in the backgroundCtrl+Shift+click - Open links in a new tab in the foreground Ctrl+T - Open a new tab in the foregroundCtrl+Tab or Ctrl+Shift+Tab - Switch between tabsCtrl+W - Close current tab (or the current window if tabbed browsing is disabled)Alt+Enter - Open a new tab in the foreground from the Address barKarl Edited March 1, 2012 by KSum Link to comment Share on other sites More sharing options...
DW1 Posted March 1, 2012 Share Posted March 1, 2012 #include <IE.au3> $oIE = _IECreate("www.autoitscript.com") __IENavigate($oIE, "www.google.com", 0, 0x800) __IENavigate($oIE, "www.gmail.com", 0, 0x800) __IENavigate($oIE, "www.ebay.com", 0, 0x800)From Parsix 1 AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 1, 2012 Moderators Share Posted March 1, 2012 (edited) Hi, Esquared, have you done a search of the forum yet? A quick search of "open new tab" pulled up a NUMBER of posts. Here is just one example...@danwilli - beat me to it Edited March 1, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Esquared Posted March 2, 2012 Author Share Posted March 2, 2012 @KSum - That's a good idea, I'll look through the shortcuts and see what I can dig up. Thanks for you help! Link to comment Share on other sites More sharing options...
Esquared Posted March 2, 2012 Author Share Posted March 2, 2012 @danwilli & @JLogan3013 - The code you listed doesn't work for me. [ autoIt ] ( Popup ) #include <IE.au3> $oIE = _IECreate("www.autoitscript.com") __IENavigate($oIE, "www.google.com", 0, 0x800) __IENavigate($oIE, "www.gmail.com", 0, 0x800) __IENavigate($oIE, "www.ebay.com", 0, 0x800) I'm tring to create an new tab in an already exsisting IE window. As soon as you include _IECreate, it creates a new IE window and goes to that location. I need it to be in an already exsisting IE window. Thanks, Link to comment Share on other sites More sharing options...
DW1 Posted March 2, 2012 Share Posted March 2, 2012 did you even try it with IEattach? Works fine for me, don't know why it wouldn't for you: #include <IE.au3> $oIE = _IEAttach("", "instance") __IENavigate($oIE, "www.google.com", 0, 0x800) __IENavigate($oIE, "www.gmail.com", 0, 0x800) __IENavigate($oIE, "www.ebay.com", 0, 0x800) AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Chiquita78 Posted October 11, 2017 Share Posted October 11, 2017 (edited) I was wondering if someone could help me with an issue. To give some information I'm am opening multiple windows that will display information that needs to be reviewed. Each ticket that I open will have a separate window and a tab window for me to enter the ticket number to be reviewed. MY issue is, I am able to open IE and bring up the initial window and a tab window to where all I need to do now is enter the ticket. However, I cannot focus on the tab page that is opening b/c I use _IENavigate. In addition, there are approximately 10 of these windows with a tab window open as well. Below is where I have open the tab but what I'm trying to do is put the ticket number in the tab that was just open. If I use _IEattach it focuses on the very first tab that was open. IS there a way I can focus on the tab page that was just open in the program? Func Tab($i) Local $ticketTemp1 ="" Local $ticketTemp2 ="" Global $ocodes = _IETagNameAllGetCollection($tabopen) For $ocode In $ocodes If $ocode.id == 'Content' Then $ticketTemp1 = StringInStr($ocode.innerText, "ERIC ID") $ticketTemp2 = StringInStr($ocode.innerText, "Misc Ticket") Global $miscTicket = StringMid($ocode.innerText,$ticketTemp2+10, 16) Global $ericTicket = StringMid($ocode.innerText,$ticketTemp1+7, 16) if StringInStr($miscTicket , 'Escalated') Then Global $finalticket = $ericTicket Else $finalticket = $miscTicket EndIf ExitLoop EndIf Next MsgBox(0,"func tab","IN function TAb line 355 ") $ntm = __IENavigate($tabopen, "http://sudnp01h.qintra.com/cgi-bin/QC/DSL/viewNTMTicketForm.pl", 0, 0x800) _IELoadWait($tabopen) MsgBox($MB_SYSTEMMODAL, "", "The $finalticket is: " & $finalticket) Local $NTMticket = _IEGetObjByName($ntm, "ntmTicket") _IEPropertySet($ntm, 'innertext', $finalticket) Send ("{ENTER}") EndFunc Edited October 11, 2017 by Chiquita78 Putting all code. Link to comment Share on other sites More sharing options...
Juvigy Posted October 11, 2017 Share Posted October 11, 2017 Hi Chiquita, You should open an separate topic for your issue and not use random very old ones. Regarding your issue - you should check if your object $ntm is OK. For example check if the object points to the correct tab with the correct html address. 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