Sign in to follow this  
Followers 0
soporific

I have a Control button i can press manually

13 posts in this topic

Hi there,

I'm back using AutoIT again after throwing a silly fit a few months ago out of frustration. I've come along way since then and i've got quite a few simple projects complete. I've gotten quite good at using ControlClick but i've come across something that just won't 'click'.

There's a window i'm trying to fill in the fields for. It's got 3 input fields which are easy to control. And then it has the Register button (see picture) ... this button never receives the focus (tabbing only goes thru the input fields) so i can't tab and then send a return. No worries, i'll just use the ID number ... no ID number ... OK, i'll just use the Control button text (in this case its 'Register') ... doesn't work. OK, i'll try using the CLASSNN value ... doesn't work.

Posted Image

The AutoIT Window Info refers to the 'Register' button.

This is the code for entering info in the Input fields which works fine:

ControlClick ("","Registration Information","Edit1")

Send ("Info 1")

ControlClick ("","Registration Information","Edit2")

Send ("Info 2")

ControlClick ("","Registration Information","Edit3")

Send ("Info 3")

and these are all the different methods i've tried to 'click' that Register button:

ControlClick ("","Registration Information","Register")

ControlClick ("","Registration Information","IZCONTROL1")

ControlClick ("","Registration Information","[CLASS:IZCONTROL; Text:Register]")

I've never come across a control named "IZCONTROL1" -- they are normally named Edit1, Button2 etc. Could this be the cause?

Can i use something else, like MouseClick ??

Thanks for any help.

Share this post


Link to post
Share on other sites



Try the AU3Recorder under tools it SciTe ... may help to understand what it expects.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

Try the AU3Recorder under tools it SciTe ... may help to understand what it expects.

Thanks for the reply. I've spent a good 20 minutes trying to find the "AU3Recorder" ... where is it? I refuse to get frustrated this time around ... but i wonder why i have to ask such a simple question?

Share this post


Link to post
Share on other sites

Thanks for the reply. I've spent a good 20 minutes trying to find the "AU3Recorder" ... where is it? I refuse to get frustrated this time around ... but i wonder why i have to ask such a simple question?

Open a blank document in SciTE and save it as Test.au3 ... then look under tools.. it should be there.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

Open a blank document in SciTE and save it as Test.au3 ... then look under tools.. it should be there.

ah ha! Thanks for that ... a very useful tool hey. Looks like i'm gong to be using MouseDown, MouseUp, MouseMove

Cheers! I shall report back how i go.

Share this post


Link to post
Share on other sites

You can also try the AutoItMacroGenerator.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

You can also try the AutoItMacroGenerator.

AutoItMacroGenerator was better in that it gave me the ControlClick info i should use. AU3 recorder was mainly giving me mouse info. But it still doesn't work!!

This is the controlclick suggestion that the MacroGenerator gave me:

ControlClick ("classname=#32770","Registration Information","IZCONTROL1")

which was basically what i came up with except i didn't have the classname, i just had empty quotes.

Has anyone else had controls that seem to be 'unclickable' via automation?

This problem is not that crucial to crack but it would be good to know why i failed with what seems to be a simple thing.

Thanks for any help given !!!

Share this post


Link to post
Share on other sites

A tip for newbies (from a newbie):

These tools only appear to be available in the full edition of the SciTe editor, which you have to download and install separately.

Cheers,

Jeff

Share this post


Link to post
Share on other sites

AutoItMacroGenerator was better in that it gave me the ControlClick info i should use. AU3 recorder was mainly giving me mouse info. But it still doesn't work!!

This is the controlclick suggestion that the MacroGenerator gave me:

ControlClick ("classname=#32770","Registration Information","IZCONTROL1")

which was basically what i came up with except i didn't have the classname, i just had empty quotes.

Has anyone else had controls that seem to be 'unclickable' via automation?

This problem is not that crucial to crack but it would be good to know why i failed with what seems to be a simple thing.

Thanks for any help given !!!

Using classname= requires you to use Opt("WinTitleMatchMode", 4)

Try this:

ControlClick("[CLASS:#32770]", "Register", "IZCONTROL1")oÝ÷ ØêÚºÚ"µÍÛÛÛÛXÚÊ  ][ÝÖÐÓTÔÎÌÌÍÌI][ÝË  ][ÝÉ][ÝË    ][ÝÒVÓÓÓI][ÝÊ

This is totally assuming that IZCONTROL1 is a button of course.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Using classname= requires you to use Opt("WinTitleMatchMode", 4)

Try this:

ControlClick("[CLASS:#32770]", "Register", "IZCONTROL1")

This is totally assuming that IZCONTROL1 is a button of course.

Thanks for the help. Unfortunately it didn't work.

It just doesn't want to click!!

I have made at least 20 other projects that successfully click their respective buttons. I've managed to get right all sorts of clicks, just not this one. Oh well, i'll see if i can't work around it somehow.

Cheers.

Share this post


Link to post
Share on other sites

Where is this button located so we can try to click it?


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

Might not be the best way around it, but i had a similar(ish) problem and had to use the optional coordinates. I have set the option for the coordinates to be relative to the active window

CODE
ControlClick("<windowTitle>", "<windowText>", "<controlID>", <x coord>, <y coord>)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0