Open Multi Tab

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Post Reply
Tamilselvan
Posts: 101
Joined: Mon Mar 07, 2016 10:49 am

Open Multi Tab

Post by Tamilselvan » Mon Mar 05, 2018 8:37 am

Windows 10
Firefox : Version 55.0.3 (32-bit)
Add on: iMacros for Firefox 9.0.3
iMacros 30-Day Evaluation: iMacros Browser (x86) Version 11.5.498.2403

Hello,
Anyone help please.
Due to "command ONPRINT is not supported in the current version, line: 14 (Error code: -912)".

I want to open multi new tab. Each tab loading page based on csv file and print the page.

Instead of PRINT Command

I don't know how can i correct my code.


VERSION BUILD=8970419 RECORDER=FX
TAB T=1

SET !TIMEOUT_STEP 0
SET !DATASOURCE "C:\Users\acer\Documents\iMacros\Datasources\\Wage-List.csv"
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}


URL GOTO=http://nregade1.nic.in/netnrega/view_wa ... ?flag=UNSK
TAG POS=1 TYPE=SELECT ATTR=NAME:ddlFinYr CONTENT=%2017-2018
TAG POS=1 TYPE=SELECT FORM=ID:form1 ATTR=ID:ddl_sel CONTENT=%*{{!COL1}}*
WAIT SECONDS=6

ONPRINT P=* BUTTON=PRINT
PRINT
chivracq
Posts: 9715
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Open Multi Tab

Post by chivracq » Mon Mar 05, 2018 2:50 pm

Tamilselvan wrote:

Code: Select all

Windows 10
Firefox : Version 55.0.3 (32-bit)
Add on: iMacros for Firefox 9.0.3
iMacros 30-Day Evaluation: iMacros Browser (x86) Version 11.5.498.2403
Hello,
Anyone help please.
Due to "command ONPRINT is not supported in the current version, line: 14 (Error code: -912)".

I want to open multi new tab. Each tab loading page based on csv file and print the page.

Instead of PRINT Command

I don't know how can i correct my code.

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1

SET !TIMEOUT_STEP 0
SET !DATASOURCE "C:\Users\acer\Documents\iMacros\Datasources\\Wage-List.csv"
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}

URL GOTO=http://nregade1.nic.in/netnrega/view_wagelist.aspx?flag=UNSK
TAG POS=1 TYPE=SELECT ATTR=NAME:ddlFinYr CONTENT=%2017-2018
TAG POS=1 TYPE=SELECT FORM=ID:form1 ATTR=ID:ddl_sel CONTENT=%*{{!COL1}}*
WAIT SECONDS=6

ONPRINT P=* BUTTON=PRINT
PRINT
Simply add a 'TAB OPEN' + 'TAB T=2' Block, I would think..., either before the 'URL GOTO', or at the end of your Script, and you loop your Script.
You will end up with an extra Tab opened/unused, either on the complete Left or complete Right, that you can always manually close, no big deal I would think...
Your current 'TAB T=1' might need to be commented out, as I'm not completely sure without testing it, if iMacros remembers between Loops from which Tab it started looping on Loop_1, but I would think it doesn't (remember), and that TAB_2 on Loop_2 becomes TAB_1 for it...
Though that Behaviour might have changed a little bit between different Versions, I would be able to test on v8.8.2 and v8.9.7 for FF but you are now using v9.0.3 which I never bothered to install, so the Behaviour on v9.0.3 might still be different (again) from v8.9.7.

>

And yep, like you kind of found out, 'PRINT' and 'ONPRINT' are not supported on iMacros for FF, like documented in the Wiki... (But there is a Workaround..., at least to trigger the Print Dialog...)

Oh...!, but you've deleted your Thread about 'ONPRINT'...! :shock: , hum... strange...!, that's not "the way" to use the Forum "a bit correctly", that Thread was a very legit 'EnhReq' (Enhancement Request) even if your "very commanding" overcoming "Please do the needful." was certainly not going to sound very appealing to Dev I guess, ah-ah...!, (Reason as well why I didn't react in that Thread...), but tja, you'll have to find that Workaround by yourself then, ah-ah...! Or you found it already, but you should have shared it in that Thread instead of deleting it... :roll:

I was going to check if those 2 Commands were included in the List of EnhReq's I maintain myself in this Thread, and after checking..., I don't have them indeed, and I would have added them and linked to that 'ONPRINT' Thread of yours then, but pfff..., I guess I won't really bother now... :roll:
- (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...
Tamilselvan
Posts: 101
Joined: Mon Mar 07, 2016 10:49 am

Re: Open Multi Tab

Post by Tamilselvan » Tue Mar 06, 2018 1:19 pm

Now i tried multi tab open in loop. But not able to print.

VERSION BUILD=9030808 RECORDER=FX
TAB T=1

SET !TIMEOUT_STEP 0
SET !DATASOURCE "C:\Users\acer\Documents\iMacros\Datasources\\Wage-List.csv"
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}

TAB OPEN
TAB T={{!LOOP}}
URL GOTO=http://nregade1.nic.in/netnrega/view_wa ... ?flag=UNSK

TAG POS=1 TYPE=SELECT ATTR=NAME:ddlFinYr CONTENT=%2017-2018
WAIT SECONDS=6
TAG POS=1 TYPE=SELECT FORM=ID:form1 ATTR=ID:ddl_sel CONTENT=%*{{!COL1}}*

'ONPRINT P=* BUTTON=PRINT
'PRINT
chivracq
Posts: 9715
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Open Multi Tab

Post by chivracq » Tue Mar 06, 2018 2:31 pm

Tamilselvan wrote:Now i tried multi tab open in loop. But not able to print.

Code: Select all

VERSION BUILD=9030808 RECORDER=FX
TAB T=1

SET !TIMEOUT_STEP 0
SET !DATASOURCE "C:\Users\acer\Documents\iMacros\Datasources\\Wage-List.csv"
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}

TAB OPEN
TAB T={{!LOOP}}
URL GOTO=http://nregade1.nic.in/netnrega/view_wagelist.aspx?flag=UNSK

TAG POS=1 TYPE=SELECT ATTR=NAME:ddlFinYr CONTENT=%2017-2018
WAIT SECONDS=6
TAG POS=1 TYPE=SELECT FORM=ID:form1 ATTR=ID:ddl_sel CONTENT=%*{{!COL1}}*

'ONPRINT P=* BUTTON=PRINT
'PRINT
Ah OK, "TAB OPEN + TAB T={{!LOOP}}", so that means that 'TAB_1' remains 'TAB_1' for the whole Looping, at least in v9.0.3 for FF. Yeah, good...

Tja, "not able to print", yep normal, 'PRINT' is not supported on FF, use your iMB v11.5 then I would say, where 'PRINT' is supported...
Or find the/a Workaround, ah-ah...! And there is very probably more than the one I have in mind...

You have a Mix of Single and Double Backslashes btw in your Path for '!DATASOURCE'... No big deal on Win where both Syntaxes are supported, but it doesn't look "clean"..., and you would encounter some unexpected Behaviour if you were to convert your Macro to a '.js' Script or using some Var for the Path as the Backslash is (also) the Escape Char...
- (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