Using Google Earth from Shell

jesb4ppc

Member
Licensed User
Hi everyone:

I'm trying to launch a .KML file using the Shell with this code:

Shell ("googleearth.exe","myfile.kml")

Google Earth launches, but I got the message:

"Unable to open Earth file\myfile.kml for read"

But if I open a cmd session, and type:
googleearth.exe myfile.kml

everything works fine. So, the kml file is Ok, and the way of launching it from the Desktop shell is also Ok. What am I doing wrong?

Any Idea of how can I do this?


By the way, I've seen Google Earth has a COM API Library. (http://bbs.keyhole.com/ubb/showflat.php/Cat/0/Number/613507/an/0/page/0#613507)

Is it possible to use it in our dear basic4ppc?

Thanks.
 

jesb4ppc

Member
Licensed User
Solved.

Hi Erel,

Yes, It was my fault...I wasn't using the quotes in the file path. It works fine just adding it. I mean:

Shell ("googleearth.exe",chr(34)& "myfile.kml"& chr(34))

:signOops:

Thanks for your time. (and software!)
 
Top