I have been trying to figgure this out from all different angles as well. I wrote a fast and crude script to determine if iGuidance is notifing you of an upcoming turn. This is done by looking for the "Olive Green" top bar that show's up when a turn is approaching. Right now it will only work if the iGuidnace screen is on top, and showing. Thus, the only thing it could be used for currently is pausing winamp or something.
I THOUGHT there was a way to "go behind" the current window, and check for Pixel color, but I haven't found a way as of yet. I THINK that's how iGMon worked. If that can be worked out, this may be a sollution.
here is a script EDIT: Read 4 posts down, There is a MUCH improved version to try out now
AutoIt actually uses it own scripting language. You can Find AutoIt Here. (It's COMPLETELY FREE)
The nice thing is when the script is compiled with AutoIt, it makes it into an .exe that will run on a system without AutoIt installed.
From the Help File:
It's great for automating ALL sorts of Stuff, not just stuff for a CarPC.AutoIt has a much more standard syntax -similar to VBScript and BASIC
As for putting it in my skin, that is the final intent. I will hold off a while and see where we get with the FULL functionality of pausing the music AND switching to the GPS screen as well.
Hey JohnWPB and everyone else, if you guys want to test your script in real world without put it in the car and driving around or play back a pre-recorded gps stream, do this.
Pick a destination and start navigate. iG will say "waiting for GPS signal".
Go to File -> Start Demo. iG will start navigate to the selected destination in demo mode. It is the same as real time navigation mode.
It's Getting Somewhere!!!!! b8bboi answered me back, and told me to use the ControlGetHandle to find if iGuidance has switched to the guidance screen, instead of the pixel color that I was using..
This also works when iGuidance is MINIMIZED, OR if it is HIDDEN in Road Runner!!!!!!
Someone else please test this out on their machine to confirm, but this was/is a MAJOR hurdle to overcome to get this to a finished product, that can pause winamp, and bring the GPS screen to the front.
Right now, it is just a message box that will pop-up to let you know if it switches to Guidance, or switches back. The msg box will dissappear after 1 second. The next step would be to take that msgbox "trigger" and put it to use to switch the RR screens, and/or winamp volume/pausing.
Here is the file, just unzip it and run it, then fire up IG either standalone or in RR. (In Standalone you can use the toolbar to switch between map & guidance & You can also set a route and demo it like Matrix said in the last post). A trick I have been using for a while to test stuff
Thanks Chuck! That shows it also is "backwards Compatible with earlier versions of IG". Unfortunately. this is only the first hurdle. , it can't be used to pause winamp or lower the volume correctly Right now. I have it pausing WinAmp when the Guidance window comes up, and resuming when it goes away, and they are WAY out of time with the voice.
Speech in IG seems to have it's own set of timing, and is not related to the Guidance payne. For instance, iG will tell you turn right in 2 miles, but the Guidance screen will not come up till a short time before the actual turn. Also if you are making a left at a red light, the guidance screen will remain in place till you clear the intersection, keeping the music paused all the while.
On the bright side, this WILL work for switching the iGuidance to the front when a turn is approaching, and switch back when completed.
Ok, So I'm on a roll
Here is a rough draft of how it will work in a real world situation. The script below will actually switch the screens in Road Runner. I found code in the Road Runner SDK examples written by b8bboi to send commands to RR from an AutoIt script, so many thanks to b8bboi for that!
Download, and run the script, it will show in the system tray. Fire up Road Runner, and go to iGuidance, Drag to a place on the map a few miles away, and click and hold and choose "Set Destination". Then click the Iguidance Menu button, choose destination, and choose DEMO. iGuidance will start to do that route in demo mode. You can then go to the main menu, or any other screen, and sit back and wait. You will hear iGuidace giving dirrections and distances ect, but when the turn gets close, the screen SHOULD switch back to iG. When the turn is completed, it again SHOULD put you back on the screen you were on.
There are still a few kinks to work out, and polish it up, but it's getting better!
nice i will try it out tonight when i get home. graet work JohnWPB
It might be better if you use a different command then “GPS” so you could do other stuff too.
SendCommand($My_Hwnd, $hwnd_RR, "GPS")
SendCommand($My_Hwnd, $hwnd_RR, "AUTOGPS")