Jump to content
Macro Express Forums

Firefox - counting tabs?


Recommended Posts

Any Firefox users around please? I'm sure this must be easy but so far inspiration eludes me! With a Firefox window active, what's the simplest way to count how many tabs are open please?

 

--

Terry, East Grinstead, UK

Hi Terry, the simplest would be to look, count, know.

 

But using ME... that's a tough one. I would probably try something like this:

Variable Set String %T1% from Window Title
Variable Set Integer %N1% to 1
Repeat Until %T1% <> %T1%
 Text Type: <CONTROL><TAB>
 Variable Set String %T2% from Window Title
 If Variable %T1% = variable %T2%
Break
 Else
Variable Modify Integer: Inc (%N1%)
 End If
Repeat End
Text Box Display: Tabs Open = %N1%

<TVAR2:01:06:><IVAR2:01:01:1><REP3:08:000002:000001:0001:1:01:T1><TEXTTYPE:<CONTROL><TAB>><TVAR2:02:06:><IFVAR2:4:01:1:T2><BREAK><ELSE><NMVAR:08:01:0:0000001:0:0000000><ENDIF><ENDREP><TBOX4:T:1:CenterCenter000278000200:000:Tabs Open = %N1%There are Currently %N1% tab(s) open.>

 

Of course, add delays as necessary. I have not tested this out at all as I don't have FF at work, but even if the code isn't right (I almost never

build a macro actually works without at least a few trial runs and changes), the idea should work. Oh, and even if the code does work right (fingers

crossed), it still won't work if two of the same page are open, or two pages with the same title... so good luck :)

 

Now, if there is an even cleaner way to do it, that would be nice to know.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...