Hack for running multiple iMacros in random fashion











up vote
0
down vote

favorite
1












I have 20 iMacros (for browser) and they are specific to different URLs. I run these macros one after another, and then repeat or loop all of them 10 times.



But within that loop, i need those 20 macros to run in a random fashion and not as in list.



What I tried:



I loop one Macro named COLLECTION.iim 10 times using .js file



var i;
for (i = 1; i <= 10; i++)
{
iimSet("loop", i);
iimPlay("COLLECTION.iim");
}


COLLECTION.iim contains the following randomise code for 20 imacros



CMDLINE !DATASOURCE C:LIST.txt
SET !VAR1 EVAL("var randomNumber = Math.floor(Math.random() * 20) + 1; randomNumber;")
SET !DATASOURCE_LINE {{!VAR1}}
URL GOTO=imacros://run/?m={{!COL1}}


LIST.txt contains those 20 macro names written one per each line
like



1.iim
2.iim
.
.
20.iim


But this is not working. If there is any other better or easier way, let me know too.










share|improve this question
























  • I am not that familiar with javascript,but perhaps u can show all code perhaps in www.pastebin.com if it's long.Or from the command line. eg I can enter the code u've given, and show the error I get. i.imgur.com/oaFDg9z.png Can you give the exact contents of each file. Not summarized but exact,and the error you get, so that anybody trying to run it can reproduce the exact same error? I've shown the contents of every file by doing e.g. type COLLECTION.iim etc but perhaps you can show the contents. perhaps pasting each file to pastebin.com so anybody(even a newb) can reproduce the error
    – barlop
    Jul 24 '14 at 17:13










  • i sorry if i didnt explain well but actually this is related to iMacros (search this word) its actually a automation language. I thought u might be knowing about it. It also has a javascript feature and thats how we can run javascript in it. This is not batch related question. Sorry for that. The error i am getting is from imacros engine .imacros has list of error codes too but the error which comes in this case is generic unknonwn I hope someone looks & helps with this question :( (if u know anyone who knows imacros..kindly give them a holler abt it). Thanks very much again for all your help
    – SuperUserMan
    Jul 24 '14 at 18:03










  • I know it's not batch..I just meant that if I can see the exact files and run it reproducing the same error that you do then there's a chance I might figure it out or have some ideas, anyhow I have to go out now but I'd note that normally u'd want stackoverflow.com for a programming question.I don't know whether your question is jscript or javascript.but you'd want to tag it accordingly.I did look up imacros b4, and it showed it used in the context of a webpage, though you didn't indicate that so maybe yours isn't in that context.Either way,Stackoverflow is better and meant for programming qs.
    – barlop
    Jul 24 '14 at 18:07












  • hey @barlop , can you have a look at this as script is your thing :) superuser.com/questions/798906/…
    – SuperUserMan
    Aug 16 '14 at 21:09










  • @macroscripts can you please help with this?
    – SuperUserMan
    Mar 18 '16 at 21:06















up vote
0
down vote

favorite
1












I have 20 iMacros (for browser) and they are specific to different URLs. I run these macros one after another, and then repeat or loop all of them 10 times.



But within that loop, i need those 20 macros to run in a random fashion and not as in list.



What I tried:



I loop one Macro named COLLECTION.iim 10 times using .js file



var i;
for (i = 1; i <= 10; i++)
{
iimSet("loop", i);
iimPlay("COLLECTION.iim");
}


COLLECTION.iim contains the following randomise code for 20 imacros



CMDLINE !DATASOURCE C:LIST.txt
SET !VAR1 EVAL("var randomNumber = Math.floor(Math.random() * 20) + 1; randomNumber;")
SET !DATASOURCE_LINE {{!VAR1}}
URL GOTO=imacros://run/?m={{!COL1}}


LIST.txt contains those 20 macro names written one per each line
like



1.iim
2.iim
.
.
20.iim


But this is not working. If there is any other better or easier way, let me know too.










