HTML TYPE, Copy data to notepad

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
dadalt
Posts: 2
Joined: Tue Jan 16, 2018 11:40 am

HTML TYPE, Copy data to notepad

Post by dadalt » Tue Jan 16, 2018 11:53 am

Hello everyone!

I am newbie here.

I recorded a macro but it doesn't run, seems like the programming involve javascript functions.. I don't know if it's a problem.

Ok. The error I found is this:
Error -1300: Cannot find HTML element of type
TAG POS=1 TYPE=INPUT:TEXT ATTR=CLASS:v-textfield<SP>v-widget<SP>v-textfield-focus CONTENT=378.191.359-72

The code ( I recorded it):
TAG POS=2 TYPE=IMG ATTR=CLASS:v-image<SP>v-widget<SP>v-has-width<SP>v-has-height
WAIT SECONDS=3
TAG POS=1 TYPE=INPUT:TEXT ATTR=CLASS:v-textfield<SP>v-widget<SP>v-textfield-focus CONTENT=378.191.359-72
WAIT SECONDS=3
TAG POS=3 TYPE=DIV ATTR=TXT:
WAIT SECONDS=3
TAG POS=1 TYPE=DIV ATTR=TXT:ANA<SP>DOS<SP>SANTOS<SP>MARIA

To avoid this problem I used DS CMD but I don't know how to copy content of an type. Better explanation below:

TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:gwt-uid-141 CONTENT=0,05
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:gwt-uid-151 CONTENT=0,00

How do I copy that content to a file?

Thanks in advance!
dadalt
Posts: 2
Joined: Tue Jan 16, 2018 11:40 am

Re: HTML TYPE, Copy data to notepad

Post by dadalt » Tue Jan 16, 2018 2:40 pm

How I managed to get this working (with some creative, but bad coding manners, I think)

URL GOTO=http://www.consulta.plus/#!convenio
DS CMD=CLICK X=649 Y=617
WAIT SECONDS=2
'CLEAR
STOPWATCH ID=total3
TAG POS=1 TYPE=INPUT:TEXT ATTR=CLASS:v-textfield<SP>v-widget<SP>v-textfield-prompt CONTENT=378.191.359-72
WAIT SECONDS=1
DS CMD=CLICK X=1245 Y=147
WAIT SECONDS=1
DS CMD=LDBLCLK X=111 Y=275 CONTENT=
WAIT SECONDS=0.401
DS CMD=LUP X=111 Y=275 CONTENT=
WAIT SECONDS=2
DS CMD=CLICK X=467 Y=118
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=TABINDEX:0&&ID:gwt-uid-***&&CLASS:v-textfield<SP>v-widget<SP>inline-icon<SP>v-textfield-inline-icon<SP>color1<SP>v-textfield-color1&&ARIA-LABELLEDBY:gwt-uid-*** EXTRACT=TXT
SET !CLIPBOARD {{!EXTRACT}}
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: HTML TYPE, Copy data to notepad

Post by chivracq » Wed Jan 17, 2018 12:00 am

dadalt wrote:Hello everyone!

I am newbie here.

I recorded a macro but it doesn't run, seems like the programming involve javascript functions.. I don't know if it's a problem.

Ok. The error I found is this:

Code: Select all

Error -1300: Cannot find HTML element of type 
TAG POS=1 TYPE=INPUT:TEXT ATTR=CLASS:v-textfield<SP>v-widget<SP>v-textfield-focus CONTENT=378.191.359-72
The code ( I recorded it):

Code: Select all

TAG POS=2 TYPE=IMG ATTR=CLASS:v-image<SP>v-widget<SP>v-has-width<SP>v-has-height
WAIT SECONDS=3
TAG POS=1 TYPE=INPUT:TEXT ATTR=CLASS:v-textfield<SP>v-widget<SP>v-textfield-focus CONTENT=378.191.359-72
WAIT SECONDS=3
TAG POS=3 TYPE=DIV ATTR=TXT:
WAIT SECONDS=3
TAG POS=1 TYPE=DIV ATTR=TXT:ANA<SP>DOS<SP>SANTOS<SP>MARIA

To avoid this problem I used DS CMD but I don't know how to copy content of an type. Better explanation below:

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:gwt-uid-141 CONTENT=0,05
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:gwt-uid-151 CONTENT=0,00
How do I copy that content to a file?

Thanks in advance!
dadalt wrote:How I managed to get this working (with some creative, but bad coding manners, I think)

Code: Select all

URL GOTO=http://www.consulta.plus/#!convenio
DS CMD=CLICK X=649 Y=617
WAIT SECONDS=2
'CLEAR
STOPWATCH ID=total3 
TAG POS=1 TYPE=INPUT:TEXT ATTR=CLASS:v-textfield<SP>v-widget<SP>v-textfield-prompt CONTENT=378.191.359-72
WAIT SECONDS=1
DS CMD=CLICK X=1245 Y=147
WAIT SECONDS=1
DS CMD=LDBLCLK X=111 Y=275 CONTENT=
WAIT SECONDS=0.401
DS CMD=LUP X=111 Y=275 CONTENT=
WAIT SECONDS=2
DS CMD=CLICK X=467 Y=118
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=TABINDEX:0&&ID:gwt-uid-***&&CLASS:v-textfield<SP>v-widget<SP>inline-icon<SP>v-textfield-inline-icon<SP>color1<SP>v-textfield-color1&&ARIA-LABELLEDBY:gwt-uid-*** EXTRACT=TXT 
SET !CLIPBOARD {{!EXTRACT}}
Hum..., good actually that you managed to find a Solution to your Pb because to be honest I didn't really understand your OP and what your Pb was about..., your OP is a bit unclear I'm afraid..., hum, and you didn't mention your FCI anyway (read my Sig...!) so I wasn't going to do any digging in your Case...
=> FCI: Probably using iMB v12.0...(?)

But OK, I guess you are happy now if you found a Solution, and Thanks for sharing...! :D
- (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