Finding specific text on page using iMacros:

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
JamesD
Posts: 5
Joined: Sat Oct 19, 2019 3:34 pm

Finding specific text on page using iMacros:

Post by JamesD » Sat Oct 19, 2019 3:41 pm

So,

Using Firefox 55:IMacros 9.0.3.

I want to create a script which checks emails in https://haveibeenpwned.com/ and stops when an email is found.

The current script that I have is:

SET !DATASOURCE /root/Desktop/SecurityBreach.txt
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:EMAIL FORM=ACTION:/ ATTR=ID:Account CONTENT={{!COL1}}

Now I have tried using FAIL_IF_FOUND without success.

Is there a method that might work?
Last edited by JamesD on Sun Oct 20, 2019 10:12 pm, edited 2 times in total.
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Is this beyond the Scope of Imacros.

Post by chivracq » Sat Oct 19, 2019 6:03 pm

JamesD wrote:
Sat Oct 19, 2019 3:41 pm
So,

Using

Code: Select all

Firefox 55:IMacros 9.0.3.
I want to create a script which checks emails in https://haveibeenpwned.com/ and stops when an email is found.

The current script that I have is:

Code: Select all

SET !DATASOURCE /root/Desktop/SecurityBreach.txt
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:EMAIL FORM=ACTION:/ ATTR=ID:Account CONTENT={{!COL1}}
Now I have tried using FAIL_IF_FOUND without success.

Is there a method that might work?

Threads about "philosophical" Qt's belong to the 'General' Sub-Forum and not to one of the Browser specific Sub-Forums... :?

My 2cts:
Even if I don't think that a "Sentence" finishing with a Dot does qualify as a "Qt" and therefore its "Scope" is rather "Undefined" or at least subject to several Interpretations, which is maybe the subtle Intention of that "Sentence"... :?
But I would say, that iMacros (correct Spelling btw...!) is for Web-Automation, and anything that can be "done" in a Browser, can probably be automated using iMacros, and therefore any Qt pertaining to Web-Automation (specifically related to iMacros or not) would fall within "the Scope of iMacros"... 8)

But @OP, if you are starting the Discussion, what is your own Definition of "the Scope of iMacros", and can you give Examples of "within" and "beyond" that Scope...?, and maybe also applied to iMacros for FF specifically, as you seem to be a "Scope Specialist"...? 8)
We don't have many "Scope Specialists" on the Forum btw, (this is rather a Technical Forum, you know... :oops: ), so..., welcome...! :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
User avatar
thecoder2012
Posts: 359
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: Is this beyond the Scope of Imacros.

Post by thecoder2012 » Sat Oct 19, 2019 7:14 pm

JamesD wrote:
Sat Oct 19, 2019 3:41 pm
Is there a method that might work?
Yes. :D
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Is this beyond the Scope of Imacros.

Post by chivracq » Sat Oct 19, 2019 7:32 pm

thecoder2012 wrote:
Sat Oct 19, 2019 7:14 pm
JamesD wrote:
Sat Oct 19, 2019 3:41 pm
Is there a method that might work?
Yes. :D

Hum, @thecoder2012, I think your Answer is probably already "beyond the Scope" of this Thread... :shock:

But I guess you are rather a "Technical" Advanced User, and not much of a "Philosophical" User... :wink:
Like I mentioned to @OP, we unfortunately(?) don't have many Scope Specialists on the Forum..., which is a pity actually...! :(

EDIT:
Hum..., I'm trying to draw a conceptual Model :twisted: in which your Answer (@thecoder) could be "accepted" as "valid"..., and I think I have one Solution maybe... :D
Bare with me...! :P
But let's say that a Scope can be further modelized into 1 "main" Scope, that could contain at some Sub-Level(s), 1 or more Subscopes, then indeed, your Answer could indeed maybe qualify to being "Subscopic"..., which I'm nearly jealous of actually! (sorry...! :oops: ), first time ever I think on the Forum, that we get some "Subscopic" Answer/Solution, woaw!!, super cool...!! :D 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
JamesD
Posts: 5
Joined: Sat Oct 19, 2019 3:34 pm

