Using Google Earth from Shell

Discussion in 'Questions (Windows Mobile)' started by jesb4ppc, Aug 22, 2007.

  1. jesb4ppc

    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.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Does your file name include any spaces?
    Have you tried to use the full path in the Shell method?
     
  3. jesb4ppc

    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!)
     
Loading...