Sign in to follow this  
Followers 0
zugu

Easy script needed

9 posts in this topic

#1 ·  Posted (edited)

Hello.

I need a basic script that starts clicking a single spot on the screen as fast as it can, and does it for 31 seconds. I need it to "press" all my three mouse buttons, or at least two, in alternate order. I know the x,y coordinates, however, I don't know how to write the script.

Any help is welcome.

Edited by zugu

Share this post


Link to post
Share on other sites



You don't want help, you want someone to do it for you, if it's such an "easy script" then take the time to learn how to do it, if you don't want to take the time, then you probably don't need it. You've been a member of the forum for 9 months now, there's no excuse for this type of request.

If learning is beyond you, then I'd suggest: http://www.rentacoder.com


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Welcome to the Forums! I was once in your position, and not to far from it myself now. I was inspired by all the great people that helped me along the way, and I hope this bit of help will inspire you to learn more about AutoIt and contribute to the community.

This script below will do it for you. You will have a problem with right click of course, in that, right click tends to bring up some sort of menu in almost every environment you can think of. But if you have already taken that into account, then this will work just fine. Here you go:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Hello. 
;;
;;I need a basic script that starts clicking a single spot on the screen as fast as it can, and does it for 31 seconds. 
;;I need it to "press" all my three mouse buttons, or at least two, in alternate order. 
;;I know the x,y coordinates, however, I don't know how to write the script.
;;
;;Any help is welcome. 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

HotKeySet ("+!^h", "Mouse_Clicker") ;Hotkey to activate the script uses: {SHIFT}{ALT}{CTRL}n
HotKeySet ("{ESC}", "QUIT") ;Hotkey to exit the script

; Keeps the Script running in the background, until you exit
While 1
    Sleep (1000)
WEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;

Func Mouse_Clicker ()
    
    $x = 0
    While $x < 31 ;do it 31 times
        MouseClick ("Left", @DesktopWidth/2 ,@DesktopHeight/2) ;left clicks in the middle of the screen
        MouseClick ("Middle", @DesktopWidth/2 ,@DesktopHeight/2) ;middle clicks in the middle of the screen
        MouseClick ("Right", @DesktopWidth/2 ,@DesktopHeight/2) ;right clicks in the middle of the screen
        $x += 1
    WEnd
    
EndFunc


Func Quit ()
    Exit
EndFunc
Edited by litlmike

Share this post


Link to post
Share on other sites

Welcome to the Forums!

he's been a member for 9 months. lol

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

You would need a $count += 1 inside your while loop there. Also, I think the OP is requesting 31 seconds, not 31 repetitions. Maybe something like:

$start = TimerInit()
While TimerDiff($start) < 31000
    ;do some mouse clicking
WEnd

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

Thank you very much for the replies, guys, seriously, I'll let you know about the outcome.

And thanks for the welcome message, SmOke_N, you rock. You could GTFO and make your own forum where to make some nice money out of AutoIt support. I'll be among the first not to join.

Share this post


Link to post
Share on other sites

...

I'll be among the first not to join.

:P

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Just because someone wrote the script for you doesn't mean Smoke wasn't right. Your topic title was less than welcoming. That said, you did ask for help in your post as opposed to asking someone to write it for you. That little blue tag by Smoke's name? I think he's in the clear to offer his opinion.


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites

Thank you very much for the replies, guys, seriously, I'll let you know about the outcome.

And thanks for the welcome message, SmOke_N, you rock. You could GTFO and make your own forum where to make some nice money out of AutoIt support. I'll be among the first not to join.

I'm going to disagree with all that "helped" you. In fact, they did nothing but encourage you not think for yourself, where they saw a plea for help, I saw complete laziness enhanced by your lack of posting what you had tried and failed at to accomplish your task. It sickens me to think that a mole such as yourself is able to manipulate others to do the work for you.

To start my own forum for profit? I often wish that was the case at this particular one, then people like you would go away because A.) You couldn't afford the support or B.) You're too cheap to pay for it. Imagine if all that had the ability to answer your questions charged you for the support, I am sure you would have attempted to do something before asking someone to do it for you.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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