fadetoblack wrote:Understood , I will get that done .
Oh yeah, sorry, I had noticed indeed that you had updated all your previous Threads after my last Post, nearly IRT ah-ah, I'll respond/follow up where "necessary", there was one "Solution" that I didn't understand, but I would need for each to go "digging" again into the Thread, which takes some time, and new Threads keep coming in, so I didn't find the Time yet, but I guess you would like some Feedback/Answer about this current Thread which must have your "Focus" at this moment I reckon...
Well, I said that it was not very complicated but that you had chosen a "cumbersome" Path, ah-ah...!
Well, one thing you have to realize, is that the "URL GOTO=imacros://run/?m=#1.iim" Syntax you are using is Officially not supported by iMacros TechSupport and meant more like a Workaround to '.iim' Scripts like 'iimPlay()' in '.js' Scripts.
And there is a BIG Difference between both Syntaxes, when some '.js' Script is launching an '.iim' Macro (created on the fly in the '.js' Script or as an '.iim' File), the '.js' Script will wait for the '.iim' Macro to finish, to retrieve some Return Code and the Content of '!EXTRACT' eventually before processing any further Commands while when a Macro is launched from the 'URL GOTO=imacros://run/?m=' Syntax, it doesn't know anything from what happened before, all (Built-in) Vars get reset and once finished, it will never return to the Macro that launched it...
Which means that your whole Script is actually only 1 Block of Code:
Code: Select all
SET !VAR2 EVAL("var s=\"{{!EXTRACT}}\"; if(s.match(\"example\")){url=\"imacros://run/?m=#1.iim\";} else url=\"imacros://run/?m=#2.iim\"; url;")
URL GOTO={{!VAR2}}
TAG POS=2 TYPE=A ATTR=ID:username_copy EXTRACT=TXT
SET !VAR2 EVAL("var s=\"{{!EXTRACT}}\"; if(s.match(\"example\")){url=\"imacros://run/?m=#1.iim\";} else url=\"imacros://run/?m=#2.iim\"; url;")
URL GOTO={{!VAR2}}
Everything after the first 'URL GOTO' will never be executed...!
So I don't know where you got your "This code is correct in principle..." from, but that cannot be true, ah-ah...!
The 'run/?m=' Syntax is OK for 2 or 3 "Jumps" but I find it very cumbersome in your Case, with 5 Jumps apparently which become 10 Jumps as you each time need to split your Logic into 2 Macros, and even if you think you are calling 5 times '#1.iim', you still need 5 Copies of the same Macro with each time a different Name as it will then each time have to call another Macro for the complete Workflow that your Scenario implies. And same thing with '#2.iim', ah-ah...! Very cumbersome, I told you...
And if anything "happens" in one of the 15 Macros involved in total (ah-ah...!), it will be a complete hassle to debug and once you modify stg in one Macro, you probably need to replicate that Change in the 4 similar Macros, pffff..., Maintenance Headache...!
The logical way in your Case would be to have a Main '.js' Script that will handle all the Conditional Workflow, with one first '.iim' Macro first doing the 5 Extracts and returning the Content to the '.js' Script that will then launch the 5x '#1.iim' or '#2.iim' Macros depending on each Extract.
And depending on what you do in those 2 '#1.iim'/'#2.iim' Macros, and especially how similar/different they are from each other, it might be possible to embed them directly into one Main '.iim' Macro and to activate/deactivate them alternately using 'EVAL()', hum, could be a Solution, but I don't have "the complete picture" of what you are doing or want to do...
I have developed "Techniques" to avoid '.js' Scripts, which implies cumbersome Solutions sometimes but from what I saw from your previous Threads, you've already used '.js' Scripts, so there is no need for you to follow the same path, especially if I find your path cumbersome, I'm normally the last Person to have such an Opinion", ah-ah...! Pure '.iim' fits my Needs but I would think you can better embrace a '.js' Script from the Info I've got that you've provided...
>>>
Hum, and concerning your '15 Macros' cumbersome Scenario, I would already have a "Solution" to lower that Number to 2 or 3 Macros, but pfff..., it's actually applying Workaround on Workaround, and you would need to find them by yourself, plus in this Case, adding some heavy Logging + Level of Checks to ensure Reliability and Debugging in case of Pb of the whole Implementation... (But again, it is very cumbersome, more or less recreating Functionality that exists Standard in iMacros with '.js' Scripts...)
Well, you can always have a look at
the following Thread where I explained a bit what I have in mind... (Option Nb_4.)
- (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...