Announcement

Collapse
No announcement yet.

Automatically start GPS for Streets '06

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatically start GPS for Streets '06

    I've put together an AutoIT3 script to automatically start the GPS and answer the "safety warning" whenever it isn't already started. I searched before I did this and didn't see it anywhere, so I thought it might be useful to others:

    Opt("WinTitleMatchMode",2)
    While 1
    WinWait("Microsoft Streets & Trips","")
    if Not ControlCommand("Microsoft Streets & Trips","","Button39","IsChecked","") Then
    ControlCommand("Microsoft Streets & Trips","","Button39","Check","")
    WinWait("Safety Warning","")
    ControlClick("Safety Warning","",5912)
    EndIf
    Sleep(5000)
    WEnd


    This can be compiled into an EXE file, and just run in the background. It checks once every 5 seconds and starts the GPS if necessary.

  • #2
    nice! thanks for sharing
    Dr. Ron Paul for President 2008

    Hope for America - http://www.ronpaul2008.com

    Who is Ron Paul? - Why do we need Ron Paul?

    __________________
    CarPC Newbs Start Here: All your questions answered, as if by E.S.P.

    Comment


    • #3
      I'm a complete moron with compiling exe's, but I would like this. How do I compile it? When I do then just run it and it will stay in the background processes and continuously check right? Any idea how much CPU power this uses? Thanks in advance.
      Fusion Brain Version 6 Released!
      1.9in x 2.9in -- 47mm x 73mm
      30 Digital Outputs -- Directly drive a relay
      15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
      Buy now in the MP3Car.com Store

      Comment


      • #4
        Originally posted by 2k1Toaster
        I'm a complete moron with compiling exe's, but I would like this. How do I compile it? When I do then just run it and it will stay in the background processes and continuously check right? Any idea how much CPU power this uses? Thanks in advance.
        Just download and install AutoIT3, and save the script as a .au3 file. If you right click on the file, you will see an option to compile it to a .exe file (so that autoit doesn't have to be installed on the carpc). I think that the resources it uses are pretty minimal - it will just sit in the background and mostly sleep.

        Comment


        • #5
          Thankyou. I just got around to compiling it. Works well. And to answer the memory ?, it takes 3.1Mb of RAM so basically nothing.
          Fusion Brain Version 6 Released!
          1.9in x 2.9in -- 47mm x 73mm
          30 Digital Outputs -- Directly drive a relay
          15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
          Buy now in the MP3Car.com Store

          Comment


          • #6
            I've been messing with this all day and its frustrating me to no end. I am trying to alter the script a bit so that it selects button39,41,44 and 45 (start GPS, rotate map, keep position centered, create gps trail) and I get some stupid error about no while command with wend. how am I supposed to add to this? I've tried everything! argh!
            2005 Subaru Legacy GT, carputer in progress
            Current status: Phase 1 Complete: working in car with no bugs, Phase II started, screen out of dash, making working mockup for beta testing

            Comment


            • #7
              I used a line of sendkey button commands to do that...but I have to press a button. It went something like this.

              B01,0,343,135,68,"ACTIVATE;Microsoft Streets & Trips||SENDKEY;%TGS%TGM%TGA","GPS On"

              I'm not if sure you can execute a RR command upon loading a skin. I didn't get a chance to play with AutoIT3 yet. Sounds interesting.
              Colossians 1:16 - Everything

              Comment


              • #8
                I have not had the time to mess with this yet but do you think that this may be something that you can apply via registry?

                For example, if u turnon the gps, the trailing function, and maybe some other functions, is there a change in the registry?

                I am going to take a snapshot of my registry, turn on gps and some of the other options, then take another "after" snapshot of the registry... afterwards, i will compare the two "S&T" related hives and see if there are differences....

                if this is the case, then you can create a batch file that does two things: launches streets and trips and immediately after launch, you can apply the .reg registry keys with a regedit /s (i believe) command...

                i will let you know know next week how this works. my carputer is a mess right now. lol.
                - sh00k
                Duct tape and a Bandana for the win, b!shes!!!

                My Setup:http://www.mp3car.com/vbulletin/showthread.php?t=73500

                Cost so far: Less than a grand ;]



                _________________
                Economy/Commuter cars + Computers = many entertained miles

                Comment


                • #9
                  nice work(subscribed)
                  95 Mazda Protege LX
                  Worklog
                  Overall [Project Dead] 0%

                  2003 Nissan Altima
                  [XXXXXXXX--] 80% Planning
                  [XX--------] 20% FABRICATION/INSTALLATION

                  Worklog

                  Comment


                  • #10
                    For Gps autostart, and rotate map, keep position Centered:

                    // Cut here
                    Opt("WinTitleMatchMode",2)
                    While 1
                    WinWait("Microsoft Streets & Trips","")
                    if Not ControlCommand("Microsoft Streets & Trips","","Button39","IsChecked","") Then
                    ControlCommand("Microsoft Streets & Trips","","Button39","Check","")
                    WinWait("Safety Warning","")
                    ControlClick("Safety Warning","",5912)
                    EndIf
                    Sleep(2500)
                    if Not ControlCommand("Microsoft Streets & Trips","","Button41", "IsChecked","") Then
                    ControlCommand("Microsoft Streets & Trips","","Button41","Check","")
                    EndIf
                    If Not ControlCommand("Microsoft Streets & Trips","","Button44", "IsChecked","") Then
                    ControlCommand("Microsoft Streets & Trips","","Button44","Check","")
                    Endif
                    Sleep(5000)
                    WEnd
                    //End Cut here

                    That will do it...., however you will not be able to turn that stuff off, with out closing the script, as ever 5 seconds it will check
                    95 Mazda Protege LX
                    Worklog
                    Overall [Project Dead] 0%

                    2003 Nissan Altima
                    [XXXXXXXX--] 80% Planning
                    [XX--------] 20% FABRICATION/INSTALLATION

                    Worklog

                    Comment


                    • #11
                      Could you also have the script enable driving guidance from the GPS pane as well? Driving guidance=voice directions

                      Comment


                      • #12
                        Originally posted by Silentbob343
                        Could you also have the script enable driving guidance from the GPS pane as well? Driving guidance=voice directions
                        ok here is what you need to do:

                        open s&t by itself, do not go thru front end,
                        open the driving guidance window, and make sure the gps window is open also,
                        add/remove any of the tooltrays you want/don't want
                        save as template to: program files\microsoft streets & trips\templates\
                        file name: New North Americian(should auto complete).

                        whenever you open streets and trips after that, it *should* open everything as you want it
                        95 Mazda Protege LX
                        Worklog
                        Overall [Project Dead] 0%

                        2003 Nissan Altima
                        [XXXXXXXX--] 80% Planning
                        [XX--------] 20% FABRICATION/INSTALLATION

                        Worklog

                        Comment


                        • #13
                          The GPS pane has a couple boxes that can be checked and all of which are used in your AutoIT script:
                          "Start GPS Tracking"
                          "Provide Driving Guidance"
                          "Arrange Map View"
                          "-Keep Position Centered"
                          "-Use Dynamic Turn View"
                          "Rotate Map to Follow Direction"
                          "Create GPS Trail"

                          I'm familiar with the ability to save certain setting via template so why the need for a script? Specifically, if turning these options on and saving as a template will work to keep them turned on in future launches why the need for an AutoIT script? I can see using it to bypass the safety warning.

                          Comment


                          • #14
                            Originally posted by Silentbob343
                            The GPS pane has a couple boxes that can be checked and all of which are used in your AutoIT script:
                            "Start GPS Tracking"
                            "Provide Driving Guidance"
                            "Arrange Map View"
                            "-Keep Position Centered"
                            "-Use Dynamic Turn View"
                            "Rotate Map to Follow Direction"
                            "Create GPS Trail"

                            I'm familiar with the ability to save certain setting via template so why the need for a script? Specifically, if turning these options on and saving as a template will work to keep them turned on in future launches why the need for an AutoIT script? I can see using it to bypass the safety warning.
                            Saving as a template only saves what windows you have open (gps task pane, and the driving directions), and how many miles you have the map zoomed out to, but not the specific check boxes (keep position center, etc)

                            ..at least that's how mine works.

                            Thanks for this script, I'm gunna have to test this one out. The popup warning and having to re-check the boxes each time is annoying.
                            Take 2 - '03 Audi A4
                            macmini with an 8" widescreen (in progress)

                            My 2004 Ford Ranger:
                            14" LCD w/ custom made aluminum bezel
                            Completly custom computer case

                            status: Totaled

                            Comment


                            • #15
                              hmm......silly microsoft. They allow you to keep the driving directions checked when saved as a template, but none of the others....

                              As Rocky said, thank you for the script it's much appreciated.

                              Comment

                              Working...
                              X