Re: Is this beyond the Scope of Imacros.

Post by JamesD » Sun Oct 20, 2019 6:55 am

chivracq wrote:
Sat Oct 19, 2019 6:03 pm

Threads about "philosophical" Qt's belong to the 'General' Sub-Forum and not to one of the Browser specific Sub-Forums... :?

My 2cts:
Even if I don't think that a "Sentence" finishing with a Dot does qualify as a "Qt" and therefore its "Scope" is rather "Undefined" or at least subject to several Interpretations, which is maybe the subtle Intention of that "Sentence"... :?
But I would say, that iMacros (correct Spelling btw...!) is for Web-Automation, and anything that can be "done" in a Browser, can probably be automated using iMacros, and therefore any Qt pertaining to Web-Automation (specifically related to iMacros or not) would fall within "the Scope of iMacros"... 8)

But @OP, if you are starting the Discussion, what is your own Definition of "the Scope of iMacros", and can you give Examples of "within" and "beyond" that Scope...?, and maybe also applied to iMacros for FF specifically, as you seem to be a "Scope Specialist"...? 8)
We don't have many "Scope Specialists" on the Forum btw, (this is rather a Technical Forum, you know... :oops: ), so..., welcome...! :D
The sarcastic remarks are well deserved in regards to using the word scope. However, is a code monkey really going to break my balls over the case sensitivity of iMacros in a thread?

Regardless, I'll be more careful and clear in what I'm requesting from this thread so you don't get confused.

Basically, the idea is to avoid using javascript and only use macros to automate the task.

Sadly, I'm unfamiliar with the statements of iMacros and it's capabilities. Therefore, I was wondering what statements are in iMacros that would help accomplish this task.

FAIL_IF_FOUND statement retrieves the source content of the page which is static so the question is what other statements in iMacros could be utilised to accomplish this task.

Something like this:
L20:
Mov X: TextPage
CMP X: "Not Pwned"
JNE End
JMP L20

End:

Granted, you'll need a loop to run through each individual line of the webpage. However, you get the idea. So any actual help on this project would be appreciated.
User avatar
thecoder2012
Posts: 359
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: Is this beyond the Scope of Imacros.

Post by thecoder2012 » Sun Oct 20, 2019 1:42 pm

chivracq wrote:
Sat Oct 19, 2019 7:32 pm
Hum, @thecoder2012, I think your Answer is probably already "beyond the Scope" of this Thread... :shock:
My answer was very short and good! :lol:
chivracq wrote:
Sat Oct 19, 2019 7:32 pm
But I guess you are rather a "Technical" Advanced User, and not much of a "Philosophical" User... :wink:
Why? I'm both. :wink:
JamesD wrote:
Sun Oct 20, 2019 6:55 am
Basically, the idea is to avoid using javascript and only use macros to automate the task.
Reason? It's very easy with Javascript but a little tricky with pure iMacros codes.
JamesD wrote:
Sun Oct 20, 2019 6:55 am
Sadly, I'm unfamiliar with the statements of iMacros and it's capabilities. Therefore, I was wondering what statements are in iMacros that would help accomplish this task.
Error message enough? If yes then every command with timeout step.

Example (without loop lines):

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=https://haveibeenpwned.com/
TAG POS=1 TYPE=INPUT:EMAIL FORM=ACTION:/ ATTR=ID:Account CONTENT=test@test.tld
TAG POS=1 TYPE=BUTTON FORM=ACTION:/ ATTR=ID:searchPwnage
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=DIV ATTR=ID:noPwnage&&class:pwnedSearchResult<SP>panel-collapse<SP>collapse<SP>in
Tested with Basilisk 2019.09.12 (64-Bit), Win8.1 (64-Bit), iMacros 8.9.7
JamesD wrote:
Sun Oct 20, 2019 6:55 am
FAIL_IF_FOUND statement retrieves the source content of the page which is static so the question is what other statements in iMacros could be utilised to accomplish this task.
Your try as code is helpful.
Last edited by thecoder2012 on Mon Oct 21, 2019 1:28 am, edited 1 time in total.
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
rstancuna
Posts: 23
Joined: Sun Jun 16, 2019 10:27 pm

