Newbie Question 
Author Message
 Newbie Question

Hello,

I'm an old (at least in Net terms) dBase (xBase or FoxPro if you prefer)
programmer.  I now need to access data across the WWW

I'm just moving from straight dialup communications (ProComm Plus and White
Knight) and scripting searches of databases to accessing these databases
across the Internet.  Here is an example of what I used do before,

Search the database for people who work in County 12 who's names start with
the letter S

Capture the response to the search

    If the response told me that there were less than 1,000 matches I'd
enter the instructions to download the search results into a capture file

        If the search response was >=1000  I would re-search using looking
for names in County 12 that started with Sa through SM (the reason was that
the database had a limit of sending only the first 1000 matching records)

        Test again for >=1000 matches and either capture the search results
or narrow the search farther.

    After I finished with the S's I would move on to the T's etc  Each time
capturing only the results of the searches (not screen scraping the whole
session).

    I would have to search multiple geographical areas (Counties 1 - 46) for
names which would change from month to month.

    Of course it's more complicated than that but you get the idea aye?

Now ideally there would be someway for me to programmatically take control
of the browser connect to the website, enter the necessary data in the
fields, do the searches and capture the data.  I have Visual Studio 6.0
professional for resources, but could purchase other if necessary.

Now it would REALLY BE NICE if there was some sort of macro generator that I
could have "watch me" as I log in and do a few searches and create an
editable script for me.  Usually if I could see that I could get enough from
it to complete my project (I'll clean it up later as I learn the language
better).

THANX so much for taking the time to read this and I look forward to your
ideas and suggestions.

Gary



Sun, 31 Oct 2004 15:15:07 GMT  
 Newbie Question
Gary, hi...

First, about a macro generator existing:
<ROFL>

Yes, it would be great if you could do that.  In fact, when I work with Word -
which does have a decent macro recorder - I will occasionally use it to learn
how to manipulate areas of the object model I don't understand yet.
Unfortunately, there is no such beast for Internet Explorer.

That said, it *is* possible to automate it; you need to get to know the object
model to do many things in it, though. I suspect you may find that WSH is what
you want to use, and automate IE from within it.

Here's a very crude example of what you can do with a WSH script.  With a couple
of tweaks, you can have a WSH script sort through online material by automating
either IE or the XMLHTTP object.( If that last line loses you, don't worry about
it; suffice it to say at the moment that WSH is pretty good about hooking up to
various things on your system, letting them do what they do best, then sucking
information back out of them).
Here's an example script that will run your browser, go to Yahoo, then echo back
the InnerText of the main page, followed by the title.  Note that this is a very
simple example compared to what you *can* do - you can extract contents of
particular elements on a page easily.  Save the text between the lines as
something like "GetDataFromIE.vbs" and try it out.

============================
'GetDataFromIE.vbs
Dim oIE
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate "http://www.yahoo.com"
Do Until oIE.ReadyState = 4:WScript.Sleep 10 : Loop
oIE.Toolbar = False
oIE.StatusBar = False
oIE.Resizable = True
oIE.Visible = True

wscript.echo oIE.Document.Body.InnerText
wscript.echo oIE.Document.Title
============================

For more information and ideas if you want to try something like this, I would
suggest checking out the microsoft.public.scripting.wsh group or
microsoft.public.scripting.VBScript (they tend to be higher traffic than here,
also).  If you are doing internet searches on some of this material, you may
want to try "InternetExplorer.Application" as a search term, since that's the
universal ProgID used for automation.


Quote:
> Hello,

> I'm an old (at least in Net terms) dBase (xBase or FoxPro if you prefer)
> programmer.  I now need to access data across the WWW

> I'm just moving from straight dialup communications (ProComm Plus and White
> Knight) and scripting searches of databases to accessing these databases
> across the Internet.  Here is an example of what I used do before,

> Search the database for people who work in County 12 who's names start with
> the letter S

> Capture the response to the search

>     If the response told me that there were less than 1,000 matches I'd
> enter the instructions to download the search results into a capture file

>         If the search response was >=1000  I would re-search using looking
> for names in County 12 that started with Sa through SM (the reason was that
> the database had a limit of sending only the first 1000 matching records)

>         Test again for >=1000 matches and either capture the search results
> or narrow the search farther.

>     After I finished with the S's I would move on to the T's etc  Each time
> capturing only the results of the searches (not screen scraping the whole
> session).

>     I would have to search multiple geographical areas (Counties 1 - 46) for
> names which would change from month to month.

>     Of course it's more complicated than that but you get the idea aye?

> Now ideally there would be someway for me to programmatically take control
> of the browser connect to the website, enter the necessary data in the
> fields, do the searches and capture the data.  I have Visual Studio 6.0
> professional for resources, but could purchase other if necessary.

