TheSaint 1,595

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key?Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox(be advised many downloads are not working due to ISP screwup with my storage)

Share this post

Link to post

Share on other sites

TheSaint 1,595

TheSaint 1,595

Normally you can't get away with leaving certain parameters, like Control ID, out of the command, but it appears you have been able to do this with ControlSend. If you use the correct ID, you won't need the Mouse positioning.

Like as has been suggested above, fire up the Window Info Tool and have a play with it, until you understand how it works. Pay particular attention to the Controls tab, the active window of Calculator, and the mouse hover position.

Unfortunately, I cannot check your code, as I don't have an installation of AutoIt on this machine, only the Help file.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key?Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox(be advised many downloads are not working due to ISP screwup with my storage)

I got the "[CLASS:Button; INSTANCE:11]" information by using AutoIt Window Info, like I suggested before. Check your Start menu - you likely have it in your AutoIt folder. When the program is running, go to the Control tab. Then drag the Finder Tool over the control you want to know about - like the Equals button on the calculator. The Advanced Mode part is what you need to identify the control. You can also go to the Summary tab (scroll all the way right) and copy the information directly. The Finder Tool will tell you about each control you want to use.

Note that you won't actually see the mouse move - the application is internally told that those controls were clicked.

Use the Mouse tab in AutoIt Window Info to know what x/y co-ordinates to use.

You can use WinMove if you need to position the window. You can also use Opt('MouseCoordMode','2') if you want to use co-ordinates relative to the client area of the window (so it doesn't matter where the window is, but the co-ords take a little more work to figure out).

Share this post

Link to post

Share on other sites

Potar 0

Potar 0

But now i want to do it via X,Y of mouse for another one, for example i did program in c++ and now the Window Info Tool cant find my created button (like in calc INSTANCE / BUTTON etc., there aren't any controls just mouse possition and color)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key?Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox(be advised many downloads are not working due to ISP screwup with my storage)