Re: Is this beyond the Scope of Imacros.

Post by rstancuna » Sun Oct 20, 2019 6:28 pm

thecoder2012 wrote:
Sun Oct 20, 2019 1:42 pm
JamesD wrote:
Sun Oct 20, 2019 6:55 am
Basically, the idea is to avoid using javascript and only use macros to automate the task.
Reason? It's very easy with Javascript but a little tricky with pure iMacros codes.
I would like to know as well, is it due to multiprocess or is there a different matter? Since the version you are using does support javascript.
With js you can just do a XMLHttpRequest with GET and content-type "application/json; charset=utf-8" to url "https://haveibeenpwned.com/unifiedsearc ... @email.com" , if status code is 404 then email wasn't found and when found and status code 200 you get a very nice json object that you can manage.
Waterfox 56.2, iMacros V8.9.7 on Windows
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Is this beyond the Scope of Imacros.

Post by chivracq » Sun Oct 20, 2019 7:03 pm

JamesD wrote:
Sun Oct 20, 2019 6:55 am
The sarcastic remarks are well deserved in regards to using the word scope. However, is a code monkey really going to break my balls over the case sensitivity of iMacros in a thread?

Regardless, I'll be more careful and clear in what I'm requesting from this thread so you don't get confused.

Basically, the idea is to avoid using javascript and only use macros to automate the task.

Sadly, I'm unfamiliar with the statements of iMacros and it's capabilities. Therefore, I was wondering what statements are in iMacros that would help accomplish this task.

FAIL_IF_FOUND statement retrieves the source content of the page which is static so the question is what other statements in iMacros could be utilised to accomplish this task.

Something like this:

Code: Select all

L20:
Mov X: TextPage
CMP X: "Not Pwned"
JNE End  
JMP L20

End:
Granted, you'll need a loop to run through each individual line of the webpage. However, you get the idea. So any actual help on this project would be appreciated.

Yeah, well..., "Problem" is not only the Word "Scope" but the whole Thread Title (which grammatically doesn't mean anything btw) which is completely irrelevant for the "real" Content of your OP/Thread...
:arrow: => Can you edit your Thread Title into some Title that will be Descriptive about its real Content...? (... + grammatically correct hopefully..., like putting a '?' at the end if you formulate it as Question...)

And next time you open a Thread, try to select the "correct" Sub-Forum, this one has nothing specific to 'iMacros for FF' only... (Correct Sub-Forum would have been the 'General' one, or the 'Data Extraction' Sub-Forum would also be "correct" as several Solutions for your Scenario would involve some Data Extraction, but the 'General' one is always OK if you hesitate and are unsure...)

+ OS is missing from your FCI..., even if we can deduct you are on Linux from the Path to your DataSource, but your OS ought to be clearly mentioned in your FCI, (like mentioned also in the Forum Rules that you obviously didn't read...), even if you think it's irrelevant...

Hum, funny to see a Script in 'Assembly', probably first time on the Forum, I think... 8)
But hum, if you are "fluent" in 'Assembly', then iMacros is 20 times "easier", I would think... :)

>>>
thecoder2012 wrote:
Sun Oct 20, 2019 1:42 pm
chivracq wrote:
Sat Oct 19, 2019 7:32 pm
Hum, @thecoder2012, I think your Answer is probably already "beyond the Scope" of this Thread... :shock:
My answer was very short and good! :lol:
chivracq wrote:
Sat Oct 19, 2019 7:32 pm
But I guess you are rather a "Technical" Advanced User, and not much of a "Philosophical" User... :wink:
Why? I'm both. :wink:

