image find googlemaps

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
poopstamper
Newbie
Posts: 3
Joined: Mon Feb 09, 2009 1:56 pm

image find googlemaps

Post by poopstamper » Mon Feb 09, 2009 2:08 pm

I want the macro to search for icons in googlemaps and it doesnt work. I know what I want but I have trouble with the way to make the script do as I want.

find icons in the map > until all icons found and left clicked > move the map to the right > search again for icons to find in the map.

thats all.

here is the script

Code: Select all



WaitWindowOpen>ZMaps: DigiPoint v1 - Mozilla Firefox

//Get bounds

Wait>2

GetActiveWindow>ZMaps: DigiPoint v1 - Mozilla Firefox,0,0,XPos,YPos

Label>image_search

Wait>2

//Capture the IE Window to a bitmap
IfFileExists>c:\temp\screen.bmp
DeleteFile>c:\temp\screen.bmp
EndIf
ScreenCapture>0,0,XPos,YPos,c:\temp\screen.bmp

//find busicon
FindImagePos>c:\temp\busicon.bmp,c:\temp\screen.bmp,50,1,XPos,YPos,NumFound1

Wait>2

if>NumFound1>0
  Goto>image_found

else
  Goto>image_notfound

endif

Label>image_found
Wait>1

//Capture the infoWindow to a bitmap and save location

Wait>1
MouseMove>XPos_0,YPos_0
LClick

Wait>1


Goto>image_search



Label>image_notfound

//Capture a small IE Window to a bitmap
IfFileExists>c:\temp\screen2.bmp
DeleteFile>c:\temp\screen2.bmp
EndIf
ScreenCapture>200,200,600,300,c:\temp\screen2.bmp


//find position of the goright button in a small screen

FindImagePos>c:\temp\goright.bmp,c:\temp\screen2.bmp,20,1,XPos,YPos,NumFound2
Wait>2
MouseMove>XPos_0,YPos_0
Wait>2
LClick

Goto>image_search


Any help would be welcome.

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

New Approach

Post by kpassaur » Wed Feb 11, 2009 11:36 am

This may or may not be helpful. When you are on the page get the source and parse it out. So, instead of looking for an Icon you are looking for the text that displays it in the source.

poopstamper
Newbie
Posts: 3
Joined: Mon Feb 09, 2009 1:56 pm

parsing it out

Post by poopstamper » Wed Feb 11, 2009 11:58 am

that might be helpful but dont be shy. How would I do such a thing on a googlemap? please give me more information to go on.

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

google map

Post by kpassaur » Wed Feb 11, 2009 12:09 pm

In the address bar you have the page, so you do a HTTP request and have the source code for the page. Then you search the text, most likely (not sure) you will have the link for whatever you want to do.

Just go to a Google Map and click on view source and dump it into Notepad and you will see what is there. The key on this is that you can easily create a loop so you get the first match, then the second etc. until all the text has been searched.

I don't really understand exactly what you are tring to do, but I have found that it is very easy to get the source and get what I want from the source. The difficuly is that when a site is updated you have to redo it. I did one for jokes, it would go to comedy central, find one at random and pull out the joke instead of all of their annoying pop ups. However, they changed the site.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts