Page 29 of 31 FirstFirst ... 19202122232425262728293031 LastLast
Results 281 to 290 of 309

Thread: Garmin RR: Overlay and OSK for GMPC Updated 11/09/08

  1. #281
    Constant Bitrate
    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    169
    Cheers for that, seems to be working fine on my WinXP virtual machine. Hopefully works the same on the Win7 carPC. I edited the scripts slightly to suit the SypheR skin which I'm currently using (the positioning of the window). I made the paths to the executables relative so there is no need to edit the path in the script as long as they are in the same folder as each other. Also, I made it set focus back to GMPC when the OSK is toggled so you don't have to click back into GMPC after opening the OSK to type something.

    openOSK.au3
    Code:
    #include <WindowsConstants.au3>
    Run("FreeVK.exe")
    WinWait("[CLASS:TMainForm]")
    
    $hWnd = WinGetHandle("[CLASS:TMainForm]")
    
    $iOld_Styles = _WinGetStyle($hWnd, 0)
    $iOld_ExStyles = _WinGetStyle($hWnd, 1)
    
    $iNew_Styles = BitAND($iOld_Styles, BitNOT($WS_SYSMENU), BitNOT($WS_CAPTION)) ;, BitNOT($WS_SIZEBOX))
    
    _WinSetStyle($hWnd, $iNew_Styles, $iOld_ExStyles)
    
    WinMove("[CLASS:TMainForm]", "", -3, 265, 807, 273)
    WinMove("[CLASS:TMainForm]", "", -4, 266, 808, 274)
    
    Func _WinSetStyle($hWnd, $Style = -1, $ExStyle = 0)
        Local Const $GWL_STYLE = -16, $GWL_EXSTYLE = -20
        Local Const $SWP_NOMOVE = 0x2, $SWP_NOSIZE = 0x1, $SWP_SHOWWINDOW = 0x40, $SWP_NOZORDER = 0x4
        Local $iFlags = BitOR($SWP_SHOWWINDOW, $SWP_NOSIZE, $SWP_NOMOVE, $SWP_NOZORDER) 
    
        If $Style = -1 Then $Style = BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU)  
    
        DllCall("User32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE, "int", $Style)
        DllCall("User32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_EXSTYLE, "int", $ExStyle)
        DllCall("User32.dll", "int", "SetWindowPos", "hwnd", $hWnd, "hwnd", 0, "int", 0, "int", 0, "int", 0, "int", 0, "int", $iFlags)
    EndFunc
    
    Func _WinGetStyle($hWnd, $iIndex=0)
        Local Const $GWL_STYLE = -16, $GWL_EXSTYLE = -20   
    
        Local $iGWL_Index = $GWL_STYLE
        If $iIndex > 0 Then $iGWL_Index = $GWL_EXSTYLE
    
        Local $aStyles = DllCall('User32.dll', 'long', 'GetWindowLong', 'hwnd', $hWnd, 'int', $iGWL_Index)
        Return $aStyles[0]
    EndFunc

    closeOSK.au3
    Code:
    If WinExists("[CLASS:TMainForm]") Then
    	WinClose("[CLASS:TMainForm]", "")
    EndIf
    toggleOSK.au3
    Code:
    If WinExists("[CLASS:TMainForm]") Then
    	WinClose("[CLASS:TMainForm]", "")
    	If WinExists("Garmin Mobile PC") Then
    		WinActivate("Garmin Mobile PC")
    	EndIf
    Else
    	Run("openOSK.exe")
    	If WinExists("Garmin Mobile PC") Then
    		WinActivate("Garmin Mobile PC")
    	EndIf
    EndIf
    Edit: Updated code a little.
    Attached Files Attached Files

  2. #282
    kuo
    kuo is offline
    Variable Bitrate kuo's Avatar
    Join Date
    Jun 2003
    Location
    Greensboro, NC
    Posts
    439
    i'm running win7 64bit in my car and it works fine. i forgot that i had the osk toggle button coded in exectbl.ini with a "||activate;Garmin Mobile PC" but your way is much cleaner.
    my car: 2003 g35 coupe, 2.5ghz c2d cpu, gigabyte micro atx mb, dsatx
    wife's car: 2004 honda accord coupe 2.4ghz p4 cpu, asus micro atx mb, opus 150
    company car: 2006 chevy avalanche 2.0ghz p4 laptop, cnx p1900

  3. #283
    Constant Bitrate
    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    169
    Ah that makes sense. Anyway, just tested it on my carPC (Win7 32bit) and it's working great Much better than the other overlay too since the OSK is transparent and you can see the street name results/etc better.

    I found GMPC did disappear once but an advantage of the OSK toggle button is that it brings it back up again . Now I can reliably use GPS again after months of frustration when I actually did need to use it. Thanks for the tip ^_^

    I guess one thing to improve is not having to move it twice to remove the title bar.




  4. #284
    Variable Bitrate
    Join Date
    Jun 2007
    Posts
    234
    very good job...............thank you

    In win 7 u can easy to use tablet pc input panel its perfect its can resize autohide easy to move always on top...etc

    I test by use this command to call osk on skin "run;c:/programfiles/common files/microsoft shared/ink/taptip.exe"

    I use freevk.exe because my carpc use winxp

  5. #285
    Variable Bitrate
    Join Date
    Jun 2007
    Posts
    234
    I want to strete osk window to button Please....
    Attached Images Attached Images  

  6. #286
    Constant Bitrate
    Join Date
    Sep 2008
    Location
    Western Australia
    Posts
    169
    Hmm try edit the FreeVK.ini, seems to have some height and width settings.

  7. #287
    Variable Bitrate
    Join Date
    Jun 2007
    Posts
    234
    Yeh... I try Freevk.ini settings
    But I cannot fix height and Its seem fix by autoit

  8. #288
    kuo
    kuo is offline
    Variable Bitrate kuo's Avatar
    Join Date
    Jun 2003
    Location
    Greensboro, NC
    Posts
    439
    if you are using the autoit scripts you will have to make the adjustment there.
    my car: 2003 g35 coupe, 2.5ghz c2d cpu, gigabyte micro atx mb, dsatx
    wife's car: 2004 honda accord coupe 2.4ghz p4 cpu, asus micro atx mb, opus 150
    company car: 2006 chevy avalanche 2.0ghz p4 laptop, cnx p1900

  9. #289
    Variable Bitrate
    Join Date
    Jun 2007
    Posts
    234
    I dont understand about autoit scripts

    Anyone please help me

    thank you

  10. #290
    kuo
    kuo is offline
    Variable Bitrate kuo's Avatar
    Join Date
    Jun 2003
    Location
    Greensboro, NC
    Posts
    439
    this particular autoit script is fairly simple and easy to modify. autoit is also free for you to download. just install autoit, open up the autoit script editor or your favorite text editor and copy and paste the code from above and create the separate files. find and modify the second winmove line to your liking. the four sets of numbers are x, y, width, height.

    WinMove("[CLASS:TMainForm]", "", -3, 265, 807, 273)
    WinMove("[CLASS:TMainForm]", "", -4, 266, 808, 274)

    the file extension needs to be .au3. right click on each file and select compile. that should be it.
    my car: 2003 g35 coupe, 2.5ghz c2d cpu, gigabyte micro atx mb, dsatx
    wife's car: 2004 honda accord coupe 2.4ghz p4 cpu, asus micro atx mb, opus 150
    company car: 2006 chevy avalanche 2.0ghz p4 laptop, cnx p1900

Similar Threads

  1. Replies: 12
    Last Post: 09-23-2008, 08:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •