Sign in to follow this  
Followers 0
MaxGom

Mouse click problem

7 posts in this topic

Hi there!

I am a noob to AutoIt and just starting to familiarize myself to scripting with it. Before this I have been using GUI Macro to automate my task. 

So, recently I have been trying to move the mouse pointers and made clicks on the desktop. I activated a program window specially designed to do inventory correction. There was a blank to be filled in with certain information. I scripted something out of AutoIt, and made it to move the mouse pointer and made a right mouse click on the blank field. It should display some context menu. But nothing happened, although it managed to move the mouse pointer where I wanted it to. Automating my task this way has been very helpful to me. I have over 4000+ entries to correct and enter and doing this manually would kill my fingers.

Honestly, I have tried  many other macro recorders to do the task but none seems to work. They do work outside the mentioned windows however, but not in it.

I read somewhere that, some task automation software cannot work in some circumstances eg gaming as it doesn't interact via the mouse and keyboard drivers directly.Could it be the same in this case  that the inventory program is designed in such a way?

Is there a way to go about this?

Please, I need help.

Thank you in advance.

 

Share this post


Link to post
Share on other sites



I noticed that, as soon as I activated the inventory window, the script stopped working. The mouse won't move.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Maybe you can use something like this?

Winactive("Your Program Title Goes Here")
Sleep (10000)
While(1)
Send ("y")  ;Sends Key Stroke
Sleep (500)
MouseClick ('left', 639,318) ;Sends Left Mouse Click to quadrant on screen
Sleep (500)
MouseClick ('right', 356,326) ;Sends Right Mouse Click to  quadrant on  Screen
WEnd
Edited by mlewis412

Share this post


Link to post
Share on other sites

Wow. I've never expected any reply to be this fast. Thanks.

This is what I have:

WinActivate("BMS Troubleshooting Tool")
MouseClick ( "right" , 1193, 80 , 1 , 10 )
 
As soon as the WinActivate BMS Troubleshooting Tool is activated, the next line of the script is not executed. It just stops there. No movement of the mouse, no clicking, nothing.
 
However, this worked on any part of the screen, except on particular BMS window.
 
Any way to get around this?

Share this post


Link to post
Share on other sites

Thanks Marss for the reply. Will try to insert the 'Sleep' command later.

I am wondering whether AutoIt uses the mouse/keyboard drivers to deliver clicks, send keys or move the mouse.

Share this post


Link to post
Share on other sites

I have finally found the solution to my problem. It turns out that, if a program, in this case the BMS Troubleshooting tool program, has a different administrator privilege than AutoIt, any mouse clicks and send keys command from AutoIt to control the BMS window simply won't work. I gave the BMS program the same administrator privilege as AutoIt and that worked well. 

Anyway, I thank all those who have helped me here and thank you for your patience as well.

I think we can consider this thread as close.

Luv ya.

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