TAB

From iMacros
Jump to: navigation, search

Sets focus on the tab with number n.

Syntax iMacros Browser IE Plug-in Firefox Chrome

TAB (T=n|OPEN|CLOSE|CLOSEALLOTHERS)

Parameters

  • T
    Specifies the tab number.
  • CLOSE
    Closes the current tab.
  • OPEN
    Opens a new tab in the background.
  • CLOSEALLOTHERS
    Closes all tabs except the one currently in focus.

Examples

Related example macros: Demo-Tab See examples.

If you want to open a second website, use the following code:

' open a webpage in the first tab 
URL GOTO=http://www.iopus.com 
' open a new tab 
TAB OPEN 
' get new tab to foreground 
TAB T=2 
' load another page 
URL GOTO=http://www.google.com 
' close the second tab 
TAB CLOSE 
TAB T=1
iMacros supports Tabs in Internet Explorer 9 and later

Related forum posts:

Notes

  1. Please see Tab Support For Internet Explorer for information about which versions of iMacros and IE support tabs.
  2. iMacros for Firefox and Chrome have a slightly different behavior when it comes to counting tabs:
    In the iMacros Browser the tab number is always counted from the first tab. But in iMacros for Firefox and iMacros for Chrome the tab positions are relative to the start position. If you start the macro while the 5th tab is on the foreground, then the 5th tab is addressed with TAB T=1 and TAB T=2 refers to the next tab (= 6th tab). Also be aware that other Firefox add-ons might override tab behavior as explained here.
  3. Related FAQ: Why is there no page (or the wrong page) displayed when a new tab opens in the iMacros Browser?

See Also

FRAME, TAG, !X_PERM_NEW_WINDOW_BEHAVIOR