share|improve this question
























  • I am not that familiar with javascript,but perhaps u can show all code perhaps in www.pastebin.com if it's long.Or from the command line. eg I can enter the code u've given, and show the error I get. i.imgur.com/oaFDg9z.png Can you give the exact contents of each file. Not summarized but exact,and the error you get, so that anybody trying to run it can reproduce the exact same error? I've shown the contents of every file by doing e.g. type COLLECTION.iim etc but perhaps you can show the contents. perhaps pasting each file to pastebin.com so anybody(even a newb) can reproduce the error
    – barlop
    Jul 24 '14 at 17:13










  • i sorry if i didnt explain well but actually this is related to iMacros (search this word) its actually a automation language. I thought u might be knowing about it. It also has a javascript feature and thats how we can run javascript in it. This is not batch related question. Sorry for that. The error i am getting is from imacros engine .imacros has list of error codes too but the error which comes in this case is generic unknonwn I hope someone looks & helps with this question :( (if u know anyone who knows imacros..kindly give them a holler abt it). Thanks very much again for all your help
    – SuperUserMan
    Jul 24 '14 at 18:03










  • I know it's not batch..I just meant that if I can see the exact files and run it reproducing the same error that you do then there's a chance I might figure it out or have some ideas, anyhow I have to go out now but I'd note that normally u'd want stackoverflow.com for a programming question.I don't know whether your question is jscript or javascript.but you'd want to tag it accordingly.I did look up imacros b4, and it showed it used in the context of a webpage, though you didn't indicate that so maybe yours isn't in that context.Either way,Stackoverflow is better and meant for programming qs.
    – barlop
    Jul 24 '14 at 18:07












  • hey @barlop , can you have a look at this as script is your thing :) superuser.com/questions/798906/…
    – SuperUserMan
    Aug 16 '14 at 21:09










  • @macroscripts can you please help with this?
    – SuperUserMan
    Mar 18 '16 at 21:06













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I have 20 iMacros (for browser) and they are specific to different URLs. I run these macros one after another, and then repeat or loop all of them 10 times.



But within that loop, i need those 20 macros to run in a random fashion and not as in list.



What I tried:



I loop one Macro named COLLECTION.iim 10 times using .js file



var i;
for (i = 1; i <= 10; i++)
{
iimSet("loop", i);
iimPlay("COLLECTION.iim");
}


COLLECTION.iim contains the following randomise code for 20 imacros



CMDLINE !DATASOURCE C:LIST.txt
SET !VAR1 EVAL("var randomNumber = Math.floor(Math.random() * 20) + 1; randomNumber;")
SET !DATASOURCE_LINE {{!VAR1}}
URL GOTO=imacros://run/?m={{!COL1}}


LIST.txt contains those 20 macro names written one per each line
like



1.iim
2.iim
.
.
20.iim


But this is not working. If there is any other better or easier way, let me know too.










share|improve this question















I have 20 iMacros (for browser) and they are specific to different URLs. I run these macros one after another, and then repeat or loop all of them 10 times.



But within that loop, i need those 20 macros to run in a random fashion and not as in list.



What I tried:



I loop one Macro named COLLECTION.iim 10 times using .js file



var i;
for (i = 1; i <= 10; i++)
{
iimSet("loop", i);
iimPlay("COLLECTION.iim");
}


COLLECTION.iim contains the following randomise code for 20 imacros



CMDLINE !DATASOURCE C:LIST.txt
SET !VAR1 EVAL("var randomNumber = Math.floor(Math.random() * 20) + 1; randomNumber;")
SET !DATASOURCE_LINE {{!VAR1}}
URL GOTO=imacros://run/?m={{!COL1}}


LIST.txt contains those 20 macro names written one per each line
like



1.iim
2.iim
.
.
20.iim


But this is not working. If there is any other better or easier way, let me know too.







macros firefox-extensions javascript imacros






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 26 '14 at 6:09









slhck

158k47436461




158k47436461










asked Jul 24 '14 at 5:42









SuperUserMan

116419




