Link to home
Start Free TrialLog in
Avatar of Joe Pelish
Joe PelishFlag for United States of America

asked on

Foxpro command to manipulate a web form

I need to have an set of commands that will open up, but not if it is already open, a web page and fill in a text box and submit the form. I am not necessarily wanting to program it as it is in a foxpro app I have that lets me do commands in the app itself. But if programming in if Foxpro I can do that too.
Avatar of Olaf Doschke
Olaf Doschke
Flag of Germany image

You can only automate a browser with OLE interface, that is IE as InternetExplorer.Application. The other thing you can influence of course, is a webbrowser control within your form.

You can access the DOM and therefore can set values in html forms etc and submit forms, that's doable. But mainly only with IE. I never tried to use the firefox activex project to get ole automation work with it, but you may try that: http://www.adamlock.com/mozilla/

Forget about doing whatever you want to do with any browser, though. Each one has it's different ways. Plugins like flash or evernote are really programmed for each browser to be available in any one. Of course the core functionality of whatever plugin you want to write can be shared, but the plugin models are differing and you rather need dotnet or c/c++ to do it.

Bye, Olaf.
ASKER CERTIFIED SOLUTION
Avatar of Cyril Joudieh
Cyril Joudieh
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Joe Pelish

ASKER

CaptainCyril,
I was needing something like opening superpages.com and putting in a phone number and submitting. Right now I always create a new browser window instead of using the same one over and over again. Please advise. Thanks!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>Right now I always create a new browser window instead of using the same one over and over again.

If that`s the main problem. Once you have a reference to a browser like oIE in Cyrils code, this can be used multiple times. What stops you from doing that?

After the code is before the code. Simply do a loop and restart at oIE.navigate to start with the empty form you put in a phone number.

And as I often state at such web automation tasks, not everything is legal.
See http://www.superpages.com/about/copyright.html

Data Mining Prohibited

You may not use bots or similar methods or tools to "data mine" or otherwise gather or extract data from This Website, without SuperMedia's prior consent, which consent may be withdrawn by SuperMedia at any time, with or without notice, in SuperMedia's sole discretion.

Bye, Olaf.
Olaf,
I am just trying to automate a address lookup for my company so we can see why our address correction software says it is undelieverable it is not for commerical use or anything.
That's not what matters, the prohibition is not making a difference on your usage of the data.

Google "superpages API" and you'll find legal ways of programmatic requests via theri web services.

If you already have an address correction software, then why test it with yellow pages at all? You trust what you get for free (at least for low amounts of queries) more than what you pay for?

Bye, Olaf.
No, I am using a phone number for the person to see what needs to be corrected. Thanks for info.
"I am using a phone number for the person to see what needs to be corrected"

"I am just trying to automate a address lookup so we can see why our address correction software says it is undelieverable"

You made yourself fully clear.

Still:

1. The data mining prohibition has an exception: "without SuperMedia's prior consent". So why not ask them? They might do your work for a reasonable fee

2. If your commerical (i assume) address verification software fails with your data the question is, why not update it or it's data, it should be updatable as a software or in it's data to be able to correct your addresses, shouldn't it?

That's my two points. I won't discuss legal stuff in the fabric of history, justice, fairness, insignifacance or whatever else is involved here. I quoted their prohibition. It's their data, they can decide how many request they allow and if they forbid bots. And what you're doing is a bot, even if you limit yourself to check your data and only want to get it updated for your company and even if it's in the interest of your customers to get something delivered, like subscribed magazines or whatever.

Bye, Olaf.