Jump to content

A really newbie neeed help with MouseClick


dalink
 Share

Recommended Posts

Hi all, i just installed AutoIt Version 3.3.14.2 and i'm trying to make a simple Macro using MouseMove and MouseClick.

I'm using windows 10 Pro 64 Bit and i noticed that after first commands the Mouseclick doesn't work properly, it work like the button of the mouse is down but don't get up.

I'm a newbie and i tryed to avoid this issue putting after a MouseClick the command MouseUp but it give me an error. Then i tryed to put some sleep delay after the movements (before the click) and some sleep after the click command, but it doesn't work properly anyway.

And the bug happen not always in the same line of the script: Someone can help?

Here the script i made: ; Script Start - Add your code below here
 

MouseMove(22,1175)
Sleep(1000)
MouseClick("left")
Sleep(1000)
MouseMove(460,918)
Sleep(1000)
MouseWheel("down",9)
Sleep(1000)
MouseMove(286,1054)
Sleep(1000)
MouseClick("left")
MouseMove(1558,347)
Sleep(1000)
MouseClick("left")
Sleep(14000)
MouseMove(761,807)
Sleep(1000)
MouseClick("left")
Sleep(32000)
MouseMove(780,900)
Sleep(1000)
MouseClick("left")
Sleep(1000)
MouseMove(761,807)
Sleep(1000)
MouseClick("left")
Sleep(32000)
MouseMove(1558,347)
Sleep(1000)
MouseClick("left")
Sleep(14000)
MouseWheel("down",10)
Sleep(1000)
MouseClickDrag("left",1622,869,1290,941)
Sleep(1000)
MouseMove(1388,426)
Sleep(1000)
MouseClick("left")

Where i'm wrong?

Thanks in advance!

Edited by Jos
Put code in codebox
Link to comment
Share on other sites

Welcome to Autoit and the forum!
Looks like you used the AutoIt Recorder to create this script. Those Mouse functions rely on screen resolution and window position and hence such a script might not be very reliable.
It would be easier for us to help you if we knew which program you try to automate. Then we might propose a better solution.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Developers

 

 I'm trying to automate the Castle Siege game downloaded from Microsoft Store :D

@dalink,

Unfortunately you appear to have missed the Forum rules on your way in. (there is also a link link in my signature) 
Please read them now particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. :naughty:

See you soon with a legitimate question I hope. :)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...