iMacros on New Tabs

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
additional001
Posts: 175
Joined: Sun Jul 06, 2008 3:24 am

Re: iMacros on New Tabs

Post by additional001 » Sat Jan 24, 2009 4:38 pm

Before they go adding new features i think we would all appreciate it if they fix the bugs they already have!

My wish list being.
The Javascript onClick() problems
Fix all the recording issues
Fix the problem with stoping a javascript macro and it making FF wig out.
Fix the fact you can only run one javascript macro at a time.
Fix the extraction HREF problem on an image
Update the FILTER command to use other things besides just images as well as allow you to provde wildcards to block only certain images or media.
lazymanlikesbuttons
Posts: 1
Joined: Fri Dec 10, 2010 1:45 pm

Re: iMacros on New Tabs

Post by lazymanlikesbuttons » Fri Dec 10, 2010 1:50 pm

I hope bumping old posts doesn't cause too much pain...

Just wanted to add that the add-on Tab Mix Plus allows all tabs to be opened next to the active tab. It's the only way I've managed to get round this problem.
fenice75
Posts: 1
Joined: Mon Apr 16, 2012 8:05 am

Re: iMacros on New Tabs

Post by fenice75 » Mon Apr 16, 2012 8:10 am

evlev wrote:
Is there some way to skip to the last tab?
something like "TAB T=LAST" or "TAB T=NUMTABS"
or just do it all "TAB T= TAB OPEN GOTO http://www.myurl.com/" :)

Thanks
I found this solution:

Code: Select all

TAB OPEN
SET !ERRORIGNORE YES
TAB T=2
TAB T=3
TAB T=4
TAB T=5
TAB T=6
TAB T=7
TAB T=8
SET !ERRORIGNORE NO
zgwforum
Posts: 2
Joined: Thu Nov 29, 2012 11:57 pm

Re: iMacros on New Tabs

Post by zgwforum » Fri Nov 30, 2012 12:02 am

You are the man.

I am an old school programmer. When I begin using a new "program" and find an issue in the first 5 minutes of trying to use it, the program is usually crap.

Not being able to navigate to the first or last tab is just stupid.

A workaround should not be necessary, but is gladly accepted.

Still, this is pretty stupid. Maybe there should be a command OPENANDGOTO.

Stupid.
Hemingway
Posts: 22
Joined: Wed Oct 17, 2012 12:40 pm

Re: iMacros on New Tabs

Post by Hemingway » Sun Sep 29, 2013 12:01 pm

Hi everybody,
I also spent many, many hours to work around the problem described above - that (in Firefox) TAB OPEN opens a new tab on the far right but then executes the rest of the imacro in the current tab (which may be 1, 2, 3 ... from the left), thus killing whatever was displayed in this tab.
Then I also came across fenice75's trick, which is to simply make the imacro switch to TAB T=n and check if it exists:
if it exists, then move on to TAB T=n+1;
if it does not exist, well, then stay in TAB T=n.
Thus, at the end, the imacro will sit in the TAB with the highest number where it will continue to do what it should actually do.
This "primitive" procedure has been working wonderfully ever since.
... alas, up to imacro's last update! :(
Now, all of a sudden, the macro waits a couple of seconds in each tab that does NOT exist ... I have no idea what it actually waits for, since the TAB simply does not exist, but it ruins the whole fine procedure (fenice75 checks for 8 TABs; I had happily checked for 15 ...).

Resuming work on this issue *sigh*, I have read somewhere that setting !TIMEOUT_PAGE to 0 or 1 reduces the waiting time, but it does not - I can't find any way around the stupid waiting time.
(Returning to the former imacro version helped, but is not what I really want ...)

What can I do?
Or has anyone, in the meantime, found a new trick for going to "TAB T=*LAST" or "TAB T=*NUMTABS"?
Downgraded from VERSION BUILD=9030808 to VERSION BUILD=8970419
Windows 10 (64-Bit) German latest build
Firefox Portable 55.0 (32-Bit)
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: iMacros on New Tabs

