dalink

A really newbie neeed help with MouseClick

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@Jos

What do you mean? After a

MouseWheel("down", 9)

i need to put a line with MouseUp?

@water

Thank for the welcome, i didn't use the Recorder for my script. I'm trying to automate the Castle Siege game downloaded from Microsoft Store :D

Edited by dalink

Share this post


Link to post
Share on other sites

 

 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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.