Jump to content

Specific Need


Recommended Posts

...it always clicks at (0,0) not wherever the mouse is

HotKeySet("1", "_clickIT")

$clicks = 25

While 1
    Sleep(99)
WEnd

Func _clickIT()
    $pos = MouseGetPos()
    Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & _
            '"MouseClick(""left"", ' & $pos[0] & _
            ',  ' & $pos[1] & ', ' & $clicks & ', 0)"')
EndFunc   ;==>_clickIT
requires AutoIt beta

Edit:

The script shown above will:

"click wherever the mouse was" when the hotkey is pressed

allow you to "press (button) 5 times clicks it 125 times" per OP

require AutoIt beta to run

The script above will not have this limitation:

"NOTE:You Have to push hotkey, then wait for clicks, not just push push push then let it click,"

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

is it actually clicking cause it goes so fast... is it clicking?

Run it from within SciTE and place the mouse over a word like AutoIt3ExecuteLine and watch it select/deselect that word...

Edit: oops, that was probably not directed at me.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

ok one more question say i want to click something like 10 times then later another 10... it will keep going because it is 20 clicks? so say in all i wanted to do 100 click then i would change

Until $i = 10(100)

If $i = 10(100) then $i = 0

*numbers in brackets are the numbers that would be changed to

Link to comment
Share on other sites

...*numbers in brackets are the numbers that would be changed to

can you figure out what to change in this version?

HotKeySet("]", "Click")

$clicks = 100
;number of desired clicks per hotkey press

$delay = 0
;milliseconds to add between clicks

While 1
    Sleep(100)
WEnd

Func Click()
    For $i = 1 To $clicks
        MouseClick("left")
        ToolTip($i, 0, 0)
        Sleep($delay)
    Next
    ToolTip("", 0, 0)
EndFunc   ;==>Click
Edit: change "$speed" to "$delay"

Edit2: ;milliseconds to add between cycles

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

can you figure out what to change in this version?

HotKeySet("]", "Click")

$clicks = 100
;number of desired clicks per hotkey press

$delay = 0
;milliseconds to add between clicks

While 1
    Sleep(100)
WEnd

Func Click()
    For $i = 1 To $clicks
        MouseClick("left")
        ToolTip($i, 0, 0)
        Sleep($delay)
    Next
    ToolTip("", 0, 0)
EndFunc   ;==>Click
Edit: change "$speed" to "$delay"

Lol or

Opt('MouseClickDownDelay', 30)
opt('MouseClickDelay', 30)

Bigger number = slower click

Edited by Paulie
Link to comment
Share on other sites

But...

to end it all,

I think this is the easiest to follow

HotKeySet("]", "Click")
Dim $i
While 1
Sleep(100)
Wend

Func Click()
Do
MouseClick("left")
$i = $i+1
ToolTip($i, 0, 0)
Until $i = 10
If $i >= 10 then $i = 0
EndFunc

Nice and simple

I'd use this one if it works for ya

Or a slower click

Opt('MouseClickDelay', 20)
Opt('MouseClickDownDelay', 20)

HotKeySet("]", "Click")
Dim $i = 0
While 1
Sleep(100)
Wend

Func Click()
Do
MouseClick("left")
$i = $i+1
ToolTip($i, 0, 0)
Until $i = 10
If $i >=10 then $i = 0
EndFunc
Edited by Paulie
Link to comment
Share on other sites

...Bigger number = slower click

yes, but I was not going to explain Opt settings the OP...

I guess that the OP's request:

"So i press (button) 5 times clicks it 125 times."

is no longer a concern.

What you coded is fast enough after all :-)

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

i like wat herewasplato about says i set it to 25 then i press it 5 times clicks 125 how do i make it so i dont have to reset the program if i want to click more?

then look at post #17 through end
Link to comment
Share on other sites

actually i dont under stand how to program that i tried but i couldnt could u maybe set it up so it works in the auto-it thing u told me about...

also could paulie maybe set it so it does 25 clicks everytime i press the hotkey?

Thanks man plz do this almost there lol

Link to comment
Share on other sites

HotKeySet("1", "_clickIT")

$clicks = 25

While 1
    Sleep(99)
WEnd

Func _clickIT()
    $pos = MouseGetPos()
    Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & _
            '"MouseClick(""left"", ' & $pos[0] & _
            ',  ' & $pos[1] & ', ' & $clicks & ', 0)"')
EndFunc  ;==>_clickIT

do the same thing with this as you did in mine(it is the same as hwp's)

save it as something.au3 and that will work

to make it work to your liking, switch the 1 in the "hotkeyset" to whatever you want the kotkey to be, then change the

$clicks = 25 to however many clicks you want per hotkey press

Link to comment
Share on other sites

alright i changed it now just testing it out

HotKeySet("1", "_clickIT")

$clicks = 25

While 1

Sleep(99)

WEnd

Func _clickIT()

$pos = MouseGetPos()

Run(@AutoItExe & ' /AutoIt3ExecuteLine ' & _

'"MouseClick(""left"", ' & $pos[0] & _

', ' & $pos[1] & ', ' & $clicks & ', 0)"')

EndFunc ;==>_clickIT

i used this script so i can press it as many times as a want and it will do 25 each time and i got an error

Error: Reading the line:

C:\Autoir3executeline

Edited by Sanity
Link to comment
Share on other sites

nonono that was the error i guess i just made a typo but there is an error when i do this...

that is error display thing

Error: Reading the line:

C:\Autoit3executeline

Are you using beta?
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...