Jump to content
Sign in to follow this  
leuce

Mouse won't click (or move)

Recommended Posts

leuce

G'day everyone

I'm trying to run a simple script that clicks in various places on the screen, but sometimes the mouse won't move (then I have to exit the script because nothing happens) and sometimes it moves but doesn't click (then I have to exit the script again).

I have NO IDEA why this script sometimes won't move the mouse, or why it simply refuses to click.

This is the script:

MouseMove (240, 271, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (294, 442, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (570, 479, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (238, 270, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (297, 447, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (582, 505, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (480, 742, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (244, 275, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (293, 402, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (590, 745, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

MouseMove (654, 941, 1)
Sleep ("400")
MouseDown("left")
Sleep("100")
MouseUp("left")
Sleep ("5000")

I used to have a simpler script that used MouseClick, but that one never got the mouse moving, so I tried moving the mouse as a separate action, but it only sometimes moves, and it never clicks.

Any ideas for me? This script is for a repetitive action that I really don't want to do manually (basically selecting stuff off menus that don't have Alt shortcuts). It's not for a game.

Thanks

Samuel

Share this post


Link to post
Share on other sites
leuce

Are you saying that what you have posted above, hangs?

No, because when the mouse does move, it moves again and again, as it should, but there is no clicking.

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, leuce. What application are you trying to interact with? MouseMoves and clicks are notoriously unwieldy; there is probably a much easier way to do what you're after.


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

Share this post


Link to post
Share on other sites
careca

Not really, if it's a web application, no controlid's. Have you tried slowing down the mouse movement? btw you don't need "" in the sleep value.


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
JohnOne

Not really, if it's a web application, no controlid's. Have you tried slowing down the mouse movement? btw you don't need "" in the sleep value.

lol

That's probably what is wrong, I never even noticed that.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  

×