Torsten156 wrote: ↑Wed Aug 05, 2020 11:42 am
I think I asked my question wrong. I don't mean calling the bookmark in a loop. I mean, how can I tell the call of the bookmark what value my LOOP should have in my script? And this via Commandline...
Yeah well, both your Thread Title and your OP were asking if it's
possible to loop a Script lunched from a Bookmark/Bookmarklet, so I answer that Qt... You didn't post any Script so it's a bit difficult to know what you are doing exactly and how, so I can only answer generically with some endless if-if-if Reasoning...
=> Can you post your both Scripts...?, both the '.bat' File and your "Bookmark" Script...?
And if you already know how to do the Looping, how do you do it...?, which Method do you use...?
"I don't mean calling the bookmark in a loop."
=> Yeah well, why not...? A Loop is a Loop, and calling the Bookmark in a Loop is a Way for looping your iMacros Script... Then indeed, telling iMacros the "How Many Times" to loop the Script is the next Qt, ah-ah...!, either "How Many" to loop, or for some "Infinite Looping", after "How Many Loops", when to stop...
Then for passing a Var or a Value from your '.bat' File to the Script, there are different Solutions...:
1- No Need because already handled if you handle the Looping directly already from the '.bat'/'.cmd'/'.ps' Script in a similar/adapted Way like other Advanced User @'The iMacros Guru' had provided for example in
this Thread...
He had gone for an Infinite Loop and breaking out with a Double 'goto', easy to modify the 'if' Condition for your Need, or there is probably some "for" Loop in 'cmd'...
2- Use the OS Clipboard to pass your Var, with for example 'clip.exe' from your '.bat' File, but there are many different Solutions like you can see for example
here and
here...
Then from the Macro, you can access the Clipboard using the '!CLIPBOARD' Var to set the Looping or to abort the Script after the "How Many Times" with some Conditional 'FAIL_IF_FOUND' or 'EVAL()' + 'MacroError()' or Toggling '!ERRORIGNORE', etc...
If the Looping is handled by JS from your Bookmark, I guess there is probably a Way to access the Clipboard in JS, or your iMacros Script could inject it in the HTML of the Page.
3- You could also pass that Var included in the FileName or the Path of your '.html' File/Bookmark, and iMacros can extract it through '!URLCURRENT' and 'EVAL()'.
4- You can also pass that Var/Value via some separate Online or Local Web-Page/Form or GoogleSheet for example.
... So like I said..., those are Generic if-if-if Solutions as you didn't post any Script...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...