Capturing EXTRACT data

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
Raisins
Posts: 3
Joined: Thu May 25, 2017 5:25 pm

Capturing EXTRACT data

Post by Raisins » Thu May 25, 2017 5:36 pm

iMacros Version V. 844
Browser Google Chrome versions is: 58.0.3029.110 (64-bit)
Operating System macOS Sierra V. 10.12.5
Included Demos work ok (all of them)

Also tried briefly on a Windows 10 system with Chrome with the same results. All demos worked.


Is there a way to put user-entered data into a variable?

I had been using PROMPT to capture user input data as a variable...

PROMPT "Please enter text:" !VAR1

Unfortunately, PROMPT no longer works with the latest Chrome update.

I've come up with the following workaround that EXTRACTs the user input from an html form I created. But I can't pass that data along because EXTRACT is not a variable and IEXTRACT does not work within a TAG. I've spent a lot of time with this and I haven't found a way to do this. Is there a way to load TAG EXTRACT'd data into a variable?

This is what I am trying to do...

URL GOTO=C:\Users\username\Desktop\FormTest.html
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:abc EXTRACT=TXT

SET !VAR1 {{!EXTRACT}}

TAB OPEN NEW
TAB T=2
URL GOTO=http://www.forvo.com/word/{{!VAR1}}/#ar

No luck with this, even though I found some demo samples that said it should work.

Any suggestions would be appreciated. Thank you.
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Capturing EXTRACT data

Post by iimfun » Sat May 27, 2017 6:18 am

Raisins wrote:I had been using PROMPT to capture user input data as a variable...

PROMPT "Please enter text:" !VAR1

Unfortunately, PROMPT no longer works with the latest Chrome update.
I encountered the same problem. Here is my workaround for that

Code: Select all

SET !VAR1 EVAL("prompt('Please enter text:');")
PROMPT {{!VAR1}}
Raisins
Posts: 3
Joined: Thu May 25, 2017 5:25 pm

Re: Capturing EXTRACT data - CLOSED

Post by Raisins » Sat May 27, 2017 12:27 pm

Thank you. This works
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Capturing EXTRACT data

Post by chivracq » Sat May 27, 2017 1:43 pm

Raisins wrote:

Code: Select all

iMacros Version V. 844
Browser Google Chrome versions is: 58.0.3029.110 (64-bit)
Operating System macOS Sierra V. 10.12.5
Included Demos work ok (all of them)

Also tried briefly on a Windows 10 system with Chrome with the same results. All demos worked.


Is there a way to put user-entered data into a variable?

I had been using PROMPT to capture user input data as a variable...

Code: Select all

PROMPT "Please enter text:" !VAR1
Unfortunately, PROMPT no longer works with the latest Chrome update.

I've come up with the following workaround that EXTRACTs the user input from an html form I created. But I can't pass that data along because EXTRACT is not a variable and IEXTRACT does not work within a TAG. I've spent a lot of time with this and I haven't found a way to do this. Is there a way to load TAG EXTRACT'd data into a variable?

This is what I am trying to do...

Code: Select all

URL GOTO=C:\Users\username\Desktop\FormTest.html
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:abc EXTRACT=TXT 

SET !VAR1 {{!EXTRACT}}

TAB OPEN NEW
TAB T=2
URL GOTO=http://www.forvo.com/word/{{!VAR1}}/#ar
No luck with this, even though I found some demo samples that said it should work.

Any suggestions would be appreciated. Thank you.
iimfun wrote:
Raisins wrote:I had been using PROMPT to capture user input data as a variable...

Code: Select all

PROMPT "Please enter text:" !VAR1
Unfortunately, PROMPT no longer works with the latest Chrome update.
I encountered the same problem. Here is my workaround for that

Code: Select all

SET !VAR1 EVAL("prompt('Please enter text:');")
PROMPT {{!VAR1}}
Raisins wrote:Thank you. This works
Hum..., for Cross-Browser Compatibility, @iimfun's Workaround will NOT work on FF (tested on v8.8.2 and v8.9.7 for FF: => "ReferenceError: prompt is not defined, line 5 (Error code: -1001)"), see the following 2 related Threads for other Workarounds that should(?) work in all Browsers...:
- Displaying window.alert()
- PROMPT Messagebox - Yes - No - Cancel (end)
- (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...
Post Reply