Jump to content

sedgett

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by sedgett

  1. Thanks for the comments. I managed to get it working, and it did turn out to be a timing issue. The application was attempting to change a listbox control as each character was typed. As you suggested, I sent each character and then paused .5s and low and behold it started working. After testing, I determined I could send it all at once if I waited a second afterwards. I also changed the control references from the number version to the classNN and that seems easier. The working code is as follows: Func nroute_route_address($numeric, $alpha, $city, $prov) Send("!RA") WinActivate("Find Places") ControlClick("Find Places","","Button3") Sleep(200) ControlFocus("","","Edit1") Send($numeric) ControlFocus("","","Edit2") Send($city) Sleep(500) Send("{TAB}") Send($prov) Sleep(500) Send("{TAB}") ControlClick("","","Button1") WinWait("Select Street") ControlSetText("","","Edit2","1") ControlFocus("","","Edit1") Send($alpha) Sleep(1000) Send("{ENTER}") Sleep(200) ControlClick("","","Button2") For $i = 1 to 5 Sleep(500) if(ControlCommand ("Find Places", "", "Button20", "IsEnabled", "")) Then $selected = ControlListView ("","","SysListView321","GetText",ControlListView ("","","SysListView321","GetSelected")) OSD($selected,2000) ControlClick("Find Places","","Button20") Return 1 EndIf Next MsgBox(48,"No Address Found!", "No Address Found!", 2) ControlClick("","","Button21") Return 0 EndFunc
  2. Anyone had any luck in scripting Garmin Nroute? cross posted to mp3car forums - http://www.mp3car.com/vbulletin/showthread.php?p=824488 I have a keypad controlled carputer that mostly works with an old version of girder. I have been in the process of redoing it using autoit. Works well for most of the scripting but having troubles with Nroute using "route to address". I'm using an AutoIt gui to prompt for an address and the call a function that is supposed to setup Nroute to route to an address. (I use Send("!RA") to route to an address) The problem is in scripting the Street Name selection. Nroute appears to be doining something unique in manipulating the Editbox and the Listbox. I've tried simply using Send($streetname&"{ENTER}) as well as several more complex variations with ControlSetText, Send, MoveMouse/MouseClick, etc... None of them seem to enable nroute to actually pickup the Street Name I'm sending. The Send will popluate the Edit control, but there is something happening behind the scene with the Edit control modifiying the ListBox. Anyone have a working example? My latest attempt is at http://pastebin.ca/58238 S.
×
×
  • Create New...