Post by chivracq » Mon Sep 30, 2013 1:39 am

Same Issue has recently been reported in this other Thread, after the v8.5.1 Update, about a newly introduced 5 sec Tab Load waiting:
http://forum.imacros.net/viewtopic.php?f= ... 721#p54640
My reaction: It's nice to introduce new features and new waiting times, but give us a way to control them if we are not happy with the default Setting...

Don't have a Workaround for you, but I remember reading some time ago sbd posting some (Javascript, I think...) code to determine the number of open Tabs (in order to find out what is T=LastTAB or T=LastTAB+1, so that could be a hint... (Didn't try to find the Thread...)

Firefox has a Setting as well to switch immediately to a newly opened Tab after clicking on a Link... Maybe that can play a role...

And Google is able to open a Click on a Link in a new Tab (next to the current Tab), so studying the Javascript of the Google Page might bring some Workaround...
- (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...
Hemingway
Posts: 22
Joined: Wed Oct 17, 2012 12:40 pm

Re: iMacros on New Tabs

Post by Hemingway » Mon Sep 30, 2013 11:36 pm

Thanks for your quadruple ideas, chivracq - I appreciate your help!
The Firefox setting you have in mind is probably "Open tabs in the foreground" (in the "Tab" department), and I checked it a long time ago, so no improvement to be expected from there.
Unfortunately I'm not fit with JS and will rather wait for further answers or updates than study yet another programming language ...
Downgraded from VERSION BUILD=9030808 to VERSION BUILD=8970419
Windows 10 (64-Bit) German latest build
Firefox Portable 55.0 (32-Bit)
chivracq
Posts: 8716
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: iMacros on New Tabs

Post by chivracq » Tue Oct 01, 2013 2:36 am

Hum, no the Firefox Setting I had in mind is called "When I open a new Tab, switch to it immediately."

And I'm not a JS gourou either, but if you are a bit of a programmer, and knowing what you are looking for, it's usually not too difficult to understand what a Coding-Statement can mean...

Just mention that you agree with me about:
"My reaction: It's nice to introduce new features and new waiting times, but give us a way to control them if we are not happy with the default Setting..." (About the 5 sec waiting time for each Tab...)
- (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...
Hemingway
Posts: 22
Joined: Wed Oct 17, 2012 12:40 pm

Re: iMacros on New Tabs

Post by Hemingway » Tue Oct 01, 2013 9:26 am

Dear chivracq, after the experiences with the 5 sec waiting time for each Tab that others and I have put down here and in the other thread, I couldn't agree more wholeheartedly with your reaction that
It's nice to introduce new features and new waiting times, but give us a way to control them if we are not happy with the default Setting
. My reaction: What is intended as an improvement may turn out a nuisance under certain circumstances. Some switch or user-defined setting would help - the !TIMEOUT_PAGE setting does not.
BTW: How can I send personal messages in this forum? After clicking a user name I see their "Viewing profile" page, but the "Contact NN" bit is no link.
Downgraded from VERSION BUILD=9030808 to VERSION BUILD=8970419
Windows 10 (64-Bit) German latest build
Firefox Portable 55.0 (32-Bit)
Hemingway
Posts: 22
Joined: Wed Oct 17, 2012 12:40 pm

Re: iMacros on New Tabs

Post by Hemingway » Sat Oct 05, 2013 11:04 am

After a bit of experimenting I have now chosen the easiest solution: downdating to the previous iMacro version and switching off the automatic updates for the iMacro add-on - on our "important" machines. The "toy PC" will keep updating so that I can check if this "feature" will ever be removed, modified, or at least handed back to the user's control.
Downgraded from VERSION BUILD=9030808 to VERSION BUILD=8970419
Windows 10 (64-Bit) German latest build
Firefox Portable 55.0 (32-Bit)
questions
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

Re: iMacros on New Tabs

Post by questions » Sat Nov 16, 2013 3:58 am

i'm having the same problem... i open a new window and run imacros in tab 1 but it's not really the actual tab 1 it's tab + whatever tabs I have open in the other windows... and imacros will kind of work this way for tab 2 because tab 2 seems to just mean the next tab, not really tab 2

so what's happening is my script is a 2 tab script it closes tab 2 but when there is no actual tab 2 it just closes my whoe firefox window, also it will not go to tab 1

is there a get "current" tab function in javascript or imacros?

my scripts are in javascript so i would like to get the current tab value then start from there and this should fix things...
ravi_npatty
Posts: 22
Joined: Sat May 07, 2011 6:12 am

Re: iMacros on New Tabs

Post by ravi_npatty » Tue Dec 29, 2015 4:55 am

To avoid waiting for tab, we can use !timeout_step 0
Hemingway
Posts: 22
Joined: Wed Oct 17, 2012 12:40 pm

Re: iMacros on New Tabs

Post by Hemingway » Tue Dec 29, 2015 10:38 am

Thank you very much for your hint, ravi_npatty - this setting speeds up the process by 100 per cent!
Summing up:
- When starting an imacro, I want it NOT to run in an already open tab (where it would replace whatever is shown there).
- Instead, I want it to open a new tab on the extreme right (this overruns possibly inconsistent browser or add-on settings such as "open new tab next to active tab").
- To achieve this, the imacro must first run through all the open tabs, then open a new one.
- Since no operations must be executed in the tabs, waiting time can be reduced to 0 (SET !TIMEOUT_STEP 0). At the end of this check, the waiting time must be reset to default (SET !TIMEOUT_STEP 6).
This is my solution - works perfectly now:
SET !TIMEOUT_STEP 0
TAB OPEN
SET !ERRORIGNORE YES
TAB T=1
TAB T=2
TAB T=3
TAB T=4
... etc. ... (as many as you may usually keep open simultaneously)
SET !ERRORIGNORE NO
SET !TIMEOUT_STEP 6
Downgraded from VERSION BUILD=9030808 to VERSION BUILD=8970419
Windows 10 (64-Bit) German latest build
Firefox Portable 55.0 (32-Bit)
jrtrev1
Posts: 2
Joined: Wed Nov 16, 2016 12:54 pm

Re: iMacros on New Tabs

Post by jrtrev1 » Wed Nov 16, 2016 12:56 pm

I know this thread is old but I just discovered what to do!

TAB T=-0 will move it back one tab
TAB T=-1 will move it back two tabs


enjoy!
Hemingway
Posts: 22
Joined: Wed Oct 17, 2012 12:40 pm

Re: iMacros on New Tabs

Post by Hemingway » Wed Nov 16, 2016 3:06 pm

Thank you, jrtrev1, for your interesting suggestion. Unfortunately it does not really solve the old problem that is at the basis of this thread. When several tabs are open, all TAB T=n commands (including yours) have "n" as a relative number that is intransparently defined: 1 is the active tab, 2 the new one, etc. But is it the first, third or seventh of them all? Only if that was known, we could really switch between all the open tabs.
What seems (still?) missing is a variable
a) for the number of the current tab ("CURRENT"?) and
b) for the number of open tabs (*NUMTABS"?).
Or has anything like this been introduced in the meantime, and I have missed it?

P.S.: I still introduce all my macros like this:
SET !TIMEOUT_STEP 0
TAB OPEN
SET !ERRORIGNORE YES
TAB T=1
TAB T=2
TAB T=3
... etc. ... up to ...
TAB T=10
SET !ERRORIGNORE NO
SET !TIMEOUT_STEP 6
Downgraded from VERSION BUILD=9030808 to VERSION BUILD=8970419
Windows 10 (64-Bit) German latest build
Firefox Portable 55.0 (32-Bit)
Post Reply