Jump to content

Google Maps Form


Recommended Posts

Hiya guys,

I was wondering if you would be able to help me, I seem to be banging my head on a brick wall!!!

I am trying to automate creating a map through Google Maps using IE.au3

I have managed to automate the login, but I can't find the name of the input box to enter the destination I am looking for. I have tried various combinations of the form names that I've found through the source code but none of them seem to work. I wondered if someone would be able to interpret the source code better than me :))

Thanks for any help you are able to give.

Mark

Link to comment
Share on other sites

My friend created a Google Map tool a while back:

http://www.autoitscript.com/forum/index.ph...hl=google++maps

Thanks for your reply, I saw this program, but it doesn't use the IE.au3 function and therefore doesn't specifically populate the search form with the address to look for. This is what I'm trying to do and is why I need to details of the input box/form itself.

Any help greatly appreciated.

Mark

Link to comment
Share on other sites

Hiya guys,

I was wondering if you would be able to help me, I seem to be banging my head on a brick wall!!!

I am trying to automate creating a map through Google Maps using IE.au3

I have managed to automate the login, but I can't find the name of the input box to enter the destination I am looking for. I have tried various combinations of the form names that I've found through the source code but none of them seem to work. I wondered if someone would be able to interpret the source code better than me :))

Thanks for any help you are able to give.

Mark

Seems pretty straight forward to me... are you using DebugBar? Check this out and compare it to what you tried:

#include <IE.au3>

$oIE = _IECreate("maps.google.com")

$oForm = _IEFormGetObjByName($oIE, "q_form")
$oInput = _IEFormElementGetObjByName($oForm, "q")
$oSubmit = _IEFormElementGetObjByName($oForm, "btnG")
_IEFormElementSetValue($oInput, "2 Downing Street, London, England")
_IEAction($oSubmit, "click")

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Seems pretty straight forward to me... are you using DebugBar? Check this out and compare it to what you tried:

#include <IE.au3>

$oIE = _IECreate("maps.google.com")

$oForm = _IEFormGetObjByName($oIE, "q_form")
$oInput = _IEFormElementGetObjByName($oForm, "q")
$oSubmit = _IEFormElementGetObjByName($oForm, "btnG")
_IEFormElementSetValue($oInput, "2 Downing Street, London, England")
_IEAction($oSubmit, "click")

Dale

Dale,

Thankyou so much for the help. I hadn't seen the Debug tool before. Seems pretty simple I'm not sure how I missed that, i've been staring at the code all morning!!

Link to comment
Share on other sites

I have used IE.au3 with the Google Maps API with very good results. Using the API, you don't have to automate any forms. The only downside is that you cannot directly write the HTML to the window. You must write it to a file and then refresh the IE control. I can post some code later if you want, but writing out the Google Maps API combined with body{border:0px;} makes a really slick looking app.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...