Yeah-yeah, ah-ah...! But OK, that whole part (about the "Scope") was indeed meant as "sarcastic" and supposedly hilariously funny, like usual...! :P :wink:

>>>
thecoder2012 wrote:
Sun Oct 20, 2019 1:42 pm
JamesD wrote:
Sun Oct 20, 2019 6:55 am
Basically, the idea is to avoid using javascript and only use macros to automate the task.
Reason? It's very easy with Javascript but a little tricky with pure iMacros codes.

Boah...!, I don't agree, I can think of 3 different "easy" Solutions in pure '.iim' (and you've indeed already posted one), that only require 1 or 2 Lines of Code, and I don't see anything "tricky" in those, compared to using a '.js' Script...
+ 3 other Solutions that would be a little bit more "functional" in my Opinion, rather than aborting the Script for each Hit...
(But I'll mention/explain those once @OP will have given a Descriptive Title to their Thread...)

>>>
thecoder2012 wrote:
Sun Oct 20, 2019 1:42 pm
JamesD wrote:
Sun Oct 20, 2019 6:55 am
Sadly, I'm unfamiliar with the statements of iMacros and it's capabilities. Therefore, I was wondering what statements are in iMacros that would help accomplish this task.
Error message enough? If yes then every command with timeout step.

Example (without loop):

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=https://haveibeenpwned.com/
TAG POS=1 TYPE=INPUT:EMAIL FORM=ACTION:/ ATTR=ID:Account CONTENT=test@test.tld
TAG POS=1 TYPE=BUTTON FORM=ACTION:/ ATTR=ID:searchPwnage
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=DIV ATTR=ID:noPwnage&&class:pwnedSearchResult<SP>panel-collapse<SP>collapse<SP>in
Tested with Basilisk 2019.09.12 (64-Bit), Win8.1 (64-Bit), iMacros 8.9.7

Yep indeed, that's also the "easiest"/"simplest" Solution in my Opinion... :)

>>>
thecoder2012 wrote:
Sun Oct 20, 2019 1:42 pm
JamesD wrote:
Sun Oct 20, 2019 6:55 am
FAIL_IF_FOUND statement retrieves the source content of the page which is static so the question is what other statements in iMacros could be utilised to accomplish this task.
Your try as code is helpful.

Yep indeed, no Script posted about what @OP "tried" with 'FAIL_IF_FOUND', I don't see any Reason why it wouldn't work... :o
And that would be the 2nd of the 3 Solutions I mentioned in pure '.iim'.
(Even if I never use 'FAIL_IF_FOUND' myself, in any of my Scripts, I prefer the "next" one below... :twisted: )

And the 3rd one I have in mind would be my "first Choice" actually, as I find it more "powerful" and more "flexible", and probably more "reliable" also, (and I use it myself in several of my own Scripts 8) ), maybe combined with one of the 3 (hum, I have 4 now...) "more functional" Solutions I mentioned...

EDIT:
Hum, and I have a 4th one, still pretty "simple" and in pure '.iim' also, requires 3 Lines, and is a bit a "Combination" of @thecoder's Sol + 'FAIL_IF_FOUND', you can call it the 'FAIL_IF_NOT_FOUND' Sol, ah-ah...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
User avatar
thecoder2012
Posts: 359
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: Is this beyond the Scope of Imacros.

Post by thecoder2012 » Sun Oct 20, 2019 7:41 pm

