title: AutoIt: Click an Control without ID
body: <p>this is my very first Question. Im trying since about 2 Hours.
  I Have to compile an AutoIt Executable which will install Xampp on the Computer.
  This is what ive done so far:</p>
  
  <pre><code>#RequireAdmin
  ; Script Start
  Opt("WinTitleMatchMode", 4)
  run ("xampp-win32-7.1.1-0-VC14-installer.exe")
  WinWait ("Datei öffnen - Sicherheitswarnung")
  ControlClick( "Datei öffnen - Sicherheitswarnung","A&amp;usführen","Button" )
  Sleep ( 5 )
  ; /\ Windows Security Question /\ (Everything Fine in here)
  WinWait ("Question")
  WinActivate ("Question")
  ControlClick("Question","", "[CLASS:QWidget; INSTANCE:3]") &lt;--- AutoIt just wont hit this Button(Actually a Qwidget)
  ; /\ XAMPP Anti-Virus Question /\
  </code></pre>
  
  <p>As you can see im trying to left-click the qwidget, but it just wont do. I tried some Raw Methods, too like just sending an Enter as soon as the windows was Activated but it wouldnt work too.</p>
  
  <p>I would have used an ID or something more precise but the WindowInfo do not get any Button(act. QWidget) ID</p>
  
  <p>Heres the Summary of the Button i want to click:</p>
  
  <pre><code>&gt;&gt;&gt;&gt; Window &lt;&lt;&lt;&lt;
  Title:  Question
  Class:  QWidget
  Position:   1427, 405
  Size:   506, 170
  Style:  0x96C80000
  ExStyle:    0x00000104
  Handle: 0x0000000000590476
  
  &gt;&gt;&gt;&gt; Control &lt;&lt;&lt;&lt;
  Class:  QWidget
  Instance:   3
  ClassnameNN:    QWidget3
  Name:   
  Advanced (Class):   [CLASS:QWidget; INSTANCE:3]
  ID: 
  Text:   
  Position:   170, 107
  Size:   77, 26
  ControlClick Coords:    35, 17
  Style:  0x56000000
  ExStyle:    0x00000004
  Handle: 0x00000000008225C2
  
  &gt;&gt;&gt;&gt; Mouse &lt;&lt;&lt;&lt;
  Position:   1635, 552
  Cursor ID:  0
  Color:  0xD4D0C8
  
  &gt;&gt;&gt;&gt; StatusBar &lt;&lt;&lt;&lt;
  
  &gt;&gt;&gt;&gt; ToolsBar &lt;&lt;&lt;&lt;
  
  &gt;&gt;&gt;&gt; Visible Text &lt;&lt;&lt;&lt;
  qt_msgbox_buttonbox
  qt_msgbox_label
  qt_msgboxex_icon_label
  
  
  &gt;&gt;&gt;&gt; Hidden Text &lt;&lt;&lt;&lt;
  </code></pre>
  
  <p>I just want to click the button, i thought using the "Advanced(Class)"-Value would help because its an exact Definition, but i doesnt. </p>
  
  <p>PS:I Know this code looks kind of cruel, but my priority is to make a running script(somehow) so im open for probably any idea not including "Alt+F4" or "smashing my computer"</p>
  
  <p>Thanks and Best Regards in Advance!</p>