a2515125 wrote:Code: Select all
FF 50.1/windows 10 / imacros 8.9.7
when my main script extracts data through pages, it would be stuck by "Error displaying this page" after turning several pages
so I make another .iim to run BACK Command whenever my main script detects "Error displaying this page" pop-up again
but the imacros shows :
Code: Select all
wrong format of SET command, line 13 (Error code: -910)
with my eval statement that I
am sure the problem is here
{var x='imacros://run/?m=carousell\工具\BACKPAGE1.iim';}
I would be appreciated if chivracq can help or someone knows how to rewrite my eval statement. Big Thanks!!!
Code: Select all
SET !REPLAYSPEED FAST
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
SET !TIMEOUT_PAGE 3
SET !TIMEOUT_STEP 0
SET !LOOP -9999
CLEAR
'call BACKPAGE1.iim, if fails to extract data, move to previous page and extract again
SET !EXTRACT NULL
TAG POS=1 TYPE=H1 ATTR=CLASS:text-center EXTRACT=TXT
SET BACKPAGE EVAL("var s='{{!EXTRACT}}'; if(s=='Error displaying this page') {var x='imacros://run/?m=carousell\工具\BACKPAGE1.iim';} else{var x=' ';} x;")
URL GOTO={{BACKPAGE}}
Hum..., I don't know where you find all those unsupported Tricks, I guess I must have posted this one several years ago..., but hum..., using Trick on Trick on Workaround on Trick makes the whole Workflow of your overall Script(s) very cumbersome... It's OK for me because I will always find a Solution/Workaround, but in your case, you could better start considering using a '.js' Script "orchestrating" the complete Workflow of your Scripting from just one main '.js' Script...
Calling an '.iim' Script from an '.iim' Script with that 'imacros://run/?m=' Syntax has sometimes some unpredictable Side-Effects, with Focus and etc..., and you'll need from your 'BACKPAGE1.iim' to call back the first Macro, which will have lost the Count for the Loop and will screw your Modulo[40] "Thing"...
If the Page you need to go back has a "distinct" URL, you could otherwise better conditionally go to that URL with 'URL GOTO' directly rather than calling another Macro...
But OK, the Cause of your current RuntimeError, I suspect, are the Backslashes in your Path that need to be escaped..., or you can try with Forward Slashes, maybe Doubled..., or to declare the Path to that Macro in some apart Var outside the 'EVAL()'. Or place that Macro in your Default 'Macros' Folder, then you don't need to specify its complete Path...
- (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...