|
 |
|
04-21-2006, 10:09 PM
|
#1
|
|
Newbie
Join Date: Apr 2006
Posts: 12
|
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.
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
04-21-2006, 10:18 PM
|
#2
|
|
Raw Wave
Join Date: Oct 2004
Posts: 3,453
|
nice! thanks for sharing
|
|
|
04-22-2006, 01:09 AM
|
#3
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,603
|
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.
|
|
|
04-22-2006, 10:19 AM
|
#4
|
|
Newbie
Join Date: Apr 2006
Posts: 12
|
Quote: 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.
|
|
|
04-25-2006, 07:51 PM
|
#5
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,603
|
Thankyou. I just got around to compiling it. Works well. And to answer the memory ?, it takes 3.1Mb of RAM so basically nothing.
|
|
|
05-15-2006, 05:51 PM
|
#6
|
|
Newbie
Join Date: Nov 2000
Location: Augusta GA
Posts: 50
|
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
Last edited by DarkFox1; 05-15-2006 at 05:53 PM.
|
|
|
05-23-2006, 10:51 AM
|
#7
|
|
Newbie
Join Date: Nov 2005
Location: Pittsburgh
Posts: 40
|
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
|
|
|
05-23-2006, 12:45 PM
|
#8
|
|
Variable Bitrate
Join Date: Apr 2005
Location: Midtown Manhattan
Posts: 398
|
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
|
|
|
05-24-2006, 09:10 PM
|
#9
|
|
Variable Bitrate
Join Date: May 2005
Location: Elizabeth City, NC
Posts: 294
|
nice work(subscribed)
__________________
95 Mazda Protege LX
Worklog
Overall [Project Dead] 0%
2003 Nissan Altima
[ XXXXXXXX--] 80% Planning
[ XX--------] 20% FABRICATION/INSTALLATION
Worklog
|
|
|
05-25-2006, 05:44 PM
|
#10
|
|
Variable Bitrate
Join Date: May 2005
Location: Elizabeth City, NC
Posts: 294
|
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
Last edited by gameboy; 05-30-2006 at 08:07 PM.
|
|
|
05-27-2006, 08:01 PM
|
#11
|
|
Maximum Bitrate
Join Date: Aug 2005
Posts: 520
|
Could you also have the script enable driving guidance from the GPS pane as well? Driving guidance=voice directions
|
|
|
05-28-2006, 10:24 PM
|
#12
|
|
Variable Bitrate
Join Date: May 2005
Location: Elizabeth City, NC
Posts: 294
|
Quote: 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
|
|
|
05-29-2006, 12:58 AM
|
#13
|
|
Maximum Bitrate
Join Date: Aug 2005
Posts: 520
|
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.
|
|
|
05-29-2006, 03:52 AM
|
#14
|
|
Variable Bitrate
Join Date: May 2005
Posts: 260
|
Quote: 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
|
|
|
05-29-2006, 05:23 AM
|
#15
|
|
Maximum Bitrate
Join Date: Aug 2005
Posts: 520
|
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.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:11 AM.
| |