Sign in to follow this  
Followers 0
RexWeber

Losing my mind with winform button

13 posts in this topic

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!

Share this post


Link to post
Share on other sites



someone else was having problems with those checkboxes...i think they ended up focusing, and sending a {space}


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.

Share this post


Link to post
Share on other sites

I gave up on the checkbox thing, I would be content to just have it click the big radial at the bottom Start All. Can't pull it off though and my eyes are about to start bleeding :P lol

Share this post


Link to post
Share on other sites

It would be a great idea to show us the code of what you tried till now.


My UDFs, Abbrevs and Snippets
If you like my post, just click the like button :) 

Share this post


Link to post
Share on other sites

Everything is possible my friend.

Just an example code so people can help you ;)


I feel nothing.It feels great.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

yes, the variable for the window, $hApplication, needs to be populated through wingethandle function :)

I'm not going to do all the work


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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0