Sign in to follow this  
Followers 0
ZaraxZ

Help me with my first script!

9 posts in this topic

#1 ·  Posted (edited)

Hi! I'm making a script to spamm the left mouse button.

CODE
MouseClick("left"," "," ","9999999999999")

But i want a start and a pause button too. Anyone can help me??

Start button: f3

stop: f4

exit: f12

Please help me!

Edited by ZaraxZ

Share this post


Link to post
Share on other sites



Could you be a little more specific?

Do you want to send F3 /F4 and so on key pressed event?

Or do you want to create a gui with buttons etc?

Share this post


Link to post
Share on other sites

Could you be a little more specific?

Do you want to send F3 /F4 and so on key pressed event?

Or do you want to create a gui with buttons etc?

No i dont need a gui. I just want my computer to click the left mouse button when i click the F3 button and pause when i click the F4 button And exit the scritp when i click the f12 button.

Share this post


Link to post
Share on other sites

Check out HotKeySet ( "key" [, "function"] )

and Send ( "keys" [, flag] ) functions in the AutoIt help.

I think that should do the trick.

Share this post


Link to post
Share on other sites

I did but i still cant figure it out :P Cant some one help me write the script?

Share this post


Link to post
Share on other sites

I did but i still cant figure it out :P Cant some one help me write the script?

matrix200 has given you everything you need for the script. If you cannot be bothered to look at the help you have been given, why should anyone be bothered to write the script for you?

What part of the HotKeySet example do you not understand?


“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Share this post


Link to post
Share on other sites

I dont undersatnd how to do this... Well thanks for the help....

Share this post


Link to post
Share on other sites

dude im new here also, however i figured out alot of stuff search is a usful tool on all forums, the help file is packed with assistance and the be honest you cant come and expect some1 to give their free time to write it for you. especially while u only have a small amount of posts without contributing your not going to get alot support wanting the pros to write it for you, if you posted a script that you have at least "attempted" to get to work you might get somebody notice an obvous error who will help you, but writing it for you cannot be expected.

Share this post


Link to post
Share on other sites

#include <Misc.au3>
HotKeySet("{f3}","start")


Func start()
while 1
$where = MouseGetPos()
    MouseClick("left",$where[0],$where[1],1,1)
    sleep(25)
    if _IsPressed(73) then ExitLoop
        if _IsPressed("7a") then exit 0 
        WEnd
    EndFunc

while 1
    Sleep(1)
    WEnd

here is the code that should get what you want and you can do f12 because that button is reserved for windows so i did f11 , next time try to look in the forum ppl wont do your scripts for you they ll help you but they wont do them for you. good luck

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