Next Tab Not Working

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Next Tab Not Working

Post by chivracq » Tue Sep 10, 2019 1:56 am

Oh, yep indeed... Any Update/Progress, nearly one week later, as I see you are checking the Forum, @OP...? :o
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
keenan
Posts: 8
Joined: Tue Sep 03, 2019 4:57 am

Re: Next Tab Not Working

Post by keenan » Tue Sep 10, 2019 2:01 am

chivracq wrote:
Wed Sep 04, 2019 1:40 am
But OK, 'Free'/'PE' won't make a Difference in Behaviour between those 2 'Free'/'PE' "Versions"..., concerning the 'TAB' Command, so I can already start giving you a "proper" Answer, you are reacting "very cooperatively" @OP, ah-ah...! :D

Then, yep, I guess you deliberately removed the "TAB T=1" that got recorded, thinking that when starting a Macro on some TAB and doing some "TAB T=2" a bit later on in your Script, + looping your Script that 'TAB_2' would then become 'TAB_1', to then switch to 'TAB_3' and 'TAB_4' etc..., but hum..., nope apparently...!! I know-I know, that was also the Behaviour I would have expected...!!

But no-no, even if you don't specify some "explicit" "TAB T=1" at the beginning your Script, or comment it out as it automatically gets recorded, iMacros still records and remembers that first TAB as being 'TAB_1'.
That's by Design, I guess, and probably needed for other possible TAB Commands like a "TAB OPEN" / "TAB CLOSE", and Web-Pages can open and close Tab-Pages from simply clicking on a Link, and iMacros won't know about it, so they really need a "Way" to "hard-code" on which "real" Tab they are starting the Macro...
(Tab Control for the Browser or for Add-ons is a bit "more powerful" than from a Web-Page, they have "Access" to some "more powerful" JS, only available to Add-ons..., but iMacros is not using it fully-fully...)

=> So OK, your "TAB T=2" at the end your Script manages to switch your Script to run again 1 Tab further, but that stops at Loop=3 because then "TAB T=2" will keep coming to the "real" 'TAB_2' in your open Tabs...

=> The Solution will be to use and compute a Var based on '!LOOP' to use for "TAB T={{!LOOP}}"... (I would think...) :idea:

And if you need in the same Run/Loop to do "Things" also on 'TAB_2' (Relative from 'TAB_1'), then you can compute your own Var based on the raw '!LOOP' for "{{!LOOP}}" for 'TAB_1' and "{{!LOOP}}+1" for 'TAB_2'... (=> Using 'EVAL()' or 'ADD'..., 'ADD' is a very "basic" Command, but can very probably "do the job" in this Case, I would think... 8) )

[DJ-ing in some Cafe and just moved to some Private (After-) Party where I'm still DJ-ing, while still checking and answering the Forum from time to time..., I'll check for Typos "tomorrow", ah-ah...! :wink: ]
I tried TAB T={{!LOOP}} at the end of script but it just re-runs my macro on the same tab rather than moving to the next tab

And very sorry for the delay, the work I was working on had completed before your reply but I am working on a new list today :shock:
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Next Tab Not Working

Post by chivracq » Tue Sep 10, 2019 2:09 am

keenan wrote:
Tue Sep 10, 2019 2:01 am
I tried TAB T={{!LOOP}} at the end of script but it just re-runs my macro on the same tab rather than moving to the next tab

And very sorry for the delay, the work I was working on had completed before your reply but I am working on a new list today :shock:

OK, but you need to place it at the beginning of your Script, and not at the end, or your Script will do [1 => 1 => 2 => 3 etc], while you want [1 => 2 => 3 => 4 etc]... :idea:
Last edited by chivracq on Tue Sep 10, 2019 2:21 am, edited 1 time in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
keenan
Posts: 8
Joined: Tue Sep 03, 2019 4:57 am

Re: Next Tab Not Working

Post by keenan » Tue Sep 10, 2019 2:14 am

chivracq wrote:
Tue Sep 10, 2019 2:09 am
keenan wrote:
Tue Sep 10, 2019 2:01 am
I tried TAB T={{!LOOP}} at the end of script but it just re-runs my macro on the same tab rather than moving to the next tab

And very sorry for the delay, the work I was working on had completed before your reply but I am working on a new list today :shock:

OK, but you need to place at the beginning of your Script, and not at the end, or your Script will do [1 => 1 => 2 => 3 etc], while you want [1 => 2 => 3 => 4 etc]... :idea:
It works!!!!!!!!!!! Thank you so much! :D :D :D
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Next Tab Not Working

Post by chivracq » Tue Sep 10, 2019 3:10 am

keenan wrote:
Tue Sep 10, 2019 2:14 am
It works!!!!!!!!!!! Thank you so much! :D :D :D

Yep, OK, good to hear... :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply