Jump to content

GlowTube

Members
  • Posts

    2
  • Joined

  • Last visited

GlowTube's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks for the response. I'd like to set the focus to a button that is resident on the first page of a multi-tab control. Here's what I tried: Local $a Run ("C:\Programs\xyz\xyz.exe", "") WinWaitActive("The Program") $a = ControlFocus ("[NAME:tabPage_Startup]", "", "[CLASS:Button; TEXT:A Large Button]") if $a <> 1 Then MsgBox(0, "Result", "The call failed.") else MsgBox(0, "Result", "Success.") EndIf Exit The code above does not work, and always fails. Also note that I can manually set the focus to the button in question by sending the window two {TAB} characters, so the control is indeed reachable. What am I doing wrong?
  2. I'm an old programmer but a total newbie in AutoIt. Very impressed with it so far, though. On to my question: I'm trying to automate a Winapp a colleague wrote in C#, running it on Windows XP SP3. I have been successful in talking to the window using Send(), and also using MouseMove() and MouseClick(). But I'd really like to use messages to the controls themselves rather than using all those absolute mouse coordinates. So far I've been totally unsuccessful with calls to API's like ControlFocus(), ControlClick(), and ControlEnable(). My syntax is correct, but nothing happens to the app. I've used the AutoIt Window Info tool to grab data items like classes, names, and control ID's, but so far no go. I've tried to address buttons, text boxes, and check boxes. Nada. To add complexity, the controls I'm trying to access are all located in various tabs, not on the window proper. This forum is massive, but I've tried to search for good examples of using ControlClick in my situation. I'm sure the answer relates to which class I should be using - the class for the main window, the class for the tab window, or the class for the control's window (or similar). Just guessing. Or maybe there's another API I should be trying rather than ControlClick? The class names are large and appear autogenerated: WindowsForms10.BUTTON.app.0.378734a Thanks for any help. Pointing me towards an example would be super.
×
×
  • Create New...