Jump to content

Losing my mind with winform button


RexWeber
 Share

Recommended Posts

I am trying to make autoit click a button for me, and have tried the controlclick function, controlenable, even mousemove and click etc, I CANNOT get this stupid button to click, been trying for 45 min and have read about 100 forums.

Posted Image

That is the information, how can I get autoit to click that start all for me? I really have tried a billion things. The mousemove function works, puts mouse there etc, but the click doesn't actually do anything, and I cannot get the controlclick stuff to work. I would be infinitely grateful for someone to throw me a bone here.

Thanks!

Link to comment
Share on other sites

Sorry, I was hoping someone could just give me some example code, which is why I pasted the autoit helper-window info with like button name and stuff. I have been trying code for close to an hour, just deleting and trying again when not working, so would have to emulate all that I've tried. The mousemove and mouseclick doesn't work for sure. As for like controlclick and controlenable stuff, I've been trying examples from these forums, replacing with my classid name and stuff, trying a billion different syntaxes. If that isn't enough to go on, I can just start re-doing everything and paste each failed code attempt in for you?

Link to comment
Share on other sites

ahh, you couldn't even get the control :)

try something like this...you may have to setup a loop to itterate the Instance to get the one you need, since it's dynamic:

$hButton = ControlGetHandle ( $hApplication, "", "[REGEXPCLASS:.*BUTTON.*; INSTANCE:6]" )
ControlFocus ( $hApplication, "", $hButton )
ControlClick ( $hApplication, "", $hButton )

edit: i don't recall if you can use class and instance...if it doesn't focus on what you expect, let me know.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Went ahead and threw that in, got an error variable being used without being declared. I really appreciate this help btw, I'm very new to autoit. I have taken university levels in java and vb but was years ago, and basically brand new to auto it

Link to comment
Share on other sites

Went ahead and threw that in, got an error variable being used without being declared. I really appreciate this help btw, I'm very new to autoit. I have taken university levels in java and vb but was years ago, and basically brand new to auto it

Link to comment
Share on other sites

Yet another relogger is a game automation utility.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...