Use command SEARCH SOURCE from an iframe

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Use command SEARCH SOURCE from an iframe

by Ervella on Fri Jun 22, 2018 12:06 pm

FCIM:
iMacros V 10.00.2738
S.O. W7
Chrome V 67.0.3396.87


Greetings!
Well, I'm developing a new VBS script and I need to check some strings in the source code of a site (I'm using the SEARCH SOURCE command), however, when I execute the script, iMacros can't find strings that are inside an iframe. For frames, I know that exists the command FRAME NAME= ... Then, I need something similar, to indicate the location of strings.
PS.: I've looking in the iMacros forum and googling it, but I didn't found nothing that specific. I only found examples using EXTRACT, but i don't know if it works like SEARCH SOURCE...

Thanks in advance.

Ervella
Ervella
 
Posts: 9
Joined: Thu May 03, 2018 12:56 pm

Re: Use command SEARCH SOURCE from an iframe

by chivracq on Fri Jun 22, 2018 1:05 pm

Ervella wrote:FCIM:
iMacros V 10.00.2738
S.O. W7
Chrome V 67.0.3396.87


Greetings!
Well, I'm developing a new VBS script and I need to check some strings in the source code of a site (I'm using the SEARCH SOURCE command), however, when I execute the script, iMacros can't find strings that are inside an iframe. For frames, I know that exists the command FRAME NAME= ... Then, I need something similar, to indicate the location of strings.
PS.: I've looking in the iMacros forum and googling it, but I didn't found nothing that specific. I only found examples using EXTRACT, but i don't know if it works like SEARCH SOURCE...

Thanks in advance.

Ervella

I don't think indeed the 'SEARCH' Command will be able to search inside Frames, or you first need to extract/identify its direct URL and to open that Frame only, in a 2nd Tab for example...

Or indeed using 'EXTRACT', you can do some 'EXTRACT=HTM' (or '=TXT') on the 'BODY' in the Frame or some 'DIV' at some high Level in the Frame, and using 'EVAL()' (or from your '.vbs' main Script), you run your own Search on the Extract.

(I never use the 'SEARCH' Command myself, I prefer to use 'EVAL()' on the 'Extract' with the JS 'split()' Command (rather than 'match()'), and the Length of the Array returned by 'split()' tells me if my String/Object/whatever is found, and how many times...)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Use command SEARCH SOURCE from an iframe

by Ervella on Wed Jun 27, 2018 11:15 am

That worked! Thanks a lot.
Ervella
 
Posts: 9
Joined: Thu May 03, 2018 12:56 pm

Re: Use command SEARCH SOURCE from an iframe

by chivracq on Wed Jun 27, 2018 11:24 am

Ervella wrote:That worked! Thanks a lot.

Hum, OK..., "That worked!" is a bit as vague as "It doesn't work...", I mentioned several different ways/methods, you could mention which one(s) you tried/chose and even share your Script to show how you implemented it... Other Users with a similar Qt/Case might be interested to know how you implemented it... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Use command SEARCH SOURCE from an iframe

by Ervella on Sun Jul 01, 2018 6:01 pm

Hum, OK..., "That worked!" is a bit as vague as "It doesn't work...", I mentioned several different ways/methods, you could mention which one(s) you tried/chose and even share your Script to show how you implemented it... Other Users with a similar Qt/Case might be interested to know how you implemented it... :idea:

Well... Yeah...
I opened the URL of iframe in a second tab annnnnnd used SEARCH on it's source code. That was enough to the code context!
As I said before, many thanks!!

Kind regards,
Ervella
Ervella
 
Posts: 9
Joined: Thu May 03, 2018 12:56 pm

Re: Use command SEARCH SOURCE from an iframe

by chivracq on Sun Jul 01, 2018 6:34 pm

Ervella wrote:
Hum, OK..., "That worked!" is a bit as vague as "It doesn't work...", I mentioned several different ways/methods, you could mention which one(s) you tried/chose and even share your Script to show how you implemented it... Other Users with a similar Qt/Case might be interested to know how you implemented it... :idea:

Well... Yeah...
I opened the URL of iframe in a second tab annnnnnd used SEARCH on it's source code. That was enough to the code context!
As I said before, many thanks!!

Kind regards,
Ervella

OK, the first Method I mentioned then...:
I don't think indeed the 'SEARCH' Command will be able to search inside Frames, or you first need to extract/identify its direct URL and to open that Frame only, in a 2nd Tab for example...

Good, Thanks for the Feedback... 8)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 7714
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Command Line and Scripting Interface

Who is online

Users browsing this forum: No registered users and 3 guests

-->