Sets focus on the tab with number n.
- Specifies the tab number.
- Closes the current tab.
- Opens a new tab in the background.
- Closes all tabs except the one currently in focus.
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
Related forum posts:
- Multiple Tab Macro
- New tab isn't the active tab
- Open multiple links in separate tabs
- Firefox add-ons Tab Mix Plus and Tab Utilities may override tab behavior
- Switching tabs in Firefox
- Please see Tab Support For Internet Explorer for information about which versions of iMacros and IE support tabs.
- 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.
- Related FAQ: Why is there no page (or the wrong page) displayed when a new tab opens in the iMacros Browser?