116419












  • I am not that familiar with javascript,but perhaps u can show all code perhaps in www.pastebin.com if it's long.Or from the command line. eg I can enter the code u've given, and show the error I get. i.imgur.com/oaFDg9z.png Can you give the exact contents of each file. Not summarized but exact,and the error you get, so that anybody trying to run it can reproduce the exact same error? I've shown the contents of every file by doing e.g. type COLLECTION.iim etc but perhaps you can show the contents. perhaps pasting each file to pastebin.com so anybody(even a newb) can reproduce the error
    – barlop
    Jul 24 '14 at 17:13










  • i sorry if i didnt explain well but actually this is related to iMacros (search this word) its actually a automation language. I thought u might be knowing about it. It also has a javascript feature and thats how we can run javascript in it. This is not batch related question. Sorry for that. The error i am getting is from imacros engine .imacros has list of error codes too but the error which comes in this case is generic unknonwn I hope someone looks & helps with this question :( (if u know anyone who knows imacros..kindly give them a holler abt it). Thanks very much again for all your help
    – SuperUserMan
    Jul 24 '14 at 18:03










  • I know it's not batch..I just meant that if I can see the exact files and run it reproducing the same error that you do then there's a chance I might figure it out or have some ideas, anyhow I have to go out now but I'd note that normally u'd want stackoverflow.com for a programming question.I don't know whether your question is jscript or javascript.but you'd want to tag it accordingly.I did look up imacros b4, and it showed it used in the context of a webpage, though you didn't indicate that so maybe yours isn't in that context.Either way,Stackoverflow is better and meant for programming qs.
    – barlop
    Jul 24 '14 at 18:07












  • hey @barlop , can you have a look at this as script is your thing :) superuser.com/questions/798906/…
    – SuperUserMan
    Aug 16 '14 at 21:09










  • @macroscripts can you please help with this?
    – SuperUserMan
    Mar 18 '16 at 21:06


















  • I am not that familiar with javascript,but perhaps u can show all code perhaps in www.pastebin.com if it's long.Or from the command line. eg I can enter the code u've given, and show the error I get. i.imgur.com/oaFDg9z.png Can you give the exact contents of each file. Not summarized but exact,and the error you get, so that anybody trying to run it can reproduce the exact same error? I've shown the contents of every file by doing e.g. type COLLECTION.iim etc but perhaps you can show the contents. perhaps pasting each file to pastebin.com so anybody(even a newb) can reproduce the error
    – barlop
    Jul 24 '14 at 17:13










  • i sorry if i didnt explain well but actually this is related to iMacros (search this word) its actually a automation language. I thought u might be knowing about it. It also has a javascript feature and thats how we can run javascript in it. This is not batch related question. Sorry for that. The error i am getting is from imacros engine .imacros has list of error codes too but the error which comes in this case is generic unknonwn I hope someone looks & helps with this question :( (if u know anyone who knows imacros..kindly give them a holler abt it). Thanks very much again for all your help
    – SuperUserMan
    Jul 24 '14 at 18:03










  • I know it's not batch..I just meant that if I can see the exact files and run it reproducing the same error that you do then there's a chance I might figure it out or have some ideas, anyhow I have to go out now but I'd note that normally u'd want stackoverflow.com for a programming question.I don't know whether your question is jscript or javascript.but you'd want to tag it accordingly.I did look up imacros b4, and it showed it used in the context of a webpage, though you didn't indicate that so maybe yours isn't in that context.Either way,Stackoverflow is better and meant for programming qs.
    – barlop
    Jul 24 '14 at 18:07












  • hey @barlop , can you have a look at this as script is your thing :) superuser.com/questions/798906/…
    – SuperUserMan
    Aug 16 '14 at 21:09










  • @macroscripts can you please help with this?
    – SuperUserMan
    Mar 18 '16 at 21:06
















I am not that familiar with javascript,but perhaps u can show all code perhaps in www.pastebin.com if it's long.Or from the command line. eg I can enter the code u've given, and show the error I get. i.imgur.com/oaFDg9z.png Can you give the exact contents of each file. Not summarized but exact,and the error you get, so that anybody trying to run it can reproduce the exact same error? I've shown the contents of every file by doing e.g. type COLLECTION.iim etc but perhaps you can show the contents. perhaps pasting each file to pastebin.com so anybody(even a newb) can reproduce the error
– barlop
Jul 24 '14 at 17:13




