houseonfire Posted July 26, 2009 Posted July 26, 2009 I'm about to install a touch screen into my Asus 1000HE Netbook and while im at it, I'm putting a GPS inside also.I made two programs to help navigate the streets and trips GPS program utilizing the touch screen.The blank red dots are there to move the window around, otherwise its always on top and doesn't move.Shortcut navigationsexpandcollapse popup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Built for EEEPCs at 1024x600 resolution; ;For Microsoft Streets & Trips;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $form1 = GUICreate("GPS Touch Screen Buttons", 678, 57, 1, 10, BitOR($WS_SYSMENU,$WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE,$WS_EX_TOOLWINDOW )) $Near = GUICtrlCreateButton("Nearby Places", -1, -1, 81, 57) $FindPlace = GUICtrlCreateButton("Find....", 78, -1, 81, 57) $Route = GUICtrlCreateButton("Route Planner", 157, -1, 81, 57) $Directions = GUICtrlCreateButton("Directions", 236, -1, 81, 57) $Nav = GUICtrlCreateButton("Nav Pane", 316, -1, 81, 57) $GPSMen = GUICtrlCreateButton("Show GPS Info", 395, -1, 81, 57) $ZoomIN = GUICtrlCreateButton("Zoom In +", 474, -1, 81, 57) $ZoomOUT = GUICtrlCreateButton("Zoom Out --", 553, -1, 81, 57) $close = GUICtrlCreateButton("X", 650, 0, 27, 25, BitOR($BS_DEFPUSHBUTTON,$WS_GROUP)) GUICtrlSetBkColor(-1, 0xFF0000) $hLabel = GUICtrlCreateLabel("", 660, 40, 15, 15, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $close Exit Case $Near ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:ToolbarWindow32; INSTANCE:1]", "^d") sleep (1000) WinMove ("GPS Sensor","", 776, 100) Case $GPSMen ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:ToolbarWindow32; INSTANCE:1]", "^a") sleep (1000) WinMove ("GPS Sensor","", 776, 100) Case $Route ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:ToolbarWindow32; INSTANCE:1]", "^r") sleep (1000) WinMove ("GPS Sensor","", 776, 100) Case $Directions ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:ToolbarWindow32; INSTANCE:1]", "^u") sleep (1000) WinMove ("GPS Sensor","", 776, 100) Case $ZoomIN ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:AfxWnd80; INSTANCE:2]", "{NUMPADADD}") sleep (1000) WinMove ("GPS Sensor","", 776, 100) Case $ZoomOUT ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:AfxWnd80; INSTANCE:2]", "-", 1) sleep (1000) WinMove ("GPS Sensor","", 776, 100) Case $FindPlace ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:ToolbarWindow32; INSTANCE:1]", "^f") sleep (1000) WinMove ("Find","", 0, 100) sleep (1000) WinMove ("GPS Sensor","", 776, 100) Case $nav ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:ToolbarWindow32; INSTANCE:1]", "^b") EndSwitch WEndAnd the maps navigationalexpandcollapse popup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Built for EEEPCs at 1024x600 resolution; ;For Microsoft Streets & Trips;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form2 = GUICreate("Map Navigation", 268, 101,688, 10, Bitor($WS_SYSMENU,$WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE,$WS_EX_TOOLWINDOW )) $up = GUICtrlCreateButton("Up", 88, 0, 89, 49) $down = GUICtrlCreateButton("Down", 88, 48, 89, 49) $left = GUICtrlCreateButton("Left", 0, 24, 89, 49) $right = GUICtrlCreateButton("Right", 176, 24, 89, 49) $close = GUICtrlCreateButton("x", 248, 0, 19, 17) GUICtrlSetBkColor(-1, 0xFF0000) $hLabel = GUICtrlCreateLabel("", 250, 80, 15, 15, -1, $GUI_WS_EX_PARENTDRAG) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $close Exit Case $up ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:AfxWnd80; INSTANCE:2]", "{UP}") Case $down ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:AfxWnd80; INSTANCE:2]", "{down}") Case $left ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:AfxWnd80; INSTANCE:2]", "{left}") Case $right ControlSend ( "Map - Microsoft Streets & Trips", "","[CLASS:AfxWnd80; INSTANCE:2]", "{right}") EndSwitch WEndThey are very simple and they work
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now