Mixing tab numbers

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Mixing tab numbers

by sc4rface on Tue Jan 23, 2018 2:59 pm

Hi guys!

I got small problem with my script. I spend five hours with this shit, but i don't know how can i repair my code.

I have problem with tabs indexes. So i opening new tabs inside javascript loop and setting url goto command for execute url from file.

Unfortunately, a blank page about blank appears unfortunately. In addition, the TAB T = n command stops working. Three cards are open and the TAB T = 3 command does not go to this card. How to fix it?

Code: Select all

var closeTabs = "CODE:";
closeTabs += "TAB CLOSEALLOTHERS" + "\n";
iimPlay(closeTabs);
for (id = 1; id <= 1; id++) {
var load =  "CODE:";
load += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\accounts.txt" + "\n";
load += "SET !DATASOURCE_COLUMNS 1" + "\n";
load += "SET !DATASOURCE_LINE "+id+"" + "\n";
load += "SET !EXTRACT_TEST_POPUP NO" + "\n";
load += "SET !EXTRACT {{!COL1}}" + "\n";
iimPlay(load);
var account = iimGetLastExtract(0);
var setUrl = "CODE:";
setUrl += "TAB T=1" + "\n";
setUrl += "URL GOTO="+account+"" + "\n";
setUrl += "WAIT SECONDS=2" + "\n";
iimPlay(setUrl);
   for(link = 1; link <= 3; link++) {
      var ytSource = "CODE:";
      ytSource += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\sources.txt" + "\n";
      ytSource += "SET !DATASOURCE_COLUMNS 1" + "\n";
      ytSource += "SET !DATASOURCE_LINE "+link+"" + "\n";
      ytSource += "SET !EXTRACT_TEST_POPUP NO" + "\n";
      ytSource += "SET !EXTRACT {{!COL1}}" + "\n";
      iimPlay(ytSource);
      var source = iimGetLastExtract(0);
      var openTab = "CODE:";
      openTab += "TAB OPEN" + "\n";
      openTab += "TAB T="+link+"" + "\n";
      openTab += "URL GOTO="+source+"" + "\n";
      openTab += "WAIT SECONDS=1" + "\n";
      openTab += "TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=CLASS:ytp-play-button<SP>ytp-button" + "\n";
      openTab += "WAIT SECONDS=1" + "\n";
      iimPlay(openTab);
   }
}

sc4rface
 
Posts: 3
Joined: Tue Jan 16, 2018 2:03 am

Re: Mixing tab numbers

by chivracq on Tue Jan 23, 2018 3:41 pm

sc4rface wrote:Hi guys!

I got small problem with my script. I spend five hours with this shit, but i don't know how can i repair my code.

I have problem with tabs indexes. So i opening new tabs inside javascript loop and setting url goto command for execute url from file.

Unfortunately, a blank page about blank appears unfortunately. In addition, the TAB T = n command stops working. Three cards are open and the TAB T = 3 command does not go to this card. How to fix it?

Code: Select all
var closeTabs = "CODE:";
closeTabs += "TAB CLOSEALLOTHERS" + "\n";
iimPlay(closeTabs);
for (id = 1; id <= 1; id++) {
var load =  "CODE:";
load += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\accounts.txt" + "\n";
load += "SET !DATASOURCE_COLUMNS 1" + "\n";
load += "SET !DATASOURCE_LINE "+id+"" + "\n";
load += "SET !EXTRACT_TEST_POPUP NO" + "\n";
load += "SET !EXTRACT {{!COL1}}" + "\n";
iimPlay(load);
var account = iimGetLastExtract(0);
var setUrl = "CODE:";
setUrl += "TAB T=1" + "\n";
setUrl += "URL GOTO="+account+"" + "\n";
setUrl += "WAIT SECONDS=2" + "\n";
iimPlay(setUrl);
   for(link = 1; link <= 3; link++) {
      var ytSource = "CODE:";
      ytSource += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\sources.txt" + "\n";
      ytSource += "SET !DATASOURCE_COLUMNS 1" + "\n";
      ytSource += "SET !DATASOURCE_LINE "+link+"" + "\n";
      ytSource += "SET !EXTRACT_TEST_POPUP NO" + "\n";
      ytSource += "SET !EXTRACT {{!COL1}}" + "\n";
      iimPlay(ytSource);
      var source = iimGetLastExtract(0);
      var openTab = "CODE:";
      openTab += "TAB OPEN" + "\n";
      openTab += "TAB T="+link+"" + "\n";
      openTab += "URL GOTO="+source+"" + "\n";
      openTab += "WAIT SECONDS=1" + "\n";
      openTab += "TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=CLASS:ytp-play-button<SP>ytp-button" + "\n";
      openTab += "WAIT SECONDS=1" + "\n";
      iimPlay(openTab);
   }
}


