HTML TYPE, Copy data to notepad

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

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.

HTML TYPE, Copy data to notepad

by dadalt on Tue Jan 16, 2018 4: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 4:40 am

Re: HTML TYPE, Copy data to notepad

by dadalt on Tue Jan 16, 2018 7:40 am

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

Re: HTML TYPE, Copy data to notepad

by chivracq on Tue Jan 16, 2018 5:00 pm

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)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: 6684
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 4 guests

-->