The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > GPS

Reply
 
Thread Tools Display Modes
Old 06-03-2005, 04:51 PM   #1
Newbie
 
Join Date: Jun 2005
Posts: 4
My Photos: (0)
iGuidance 2.x auto-run shortcut

In appreciation to all of you who have helped me get my car pc running smoothly, I have written a compiled vb script that will launch iGuidance from a front-end application (I use Digital Dash app) and maximize the window. The script will examine the currently running processes, and if the app is already running, move focus back, rather than launching another instance of iGuidance. On my own system, I also place a shortcut to the script in the start menu so that the app comes up and is ready once the front-end loads. For added convenience, the script will wait 2 seconds, and then send an "enter" key command so to bypass the warning screen. If you did not install iGuidance in the default directory, the script will not function. I’ve included the vbs below if you want to modify and work on it for yourself.

I hope this helps someone out!



'James Eidson - 06/02/05
'run and/or set focus on specified application


'force variable dim
Option Explicit

'dim variables
Dim WshShell
Dim Process, ProcessList
Dim strApplicationName, strApplicationDirectory
Dim strProcessName

'user settings
'------------------------------------
'set process name variable
strProcessName = "iGuidance"

'set application name variable
strApplicationName = "iGuidance"

'set application directory variable
'- don't forget trailing "\"
strApplicationDirectory = "C:\Documents and Settings\All Users\Start Menu\Programs\iNav\iGuidance\"
'------------------------------------

'ignore errors
on error resume next

set WshShell = WScript.CreateObject("WScript.Shell")

'get a list of processes that are running
For Each Process In GetObject("winmgmts:").InstancesOf("Win32_process" )
ProcessList = ProcessList & " " & Process.Name
Next

'see if application is running
If instr(ProcessList, strProcessName) > 0 Then

'If application is running, then return focus to it
WshShell.AppActivate (strApplicationName)

Else

'if application not running, open it
WshShell.Run """"&strApplicationDirectory&strProcessName&"""",3 , false

'run command switches
'0 Hides the window and activates another window.
'1 Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
'2 Activates the window and displays it as a minimized window.
'3 Activates the window and displays it as a maximized window.
'4 Displays a window in its most recent size and position. The active window remains active.
'5 Activates the window and displays it in its current size and position.
'6 Minimizes the specified window and activates the next top-level window in the Z order.
'7 Displays the window as a minimized window. The active window remains active.
'8 Displays the window in its current state. The active window remains active.
'9 Activates and displays the window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when restoring a minimized window.
'10 Sets the show-state based on the state of the program that started the application.

'pause until application opens
WScript.Sleep 2000

'run application
WshShell.AppActivate (strApplicationName)

'send the enter command
WshShell.SendKeys "{Enter}"
End If

'do cleanup
Set WshShell = Nothing
Attached Files
File Type: zip set_nav_focus.zip (93.9 KB, 134 views)
ziggyrama is offline   Reply With Quote
Sponsored Links
Old 08-13-2005, 06:05 PM   #2
Newbie
 
Join Date: Aug 2005
Posts: 3
My Photos: (0)
do I use the setfoces.exe as the shourcut to use in ME to launch iguid? i did that and iguid opens and media engine minimizes (goes out of the taskbar as well) winamp dissapears but music keeps playing? Any suggestions?
cisach is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
iGuidance SDK Quattro GPS 57 06-23-2006 07:37 AM


All times are GMT -5. The time now is 04:29 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics