Sign in to follow this  
Followers 0
Irrelixier

Coverting MouseClick to MouseClickDrag

4 posts in this topic

Hi all!

I'd like ask a question to find ways or alternatives pretty much for my MouseClick section

Do
MouseClick("left", $x1, $y1)
$x1 = $x1 + Random(0, Random(0, 5), 1)
Until $x1 >= Random(450, 550, 1)

As you can see the code will progress to the right randomly using the variable random +'s and will stop when it hits the Until variable.

So can someone kindly advise whether there is a way instead of mouseclicking this i'd like it to be dragged, with the random +s over time as well, and with a Until section as well.

I'm kinda new to this, and I've realize i cant just simply change the mouseclick to mouseclickdrag, since it will ask the two pin points destinations and I can only alter speed there.

Share this post


Link to post
Share on other sites



Hello Irrelixier,

Doesn't MouseDown(), MouseMove(), and MouseUp() work?

MouseDown( 'left' )
Do
  $x1 = $x1 + Random(0, Random(0, 5), 1)
  MouseMove( $x1, $y1 )
Until $x1 >= Random(450, 550, 1)
MouseUp( 'left' )

Happy Coding!

Realm

1 person likes this

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

Have you tried it with MouseClickDrag?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

@Realm

Works like a charm. Haha I didn't realize we have up and down function

@^

I wanted to create random movements from the mouseclickdrag it's not possible since it can only alters speed and if I wanted to make it randomly move to the right it'll be lots of headache thinking the variables .____.

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