chivracq wrote:
Sun Oct 20, 2019 7:03 pm
Boah...!, I don't agree, I can think of 3 different "easy" Solutions in pure '.iim' (and you've indeed already posted one), that only require 1 or 2 Lines of Code, and I don't see anything "tricky" in those, compared to using a '.js' Script...
Tricky = record function is not really enough (for users without enough knowledge).
EVAL with JavaScript is enough in 1 line (e.g. url goto + 1 line as check) and a little easier in my opinion (e.g. visible or hide check).
Or iMacros + jsfiddle + json data.
rstancuna wrote:
Sun Oct 20, 2019 6:28 pm
Since the version you are using does support javascript.
With js you can just do a XMLHttpRequest with GET and content-type "application/json; charset=utf-8" to url "https://haveibeenpwned.com/unifiedsearc ... @email.com" , if status code is 404 then email wasn't found and when found and status code 200 you get a very nice json object that you can manage.
I think it's no problem with newer iMacros in this case. We have jsfiddle as workaround. :)
chivracq wrote:
Sun Oct 20, 2019 7:03 pm
+ 3 other Solutions that would be a little bit more "functional" in my Opinion, rather than aborting the Script for each Hit...
Yes but JamesD has requested it.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm
Hum, and I have a 4th one, still pretty "simple" and in pure '.iim' also, requires 3 Lines, and is a bit a "Combination" of @thecoder's Sol + 'FAIL_IF_FOUND', you can call it the 'FAIL_IF_NOT_FOUND' Sol, ah-ah...!
ERROR! No example! :x
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Is this beyond the Scope of Imacros.

Post by chivracq » Sun Oct 20, 2019 8:07 pm

