Jump to content

Recommended Posts

Posted (edited)

what im trying to do is make a simple program that moves the mouse to 796,360 and right-click every 20 seconds... i want it to do it again and again but i also want to be able to have a hot key that can shut it off when i press it ie.) x+c+v and the right-clicking stops... this is what ive come up with and it clicks way to fast, and i cant stop it

;

; AutoIt Version: 3.0

; Language: English

; Platform: Win9x/NT

; Author: Jonathan Bennett

;

; Script Function:

; Autorightclicker

;

; Double click at 796,360

MouseClick("right", 796, 360, 20000)

Exit

can someone plz rewrite what i need in order to get what i want... i think it shouldnt be too completcated for an expert =D thnx

Edited by Jon
Guest Py7|-|[]/\/
Posted (edited)

Try this: I haven't tested it.

HotKeySet("{PAUSE}", "Terminate")

$counter = 0

While 1
For $i = 1 to 20
    Sleep(20000)
    $counter = $counter + 1
Next
    MouseClick("right", 796, 360, 1)
Wend

Func Terminate()
    Exit
EndFunc

By the way. That peans that to exit the script you will need to press the "pause/break" button which is usually to the right of your backspace key in the upper right hand part of your keyboard.

Edited by Py7|-|[]/\/
Posted

;

; AutoIt Version: 3.0

; Language: English

; Platform: Win9x/NT

; Author: Jonathan Bennett

;

; Script Function:

; Autorightclicker

;

HotKeySet("{PAUSE}", "Terminate")

$counter = 0

While 1

For $i = 1 to 20

Sleep(20000)

$counter = $counter + 1

Next

MouseClick("right", 796, 360, 1)

Wend

Func Terminate()

Exit

EndFunc

this is exactly what i have in notepad and when i open it, nothing happens to my computer except the autoit icon appearing... and press pause and nothing happen either

Posted

Try this

HotKeySet("{PAUSE}", "Terminate")

While 1
For $i = 1 to 20
Sleep(20000)
MouseClick("right", 796, 360)
$i = $i + 1
Next
Wend

Func Terminate()
Exit
EndFunc

Posted (edited)

HotKeySet("{PAUSE}", "Terminate")

While 1
For $i = 1 to 20                          ;Amount of loops
Sleep(20000)                              ;Amount of time 10secs = 10000
MouseClick("right", 796, 360)             ;Mouseclick
$i = $i + 1                                ;Count
Next                                      ;If not 20, do again
Wend

Func Terminate()
Exit
EndFunc

btw. Please learn the language from the guide.

I do realize that it is hard to begin.

Edited by MHz
Posted

yes im sorry im asking so many questions but the problem is one im kinda dumb and i cant really learn without examples <--- as u see the code i wrote was an edit from an example... now ... a question....

lets say i want to do some commands before it starts to right click, what should i write (the commands here, i dont want them to repeat) like lets say i want the program to move the mouse to an icon, double click, la la la those i can get from tutorial , but what must i do so that they dont loop?

HotKeySet("{PAUSE}", "Terminate") <---- stays on top?

mousemove la la la

insert letter command whatever it is la la la

keystroke enter what ever....i want this stuff to fuction once

While 1

For $i = 1 to 20

Sleep(20000)

MouseClick("right", 796, 360)

$i = $i + 1

Next

Wend

Func Terminate()

Exit

EndFunc

so will this result in me making a program logging me (when i finish the mousemove and typing) into a software and and start the right click?

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
×
×
  • Create New...