> Now it would REALLY BE NICE if there was some sort of macro generator that I
> could have "watch me" as I log in and do a few searches and create an
> editable script for me.  Usually if I could see that I could get enough from
> it to complete my project (I'll clean it up later as I learn the language
> better).

> THANX so much for taking the time to read this and I look forward to your
> ideas and suggestions.

> Gary



Sun, 31 Oct 2004 16:24:43 GMT  
 Newbie Question
Thank you Alex,

For your time and suggestions.

Gary



Quote:
> Gary, hi...

> First, about a macro generator existing:
> <ROFL>

> Yes, it would be great if you could do that.  In fact, when I work with
Word -
> which does have a decent macro recorder - I will occasionally use it to
learn
> how to manipulate areas of the object model I don't understand yet.
> Unfortunately, there is no such beast for Internet Explorer.

> That said, it *is* possible to automate it; you need to get to know the
object
> model to do many things in it, though. I suspect you may find that WSH is
what
> you want to use, and automate IE from within it.

> Here's a very crude example of what you can do with a WSH script.  With a
couple
> of tweaks, you can have a WSH script sort through online material by
automating
> either IE or the XMLHTTP object.( If that last line loses you, don't worry
about
> it; suffice it to say at the moment that WSH is pretty good about hooking
up to
> various things on your system, letting them do what they do best, then
sucking
> information back out of them).
> Here's an example script that will run your browser, go to Yahoo, then
echo back
> the InnerText of the main page, followed by the title.  Note that this is
a very
> simple example compared to what you *can* do - you can extract contents of
> particular elements on a page easily.  Save the text between the lines as
> something like "GetDataFromIE.vbs" and try it out.

> ============================
> 'GetDataFromIE.vbs
> Dim oIE
> Set oIE = CreateObject("InternetExplorer.Application")
> oIE.Navigate "http://www.yahoo.com"
> Do Until oIE.ReadyState = 4:WScript.Sleep 10 : Loop
> oIE.Toolbar = False
> oIE.StatusBar = False
> oIE.Resizable = True
> oIE.Visible = True

> wscript.echo oIE.Document.Body.InnerText
> wscript.echo oIE.Document.Title
> ============================

> For more information and ideas if you want to try something like this, I
would
> suggest checking out the microsoft.public.scripting.wsh group or
> microsoft.public.scripting.vbscript (they tend to be higher traffic than
here,
> also).  If you are doing internet searches on some of this material, you
may
> want to try "InternetExplorer.Application" as a search term, since that's
the
> universal ProgID used for automation.



> > Hello,

> > I'm an old (at least in Net terms) dBase (xBase or FoxPro if you prefer)
> > programmer.  I now need to access data across the WWW

> > I'm just moving from straight dialup communications (ProComm Plus and
White
> > Knight) and scripting searches of databases to accessing these databases
> > across the Internet.  Here is an example of what I used do before,

> > Search the database for people who work in County 12 who's names start
with
> > the letter S

> > Capture the response to the search

> >     If the response told me that there were less than 1,000 matches I'd
> > enter the instructions to download the search results into a capture
file

> >         If the search response was >=1000  I would re-search using
looking
> > for names in County 12 that started with Sa through SM (the reason was
that
> > the database had a limit of sending only the first 1000 matching
records)

> >         Test again for >=1000 matches and either capture the search
results
> > or narrow the search farther.

> >     After I finished with the S's I would move on to the T's etc  Each
time
> > capturing only the results of the searches (not screen scraping the
whole
> > session).

> >     I would have to search multiple geographical areas (Counties 1 - 46)
for
> > names which would change from month to month.

> >     Of course it's more complicated than that but you get the idea aye?

> > Now ideally there would be someway for me to programmatically take
control
> > of the browser connect to the website, enter the necessary data in the
> > fields, do the searches and capture the data.  I have Visual Studio 6.0
> > professional for resources, but could purchase other if necessary.

> > Now it would REALLY BE NICE if there was some sort of macro generator
that I
> > could have "watch me" as I log in and do a few searches and create an
> > editable script for me.  Usually if I could see that I could get enough
from
> > it to complete my project (I'll clean it up later as I learn the
language
> > better).

> > THANX so much for taking the time to read this and I look forward to
your
> > ideas and suggestions.

> > Gary



Sun, 31 Oct 2004 23:21:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. verschl├╝sselung

2. Newbie question: Session_OnEnd question

3. Resizing forms question (newbie question)

4. Newbie question: open file

5. vba Newbie Question

6. Newbie Question: Getting the Values from Calculated controls into a table

7. Newbie question for calling functions

8. Newbie Question about FindRecord Method

9. Newbie Questions - Sorry

10. newbie question

11. Newbie question(s)

12. Newbie Question

 

 
Powered by phpBB® Forum Software