Hum..., no use to try to help you again I guess..., as you never followed up on your first Thread... :cry:
OK, fair enough..., and good luck with other (Advanced) Users... 8)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6687
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Mixing tab numbers

by sc4rface on Tue Jan 23, 2018 4:12 pm

chivracq wrote:
sc4rface wrote:Hi guys!

I got small problem with my script. I spend five hours with this shit, but i don't know how can i repair my code.

I have problem with tabs indexes. So i opening new tabs inside javascript loop and setting url goto command for execute url from file.

Unfortunately, a blank page about blank appears unfortunately. In addition, the TAB T = n command stops working. Three cards are open and the TAB T = 3 command does not go to this card. How to fix it?

Code: Select all
var closeTabs = "CODE:";
closeTabs += "TAB CLOSEALLOTHERS" + "\n";
iimPlay(closeTabs);
for (id = 1; id <= 1; id++) {
var load =  "CODE:";
load += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\accounts.txt" + "\n";
load += "SET !DATASOURCE_COLUMNS 1" + "\n";
load += "SET !DATASOURCE_LINE "+id+"" + "\n";
load += "SET !EXTRACT_TEST_POPUP NO" + "\n";
load += "SET !EXTRACT {{!COL1}}" + "\n";
iimPlay(load);
var account = iimGetLastExtract(0);
var setUrl = "CODE:";
setUrl += "TAB T=1" + "\n";
setUrl += "URL GOTO="+account+"" + "\n";
setUrl += "WAIT SECONDS=2" + "\n";
iimPlay(setUrl);
   for(link = 1; link <= 3; link++) {
      var ytSource = "CODE:";
      ytSource += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\sources.txt" + "\n";
      ytSource += "SET !DATASOURCE_COLUMNS 1" + "\n";
      ytSource += "SET !DATASOURCE_LINE "+link+"" + "\n";
      ytSource += "SET !EXTRACT_TEST_POPUP NO" + "\n";
      ytSource += "SET !EXTRACT {{!COL1}}" + "\n";
      iimPlay(ytSource);
      var source = iimGetLastExtract(0);
      var openTab = "CODE:";
      openTab += "TAB OPEN" + "\n";
      openTab += "TAB T="+link+"" + "\n";
      openTab += "URL GOTO="+source+"" + "\n";
      openTab += "WAIT SECONDS=1" + "\n";
      openTab += "TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=CLASS:ytp-play-button<SP>ytp-button" + "\n";
      openTab += "WAIT SECONDS=1" + "\n";
      iimPlay(openTab);
   }
}


Hum..., no use to try to help you again I guess..., as you never followed up on your first Thread... :cry:
OK, fair enough..., and good luck with other (Advanced) Users... 8)


Yes, not cut that entry, because he found the idea himself. However, you can do it, but just in case. Anyway, I can not do it here.
sc4rface
 
Posts: 3
Joined: Tue Jan 16, 2018 2:03 am

Re: Mixing tab numbers

by chivracq on Wed Jan 24, 2018 10:40 am

sc4rface wrote:Yes, not cut that entry, because he found the idea himself. However, you can do it, but just in case. Anyway, I can not do it here.

:?

>>>

For those interested, parallel Thread on SOF:
- Mixing tab numbers
(No Answer(s) yet...)

[You should be careful btw @sc4rface, I think it's against the SOF Forum Rules to create more than one (personal) Account on their Forum...]
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6687
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Firefox

Who is online

Users browsing this forum: No registered users and 8 guests

-->