Sign in to follow this  
Followers 0
roni

Record a mouse click to push PLAY button

5 posts in this topic

Hi!

I'm totally new to AutoIt.

I'm not even sure yet that AutoIt is my best option:

What I need is a script that records clicking on a certain program's PLAY button.

This script is to be used as executable by different users on different PCs (most of them have windows XP).

The problem is that every user may have this program opened on a different location on his screen, or maybe even minimized to the bottom of his screen.

How can the script find the specific program's window, look for the PLAY button and press it?

Thanks a lot in advance,

Roni

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Welcome to the forums !

Use AutoIt Window InfoTool for get window title and ControlID

and take a look at ControlClick Function Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Welcome to the forums !

Use AutoIt Window InfoTool for get window title and ControlID

and take a look at ControlClick Function Posted Image

Thank you Wakillon!

Since I'm just a beginning beginner, it would really help a lot if you might have any piece of code for reference?

I would really really appreciate it...

Anyway I'll start to try coding with using Window InfoTool and ControlClick as you suggested - thanks a lot :-)

Share this post


Link to post
Share on other sites

It could be something like that :

; You must Set $_Title, $_Text and ControlID.

WinWait ( $_Title, $_Text )
WinActivate ( $_Title, $_Text )
ControlClick ( $_Title, $_Text, "Play" )

No need to record anything, no need to know window coordinates !


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

@roni - Remember, just about every function in the Helpfile has example code with it.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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