Hum, Reply in 3 parts...
jaivee wrote: ↑Sun Sep 01, 2019 9:01 pm
Hi - thank you very much for your swift reply!! That's awesome
Fixed the code below and it seems to work like that, now
- the first XPATH extract the URL and the
- second xpath checks whether or not it is defined
Thanks also a lot for your explanation of the difference between not defined / not found (=> "#EANF#") and an empty string String (=> "") - very helpful!!
Code: Select all
TAG XPATH="//*[@id='itemsList']/ul/li[{{!LOOP}}]/div[2]/h2/a" EXTRACT=HREF
SET !VAR2 {{!EXTRACT}}
TAG XPATH="//*[@id='itemsList']/ul/li[{{!LOOP}}]/div[2]/p/b" EXTRACT=TXT
SET !VAR3 {{!EXTRACT}}
TAB T=1
SET !VAR1 EVAL("var link = '{{!VAR2}}'; var m = '{{!VAR3}}'.match(/\\bEANF\\b/ig);if (m) link ;else 'http://www.google.de';")
Hum, OK, so this Script works now... I'm a bit "surprised" to be honest, but OK...
The only Difference I notice with your previous Script is that you now use directly the "raw" 'link'/'!VAR2' without doing the 'split()' on the '?'...
You use a completely different Syntax than the one I use, I'm surprised the ';' before the 'else' is not causing some "strange" Results, but OK if it works...!
Your whole Implementation is still pretty cumbersome, I'm nearly "impressed" you managed to get it to work "this time", but it's not based on "Good/Best Principles", and your Script is still full of Double Spaces (known to cause Pb's) while I had corrected them, and you didn't try the Script I had posted for you...
OK, fair enough, but next time you'll ask a Qt, I'll "wait a bit" and let you "sweat" a "long-mini-bit" until you really get stuck...
(A bit worthless for me if I write a Script for you and you don't even try it... while I very-very rarely, hum, nearly never actually write Scripts for other Users, exactly for this "Reason"...
)
The Syntax I use in 'EVAL()' is yep maybe not as "sexy" as the one you use(d), but is (deliberately!) much easier to understand/adapt/reuse/extend AND TO DEBUG...!
Believe me, I'm used to write 'EVAL()' Statements for the Forum, I was the one who found out the Technique you are now using to implement your Conditional Logic...
(As one of my "Creative" Workarounds, ah-ah...!, for stg that was for several years supposedly not possible to do or very cumbersome, while it is now actually "the (only) Way to go"..., unless Users stay on FF55/56 to keep using v8.9.7 for FF and '.js' Scripts...
)
Hum, and "sorry" for my mini-"Rant", I realize I might be "bashing" you a bit hard, but you are actually doing "nearly perfectly" what I'm asking Users to do on the Forum:
Perfect Follow-up, and you "understand" what you "are doing" and "what I am saying", and you are "trying "Things" by yourself", and you even find a Sol by yourself...! Very good...!
You'll be doing "Great Things" with iMacros, ah-ah...!
Just got a bit "frustrated" that I wrote a Script for you, (which I do veeeeery rarely), and that you didn't even try, grrr...! But OK, I'm over it, ah-ah...!
>>>
jaivee wrote: ↑Sun Sep 01, 2019 9:01 pm
One last question: is it possible to have a iMacro code run within the "else" statement - like the below within else? It would save the detour via www.google.de,which is basically there at the moment to open a TAB and then also do the action and then close it again for those cases which have EANF (a bit lame, takes a lot of time, but it works)
Code: Select all
TAB OPEN
TAB T=2
URL GOTO={{!VAR1}}
I don't understand what you are asking / what you want exactly...
"possible to have a iMacro code run within the "else" statement?" doesn't really make sense to me...
Ask exactly what you want to do, and yep, I'll find a Solution...
>>>
jaivee wrote: ↑Sun Sep 01, 2019 9:01 pm
In regards to the Personal Edition: Yes, you are right, mostly Chromebook and iMacro Chrome extension
However, I bought the personal edition. Was not fully aware that Google Chrome has some limits. Nevermind, I hope the restrictions for the Google Chome Extension will be lifted soon. iMacro is a great software and for the longer scripts I will use it with my desktop computer. While at the same time will try to keep it as much for Chrome as possible.
Thanks again for your advice!!
"not fully aware that Google Chrome has some limits" + "I bought the personal edition":
=> Then, hum, why did you buy the 'PE' Version for CR (which also works for FF and IE) if it was not to unlock the Limits of the 'Free' Version...!?
And the Limits don't come from "Google Chrome", all 3 Browsers (CR/FF/IE) have a 'Free' + a 'PE' Versions.
And for all (iMacros) Versions/Browsers, that 'PE' Version is only available for Win32/64 as OS.
=> iMacros on MacOS and Linux doesn't have a 'PE' Version "at the moment"... (Used to, well..., used to have Local File-Access Functionality, and I don't know of any "Dev-Plans", there is no "Road-Map" published of what is being developed (I've asked, and I would like to know, as I'm trying to help Users...!
), I usually discover a new Version has been released when a User mentions a Version "I don't know"
in their FCI, ah-ah...!
And Android was never supported (for Local File-Access), + Chrome OS neither which is a very "new-Comer" in the OS-Landscape...
And I never used those 2 OS'es myself with iMacros..., so I never had a "Chance" to find a Way, and to look for a "Workaround"...
(Well, I do use 'TeamViewer' on an Android SmartPhone, to check if needed some Win7 + Win10 Laptops at Home, but pfff, last time I did it was maybe 3 or 4 years ago, ah-ah...!
, all my iMacros Scripts know exactly when to run and what to do exactly "if anything goes wrong", the "worst" Thing will be Loss of Int. Co. for a very long time, and I won't be able to connect either through 'TV'... And my whole Workflow "works", there is not much I could do on a mini-Screen on a SmartPhone, ah-ah...!
(I'm a "pretty" Advanced User with iMacros from /always/ finding a Way/Workaround, and very often even when TechSup say it's not possible, but OK, I need to be "motivated" and to need that Use for myself, to go "digging" into it, ah-ah...!
)
But hum, I would already have 3 Workarounds for you on Chrome OS to get iMacros with Full Functionality:
- Chrome OS RDP // TeamViewer // GetBot.
- (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...