Jump to content
Sign in to follow this  
shay

click on button thay doesn't identify

Recommended Posts

shay

Hi

i`m trying to find way to ControlClick on button thet doesn't regognaze in "AutoIt info"

with no success,

look for solution in the forum i try WinSpy++ that provide Class name for the win and handle.

but where do i go from here??:D??


"If the facts don't fit the theory, change the facts." Albert Einstein

Share this post


Link to post
Share on other sites
PsaltyDS

If the position inside the window is consistent, you can click on it by X/Y coordinates. If the button has an accelerator (like "!n" for Next) you could send that.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
shay

If the position inside the window is consistent, you can click on it by X/Y coordinates. If the button has an accelerator (like "!n" for Next) you could send that.

:D

unfortunately no accelerator (like "!n" for Next),

X/Y are my last choice

is thar any way to create my one set of command?

the GUI that i us is part of my company code...


"If the facts don't fit the theory, change the facts." Albert Einstein

Share this post


Link to post
Share on other sites
claude21

unfortunately no accelerator (like "!n" for Next),

X/Y are my last choice

is thar any way to create my one set of command?

the GUI that i us is part of my company code...

Is the button on a toolbar ? does autoit info report any commandID ?

Share this post


Link to post
Share on other sites
PsaltyDS

is thar any way to create my one set of command?

Your English is breaking up. I didn't understand the question.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
shay

Is the button on a toolbar ? does autoit info report any commandID ?

didn't found commanID

still unable to send control to this buttons...


"If the facts don't fit the theory, change the facts." Albert Einstein

Share this post


Link to post
Share on other sites
PsaltyDS

There are circumstances that AutoIt can't do anything with, like owner-drawn Delphi controls or Flash windows. What happens when you do it by X/Y coord?

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
claude21

didn't found commanID

still unable to send control to this buttons...

You must first identify the commandID of the button. You may get inspiration from this code to list the available commandID for your control. Is the app you try to automate available for download ?

Share this post


Link to post
Share on other sites
shay

There are circumstances that AutoIt can't do anything with, like owner-drawn Delphi controls or Flash windows. What happens when you do it by X/Y coord?

:D

X/Y work with no problem, i`ll use it as last resort,

can i create my set of commands ??(like FF.AU3)

if so, what information do i need to get from the GUI source?


"If the facts don't fit the theory, change the facts." Albert Einstein

Share this post


Link to post
Share on other sites
Akshay07

When I started with AutoIt (I did not know yet about Controls at this time), I made the following to make sure that the script will run on any machine when it comes to clicking a button.

1/ Move the window to a predefined location (the location must be a valid one regardless of the desktop size).

2/ Once the window has been moved to a specific area of the desktop, the button to click will always be at the same XY position regardless of the computer.

Another solution would be to know the button XY in the main window, and using a function to retrieve the XY of the main window (can't rememebr the name of the function), calculating the relatives XY of the button.

Edited by Akshay07

Share this post


Link to post
Share on other sites
PsaltyDS

It isn't necessary to calculate absolute desktop coordinates. Look up MouseCoordMode in the help file and set it relative to the active window or client area.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Akshay07

It isn't necessary to calculate absolute desktop coordinates. Look up MouseCoordMode in the help file and set it relative to the active window or client area.

:D

Thanks for the info, one more thing learned today :huggles:

AutoIt is so rich that it is not always easy for a beginner to find out the best answer to a problem just by searching the help :

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.