I am not that familiar with javascript,but perhaps u can show all code perhaps in www.pastebin.com if it's long.Or from the command line. eg I can enter the code u've given, and show the error I get. i.imgur.com/oaFDg9z.png Can you give the exact contents of each file. Not summarized but exact,and the error you get, so that anybody trying to run it can reproduce the exact same error? I've shown the contents of every file by doing e.g. type COLLECTION.iim etc but perhaps you can show the contents. perhaps pasting each file to pastebin.com so anybody(even a newb) can reproduce the error
– barlop
Jul 24 '14 at 17:13












i sorry if i didnt explain well but actually this is related to iMacros (search this word) its actually a automation language. I thought u might be knowing about it. It also has a javascript feature and thats how we can run javascript in it. This is not batch related question. Sorry for that. The error i am getting is from imacros engine .imacros has list of error codes too but the error which comes in this case is generic unknonwn I hope someone looks & helps with this question :( (if u know anyone who knows imacros..kindly give them a holler abt it). Thanks very much again for all your help
– SuperUserMan
Jul 24 '14 at 18:03




i sorry if i didnt explain well but actually this is related to iMacros (search this word) its actually a automation language. I thought u might be knowing about it. It also has a javascript feature and thats how we can run javascript in it. This is not batch related question. Sorry for that. The error i am getting is from imacros engine .imacros has list of error codes too but the error which comes in this case is generic unknonwn I hope someone looks & helps with this question :( (if u know anyone who knows imacros..kindly give them a holler abt it). Thanks very much again for all your help
– SuperUserMan
Jul 24 '14 at 18:03












I know it's not batch..I just meant that if I can see the exact files and run it reproducing the same error that you do then there's a chance I might figure it out or have some ideas, anyhow I have to go out now but I'd note that normally u'd want stackoverflow.com for a programming question.I don't know whether your question is jscript or javascript.but you'd want to tag it accordingly.I did look up imacros b4, and it showed it used in the context of a webpage, though you didn't indicate that so maybe yours isn't in that context.Either way,Stackoverflow is better and meant for programming qs.
– barlop
Jul 24 '14 at 18:07






I know it's not batch..I just meant that if I can see the exact files and run it reproducing the same error that you do then there's a chance I might figure it out or have some ideas, anyhow I have to go out now but I'd note that normally u'd want stackoverflow.com for a programming question.I don't know whether your question is jscript or javascript.but you'd want to tag it accordingly.I did look up imacros b4, and it showed it used in the context of a webpage, though you didn't indicate that so maybe yours isn't in that context.Either way,Stackoverflow is better and meant for programming qs.
– barlop
Jul 24 '14 at 18:07














hey @barlop , can you have a look at this as script is your thing :) superuser.com/questions/798906/…
– SuperUserMan
Aug 16 '14 at 21:09




hey @barlop , can you have a look at this as script is your thing :) superuser.com/questions/798906/…
– SuperUserMan
Aug 16 '14 at 21:09












@macroscripts can you please help with this?
– SuperUserMan
Mar 18 '16 at 21:06




@macroscripts can you please help with this?
– SuperUserMan
Mar 18 '16 at 21:06










1 Answer
1






active

oldest

votes

















up vote
0
down vote













He's trying to do the same thing I am.



Combine Loop: https://stackoverflow.com/questions/17959454/how-to-loop-only-a-series-of-steps-in-imacros



with Random: https://stackoverflow.com/questions/31773368/imacros-random-choose



Your issue might be similar (or same as): https://stackoverflow.com/questions/19519024/imacros-randomly-stops-in-a-loop






share|improve this answer























  • While SO's a sister site, links can still go away. Could you perhaps show how this fits together and what you're doing is?
    – Journeyman Geek
    Dec 10 '15 at 5:41






  • 2




    Is this even meant as an attempt to answer the question, or are you just pointing out similar questions and expressing an interest in seeing a solution?
    – G-Man
    Dec 10 '15 at 6:54











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f787262%2fhack-for-running-multiple-imacros-in-random-fashion%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













