How Extract Data in .NET Component

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.
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
chiaravel
Posts: 9
Joined: Mon Sep 08, 2014 6:12 pm

How Extract Data in .NET Component

Post by chiaravel » Tue Sep 23, 2014 3:36 am

Hi,

I have this code into a Sub.

Code: Select all

        Try
            im = iMacrosControl.Create(My.Settings.LicenciaIMACROS)

            t = "CODE: CLEAR"
            im.Play(t)

            t = "CODE: URL GOTO=https://accounts.google.com/ServiceLogin?service=adsense&rm=hide&nui=15&alwf=true&ltmpl=adsense&passive=false&continue=https://www.google.com/adsense/gaiaauth2?hl%3Des%26subid%3Dww-es-et-nelson_adsense&followup=https://www.google.com/adsense/gaiaauth2?hl%3Des%26subid%3Dww-es-et-nelson_adsense%26sourceid%3Daso&hl=es"
            im.Play(t)

            t = "CODE: TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:https://accounts.google.com/ServiceLoginAuth ATTR=NAME:Email CONTENT=xxxxxx@xxxxxxxx.com"
            im.Play(t)

            t = "CODE: SET !ENCRYPTION NO"
            im.Play(t)

            t = "CODE: TAG POS=1 TYPE=INPUT:PASSWORD FORM=ACTION:https://accounts.google.com/ServiceLoginAuth ATTR=NAME:Passwd CONTENT=xxxxxxxx"
            im.Play(t)

            t = "CODE: TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:https://accounts.google.com/ServiceLoginAuth ATTR=NAME:signIn"
            im.Play(t)

            t = "CODE: TAG POS=1 TYPE=DIV ATTR=CLASS:earnings-value EXTRACT=TXT"
            im.Play(t)

            t = "CODE: TAG POS=2 TYPE=DIV ATTR=CLASS:earnings-value EXTRACT=TXT"
            im.Play(t)

            t = "CODE: TAG POS=3 TYPE=DIV ATTR=CLASS:earnings-value EXTRACT=TXT"
            im.Play(t)

            t = "CODE: TAG POS=4 TYPE=DIV ATTR=CLASS:earnings-value EXTRACT=TXT"
            im.Play(t)

            Dim extract = String.Empty

            If im.ExtractedValues.Count > 0 Then
                extract = String.Join("[sep]", im.ExtractedValues.ToArray())
            End If

        Catch ex As Exception
            MsgBox(Err.Number.ToString + " " + Err.Description)
        End Try
But im.ExtractedValues.Count throw 0

What's Wrong ?

Thanks in advance
joshi2014
Posts: 3
Joined: Wed Oct 22, 2014 7:15 am

Re: How Extract Data in .NET Component

Post by joshi2014 » Wed Oct 22, 2014 8:07 am

Hi. I have an idea about it...

You using after every line of script the iim.play command, but You need to play a complete Macro once.

Solution:

Code: Select all

Dim MyMacro as String = "CODE clear" & vbNewline
MyMacro &= "SET! blabla" & vbNewline
MyMacro &= "URL blabla" & vbNewline
im.Play(MyMacro)
I just pointed out to make first the Macro String the Syntax is not right... but maybe that helps.

c.u. joshi
chiaravel
Posts: 9
Joined: Mon Sep 08, 2014 6:12 pm

Re: How Extract Data in .NET Component

Post by chiaravel » Sun Nov 02, 2014 11:49 pm

Thanks Joshi

sorry for the delay..

But How can I take the control if I need to play all together ?

I need to check after every extract if the data is loaded..

this allow to us to make loop structures until data is extracted right.

I have a lot of problems running once..

I put a lot of seconds in TIMEOUT variables to run fine.. and a lot of times, the Imacros Component fail.

Are too much Flash sites, or intelligent platforms that user Ajax for give the info.

IMACROS haven't IF or WHILE statemens..

What can I do ?

Regards
Post Reply