I'll resume posting (myself) in this Thread once @OP will have edited their Thread Title..., pity I can't (temporarily) lock it until then..., or edit the Thread Title myself... (Func not included in my 'Mod' Role, only the 'Forum Admin' can do it...) :(
Hum but locking the Thread wouldn't help anyway, as @OP wouldn't be able to edit anything in it anymore, oops...! :oops:

[Lesson for myself as a Mod on this Forum: Last time I "hesitantly" approved a Post/Thread with such a useless/non-Descriptive Thread Title, + posted in the wrong Sub-Forum... I trusted/took "for granted" @OP would quickly edit their Thread Title, but that was apparently a "Mistake"... OK, fair enough... :| ]

=> @OP, can you edit your Thread Title into some Title a bit Descriptive about its real Content...!?
... And a bit quickly please...! :roll:


The Thread is "actually" quite "interesting", and you are a bit in the "luxury Position" that 3 (out of 4) most Advanced Users (at this moment) are participating into it (and @TechSup is missing also, but OK, it's Sunday evening in Europe), but all those interesting and useful Replies (for the Forum Community) are all getting "a bit lost" for future Users searching the Forum, because of that useless Thread Title... :(
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
JamesD
Posts: 5
Joined: Sat Oct 19, 2019 3:34 pm

Re: Is this beyond the Scope of Imacros.

Post by JamesD » Sun Oct 20, 2019 11:19 pm

chivracq wrote:
Sun Oct 20, 2019 7:03 pm

Yeah, well..., "Problem" is not only the Word "Scope" but the whole Thread Title (which grammatically doesn't mean anything btw) which is completely irrelevant for the "real" Content of your OP/Thread...
:arrow: => Can you edit your Thread Title into some Title that will be Descriptive about its real Content...? (... + grammatically correct hopefully..., like putting a '?' at the end if you formulate it as Question...)
Absolutely correct in stating that greater care should of been taken when constructing the title of this thread.

That stated the absence of a question mark in a sentence is not nearly as bad as forgetting "The" in sentence or writing a run on sentence. Imagine I'd look like a jackass if I made those mistakes then tried criticizing another person's grammar.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

And next time you open a Thread, try to select the "correct" Sub-Forum, this one has nothing specific to 'iMacros for FF' only... (Correct Sub-Forum would have been the 'General' one, or the 'Data Extraction' Sub-Forum would also be "correct" as several Solutions for your Scenario would involve some Data Extraction, but the 'General' one is always OK if you hesitate and are unsure...)
Considering the Macro was created in FF I'd thought posting in FF would be appropriate. However, in hind sight you would be correct.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

+ OS is missing from your FCI..., even if we can deduct you are on Linux from the Path to your DataSource, but your OS ought to be clearly mentioned in your FCI, (like mentioned also in the Forum Rules that you obviously didn't read...), even if you think it's irrelevant...
Noted.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

Hum, funny to see a Script in 'Assembly', probably first time on the Forum, I think... 8)
But hum, if you are "fluent" in 'Assembly', then iMacros is 20 times "easier", I would think... :)
Please tell me you are joking? Just because you are fluent in one language does not mean you can automatically program in another language. For example just because Java is harder than python does not mean you can program in python.

Besides, who is who fluent in assembly code? Especially, when it is manufacturer dependent? I only used it to explain as it is better than pseudo code.

However, I'll admit that I am a bit confused about the previous post clamming that there is no loop. Is there no loop in:

TAG POS=1 TYPE=DIV ATTR=ID:noPwnage&&class:pwnedSearchResult<SP>panel-collapse<SP>collapse<SP>in

I'd imagine the structure of the statement grabs the page and truncates through the list to find the match. However, that could be a wrong assumption.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

Boah...!, I don't agree, I can think of 3 different "easy" Solutions in pure '.iim' (and you've indeed already posted one), that only require 1 or 2 Lines of Code, and I don't see anything "tricky" in those, compared to using a '.js' Script...
+ 3 other Solutions that would be a little bit more "functional" in my Opinion, rather than aborting the Script for each Hit...
(But I'll mention/explain those once @OP will have given a Descriptive Title to their Thread...)
I'm only after the first hit. Although, I do agree using JavaScript would only complicated a simple task.

The statement tried to find the words "Oh<SP>no<SP>pwned" and if it did threw an exception.
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Finding specific text on page using iMacros:

Post by chivracq » Mon Oct 21, 2019 1:12 am

JamesD wrote:
Sun Oct 20, 2019 11:19 pm
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

Yeah, well..., "Problem" is not only the Word "Scope" but the whole Thread Title (which grammatically doesn't mean anything btw) which is completely irrelevant for the "real" Content of your OP/Thread...
:arrow: => Can you edit your Thread Title into some Title that will be Descriptive about its real Content...? (... + grammatically correct hopefully..., like putting a '?' at the end if you formulate it as Question...)
Absolutely correct in stating that greater care should of been taken when constructing the title of this thread.

That stated the absence of a question mark in a sentence is not nearly as bad as forgetting "The" in sentence or writing a run on sentence. Imagine I'd look like a jackass if I made those mistakes then tried criticizing another person's grammar.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

And next time you open a Thread, try to select the "correct" Sub-Forum, this one has nothing specific to 'iMacros for FF' only... (Correct Sub-Forum would have been the 'General' one, or the 'Data Extraction' Sub-Forum would also be "correct" as several Solutions for your Scenario would involve some Data Extraction, but the 'General' one is always OK if you hesitate and are unsure...)
Considering the Macro was created in FF I'd thought posting in FF would be appropriate. However, in hind sight you would be correct.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

+ OS is missing from your FCI..., even if we can deduct you are on Linux from the Path to your DataSource, but your OS ought to be clearly mentioned in your FCI, (like mentioned also in the Forum Rules that you obviously didn't read...), even if you think it's irrelevant...
Noted.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

Hum, funny to see a Script in 'Assembly', probably first time on the Forum, I think... 8)
But hum, if you are "fluent" in 'Assembly', then iMacros is 20 times "easier", I would think... :)
Please tell me you are joking? Just because you are fluent in one language does not mean you can automatically program in another language. For example just because Java is harder than python does not mean you can program in python.

Besides, who is who fluent in assembly code? Especially, when it is manufacturer dependent? I only used it to explain as it is better than pseudo code.

However, I'll admit that I am a bit confused about the previous post clamming that there is no loop. Is there no loop in:

TAG POS=1 TYPE=DIV ATTR=ID:noPwnage&&class:pwnedSearchResult<SP>panel-collapse<SP>collapse<SP>in

I'd imagine the structure of the statement grabs the page and truncates through the list to find the match. However, that could be a wrong assumption.
chivracq wrote:
Sun Oct 20, 2019 7:03 pm

Boah...!, I don't agree, I can think of 3 different "easy" Solutions in pure '.iim' (and you've indeed already posted one), that only require 1 or 2 Lines of Code, and I don't see anything "tricky" in those, compared to using a '.js' Script...
+ 3 other Solutions that would be a little bit more "functional" in my Opinion, rather than aborting the Script for each Hit...
(But I'll mention/explain those once @OP will have given a Descriptive Title to their Thread...)
I'm only after the first hit. Although, I do agree using JavaScript would only complicated a simple task.

The statement tried to find the words "Oh<SP>no<SP>pwned" and if it did threw an exception.

Thread Title edited in "stg" better indeed, is not exactly the (original) Content of your OP/Thread, but is good enough...
But, you keep posting with the "old"/useless Title for Posts/Replies in this Thread..., and parts of your Reply @OP are a bit 'BS', but OK, I don't react... :roll:

OK, a bit tired of asking to pay attention to Quality, you now have "Carte Blanche" @OP + the Guys, I (probably) won't interfere anymore... 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
JamesD
Posts: 5
Joined: Sat Oct 19, 2019 3:34 pm

Re: Finding specific text on page using iMacros:

Post by JamesD » Mon Oct 21, 2019 7:31 pm

chivracq wrote:
Mon Oct 21, 2019 1:12 am

OK, a bit tired of asking to pay attention to Quality, you now have "Carte Blanche" @OP + the Guys, I (probably) won't interfere anymore... 8)
Sorry, could you please explain which part of my posts were BS? Was it:

Clamming that Python is easier than Java? Granted, that is a rather generalised thing to say since python is better for Web Scraping and Java is better for OOP*.

Or was it suggesting that the function:

TAG POS=1 TYPE=DIV ATTR=ID:noPwnage&&class:pwnedSearchResult

Utilises a ecapsulated loop to automate the task? Honestly, that is just an educated guess which could be wrong.

Regardless, I'm going to call you out by promising you $50 (USD) bitcoin if you can answer a question on DEs.

This leaves you with two options attempt the question or refuse $50 because you know that the question will be beyond the scope of your abilities.

Note:
The BTC can be given to a 3rd party before you attempt the question.
The answer will also be time stamped and uploaded to a file sharing service.

*In my opinion.
chivracq
Posts: 8719
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Finding specific text on page using iMacros:

Post by chivracq » Mon Oct 21, 2019 11:38 pm

JamesD wrote:
Mon Oct 21, 2019 7:31 pm
chivracq wrote:
Mon Oct 21, 2019 1:12 am

OK, a bit tired of asking to pay attention to Quality, you now have "Carte Blanche" @OP + the Guys, I (probably) won't interfere anymore... 8)
Sorry, could you please explain which part of my posts were BS? Was it:

Clamming that Python is easier than Java? Granted, that is a rather generalised thing to say since python is better for Web Scraping and Java is better for OOP*.

Or was it suggesting that the function:

Code: Select all

TAG POS=1 TYPE=DIV ATTR=ID:noPwnage&&class:pwnedSearchResult 
Utilises a ecapsulated loop to automate the task? Honestly, that is just an educated guess which could be wrong.

Regardless, I'm going to call you out by promising you $50 (USD) bitcoin if you can answer a question on DEs.

This leaves you with two options attempt the question or refuse $50 because you know that the question will be beyond the scope of your abilities.

Note:
The BTC can be given to a 3rd party before you attempt the question.
The answer will also be time stamped and uploaded to a file sharing service.

*In my opinion.

"the question will be beyond the scope of your abilities."
=> Oh dear!, you are probably right, I'm "just" a DJ and Artist IRL, I consider myself an "Advanced" User for iMacros, + some other Prog-Lang I used to program in, quite a few years ago ('PowerBuilder'), but there it stops, even if I can usually "read" and follow what any Script in any Prog-Lang is "doing"...

I don't know what "DEs" is/means btw...?
But yep, ask your Qt, state your "Challenge", I'll tell you if I can answer it... :P

(And I don't need/want your Money, I don't even have a BitCoin Account, ah-ah...!, I've been helping People on the Forum in my Free-Time (and for Free of course), for the last 6 years approx since I joined the Forum, as I was a bit surprised then that all Threads were "so easy" to answer), and I do that from an "ethical" and anti-commercial Perspective... :P And about "Ethics", I (usually) don't help for Games/Votes/Social Media/Competition/Financial Benefit/Spam/Hacking/Captcha...)

Oh...!, and I agree with you that Java is more difficult/complex than Python, grrrr..., I really never liked this Prog-Lang... (Java), beurk...! Although I tried... :shock: )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
JamesD
Posts: 5
Joined: Sat Oct 19, 2019 3:34 pm

Re: Finding specific text on page using iMacros:

Post by JamesD » Tue Oct 22, 2019 2:18 pm

chivracq wrote:
Mon Oct 21, 2019 11:38 pm
JamesD wrote:
Mon Oct 21, 2019 7:31 pm
chivracq wrote:
Mon Oct 21, 2019 1:12 am

OK, a bit tired of asking to pay attention to Quality, you now have "Carte Blanche" @OP + the Guys, I (probably) won't interfere anymore... 8)
Sorry, could you please explain which part of my posts were BS? Was it:

Clamming that Python is easier than Java? Granted, that is a rather generalised thing to say since python is better for Web Scraping and Java is better for OOP*.

Or was it suggesting that the function:

Code: Select all

TAG POS=1 TYPE=DIV ATTR=ID:noPwnage&&class:pwnedSearchResult 
Utilises a ecapsulated loop to automate the task? Honestly, that is just an educated guess which could be wrong.

Regardless, I'm going to call you out by promising you $50 (USD) bitcoin if you can answer a question on DEs.

This leaves you with two options attempt the question or refuse $50 because you know that the question will be beyond the scope of your abilities.

Note:
The BTC can be given to a 3rd party before you attempt the question.
The answer will also be time stamped and uploaded to a file sharing service.

*In my opinion.

"the question will be beyond the scope of your abilities."
=> Oh dear!, you are probably right, I'm "just" a DJ and Artist IRL, I consider myself an "Advanced" User for iMacros, + some other Prog-Lang I used to program in, quite a few years ago ('PowerBuilder'), but there it stops, even if I can usually "read" and follow what any Script in any Prog-Lang is "doing"...

I don't know what "DEs" is/means btw...?
But yep, ask your Qt, state your "Challenge", I'll tell you if I can answer it... :P

(And I don't need/want your Money, I don't even have a BitCoin Account, ah-ah...!, I've been helping People on the Forum in my Free-Time (and for Free of course), for the last 6 years approx since I joined the Forum, as I was a bit surprised then that all Threads were "so easy" to answer), and I do that from an "ethical" and anti-commercial Perspective... :P And about "Ethics", I (usually) don't help for Games/Votes/Social Media/Competition/Financial Benefit/Spam/Hacking/Captcha...)

Oh...!, and I agree with you that Java is more difficult/complex than Python, grrrr..., I really never liked this Prog-Lang... (Java), beurk...! Although I tried... :shock: )
Really? I'm the opposite side of the coin love Java and hate python.

DE stands for Differential Equation and unless you've studied derivatives there is about a 0.01% percent chance you'd be able to answer the question.

Straight forward and easy DE is:

Solve for Y.
Y" - 3Y' - 4Y = 2Sin(x)

The question would of been harder for the cash prize.
Post Reply