He's trying to do the same thing I am.



Combine Loop: https://stackoverflow.com/questions/17959454/how-to-loop-only-a-series-of-steps-in-imacros



with Random: https://stackoverflow.com/questions/31773368/imacros-random-choose



Your issue might be similar (or same as): https://stackoverflow.com/questions/19519024/imacros-randomly-stops-in-a-loop






share|improve this answer























  • While SO's a sister site, links can still go away. Could you perhaps show how this fits together and what you're doing is?
    – Journeyman Geek
    Dec 10 '15 at 5:41






  • 2




    Is this even meant as an attempt to answer the question, or are you just pointing out similar questions and expressing an interest in seeing a solution?
    – G-Man
    Dec 10 '15 at 6:54















up vote
0
down vote













He's trying to do the same thing I am.



Combine Loop: https://stackoverflow.com/questions/17959454/how-to-loop-only-a-series-of-steps-in-imacros



with Random: https://stackoverflow.com/questions/31773368/imacros-random-choose



Your issue might be similar (or same as): https://stackoverflow.com/questions/19519024/imacros-randomly-stops-in-a-loop






share|improve this answer























  • While SO's a sister site, links can still go away. Could you perhaps show how this fits together and what you're doing is?
    – Journeyman Geek
    Dec 10 '15 at 5:41






  • 2




    Is this even meant as an attempt to answer the question, or are you just pointing out similar questions and expressing an interest in seeing a solution?
    – G-Man
    Dec 10 '15 at 6:54













up vote
0
down vote










up vote
0
down vote









He's trying to do the same thing I am.



Combine Loop: https://stackoverflow.com/questions/17959454/how-to-loop-only-a-series-of-steps-in-imacros



with Random: https://stackoverflow.com/questions/31773368/imacros-random-choose



Your issue might be similar (or same as): https://stackoverflow.com/questions/19519024/imacros-randomly-stops-in-a-loop






share|improve this answer














He's trying to do the same thing I am.



Combine Loop: https://stackoverflow.com/questions/17959454/how-to-loop-only-a-series-of-steps-in-imacros



with Random: https://stackoverflow.com/questions/31773368/imacros-random-choose



Your issue might be similar (or same as): https://stackoverflow.com/questions/19519024/imacros-randomly-stops-in-a-loop







share|improve this answer














share|improve this answer



share|improve this answer








edited May 23 '17 at 12:41









Community

1




1










answered Dec 9 '15 at 21:30









Marie Goodart

1




1












  • While SO's a sister site, links can still go away. Could you perhaps show how this fits together and what you're doing is?
    – Journeyman Geek
    Dec 10 '15 at 5:41






  • 2




    Is this even meant as an attempt to answer the question, or are you just pointing out similar questions and expressing an interest in seeing a solution?
    – G-Man
    Dec 10 '15 at 6:54


















  • While SO's a sister site, links can still go away. Could you perhaps show how this fits together and what you're doing is?
    – Journeyman Geek
    Dec 10 '15 at 5:41






  • 2




    Is this even meant as an attempt to answer the question, or are you just pointing out similar questions and expressing an interest in seeing a solution?
    – G-Man
    Dec 10 '15 at 6:54
















While SO's a sister site, links can still go away. Could you perhaps show how this fits together and what you're doing is?
– Journeyman Geek
Dec 10 '15 at 5:41




While SO's a sister site, links can still go away. Could you perhaps show how this fits together and what you're doing is?
– Journeyman Geek
Dec 10 '15 at 5:41




2




2




Is this even meant as an attempt to answer the question, or are you just pointing out similar questions and expressing an interest in seeing a solution?
– G-Man
Dec 10 '15 at 6:54




Is this even meant as an attempt to answer the question, or are you just pointing out similar questions and expressing an interest in seeing a solution?
– G-Man
Dec 10 '15 at 6:54


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f787262%2fhack-for-running-multiple-imacros-in-random-fashion%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Aardman Animations

Are they similar matrix

“minimization” problem in Euclidean space related to orthonormal basis