Jump to content
Sign in to follow this  
WilliamasKumeliukas

how to make my script finding an specific checkbox?

Recommended Posts

WilliamasKumeliukas

Hi,

Is it possible to find an specific checkbox in an screen region or in a active windows?

if it is, wich function I have to use?

 

Best Regards,

AutomateLover

Share this post


Link to post
Share on other sites
Valiante

Hi AutomateLover,

It depends what you mean by "find" and what information you already know about the control.  If you already know the control handle, this is easy.  If you know its relative xy position in the window, it can also be done.  Otherwise things get a little trickier.  However, in order to help you, we'll need a little more information about what it is you're trying to achieve, what you have tried so far, etc.

Help us to help you :)

Rgds,

Val.

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

Hi AutomateLover,

It depends what you mean by "find"

 

well, I am refering to the Find function used into Java scripts wich i most of the times used on another script maker called: "Sikuli"

Share this post


Link to post
Share on other sites
Valiante

Hi AutomateLover,

Sorry, I'm not familiar with "Sikuli".  How about the rest of my post?  What information do you already know about the control in which to "find" it?

Rgds,

Val.

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

since the function name of "Find" is different I don't know at all wich function does the same. I'll give an example of what I was doing when i used Find function on sikuli.

Example: Find autoitv3.exe

               if exists

               then: run autoitv3.exe

               else: exit(1)

regards,

AutomateLover

Share this post


Link to post
Share on other sites
Valiante

Hi AutomateLover,

I'm sorry, that doesn't really answer my question.  I'm trying to ascertain what you already know about the checkbox control in order to be able to find it.  What information do you already have?

Rgds,

Val.

Edited by Valiante

Share this post


Link to post
Share on other sites
JLogan3o13

This:

Example: Find autoitv3.exe

               if exists

               then: run autoitv3.exe

               else: exit(1)

 

would be something like this:

If FileExists(@ScriptDir & "\autoitv3.exe") Then
    Run("autoitv3.exe")
Else
    SetError(1, 1)
EndIf

But I do not see what this has to do with finding a checkbox? Please spell out exactly what you are trying to do, including the application you're trying to find the checkbox in.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

Well, sorry i explained pretty much outside of the subject... by the way I want to find to find an specific checkbox ( with x,y position ) and verify if it is checked or not, if not then check it then continue next line.

Share this post


Link to post
Share on other sites
Valiante

Ok, so the answer to my question is:  You know the location of the control.  Great!  Now we can look for it in the window..

If you check out >this thread (which a quick search would have found) you can see this has been asked and answered before, utilising _WinAPI_WindowFromPoint

Best of luck.

Val.

Share this post


Link to post
Share on other sites
WilliamasKumeliukas

I'm really not an fan of Silent tasks because I want to see at ANYTIME the progress since I really want to make the script act like an human because i'll make several scripts for most of my repetitive tasks I'm doing everydays.

Share this post


Link to post
Share on other sites
Valiante

Ok.  I'm really not sure what you're referring to here, but the links I've posted give you ample examples of how to achieve what you've asked.. how to find a checkbox using its relative (x, y) position in the window.

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  

×