Jump to content
Sign in to follow this  
iSkilz

[Help] How to repeatedly mouseclick on mousedown?

Recommended Posts

iSkilz

What I want is:

    If LButton pressed:  after 120ms, spam LButton until LButton not pressed

How do you tell it to click, while still recognizing the physical LButton's state?

#include <Misc.au3>
HotKeySet("{Esc}", "Hotkey_Esc")


While 1
    Sleep ( 100 )
    If _IsPressed("01") Then
        Sleep ( 120 )
        While _IsPressed("01") ; while LButton Down <<< not working; conflicts w/ MouseClick
            Sleep ( 10 )
            MouseClick ( "Primary" )
        WEnd
    EndIf
WEnd


Func Hotkey_Esc()
    Exit
EndFunc

ps.  i can do this easily in autohotkey -.-

; <<< AutoHotkey Code >>>
LButton::       ;While LButton Down, Spam LButton
  MouseClick, L
  Sleep 120
  Loop
    {
    Sleep 10
    Getkeystate,VarLB,LButton,P
    If VarLB=U
      Break
    MouseClick, L
    }
  Return

please help, i'm here cause i like autoit more than autohotkey :)

Share this post


Link to post
Share on other sites
JLogan3o13

Can you explain just what you're trying to accomplish? There is probably an easier way than spamming Mouseclicks


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
iSkilz

Can you explain just what you're trying to accomplish? There is probably an easier way than spamming Mouseclicks

Accomplish:  spam clicks easily for click-heavy games

No, there isn't a way that doesn't involve spamming clicks...

Its a very useful script, which I pull up very often, I'm just having trouble converting it to Autoit, is all.....

donno if it'll help, but heres the full script in AutoHotkey

; <<< AutoHotkey >>>
#SingleInstance Force
Return

    ; LButton = Spam LButton
    ; RButton = Spam RButton



LButton::       ;While LButton Down, Spam LButton
  MouseClick, L
  Sleep 100
  Loop
    {
    Sleep 10
    Getkeystate,VarLB,LButton,P
    If VarLB=U
      Break
    MouseClick, L
    }
  Return

RButton::       ;While RButton Down, Spam RButton
  MouseClick, R
  Sleep 100
  Loop
    {
    Sleep 10
    Getkeystate,VarRB,RButton,P
    If VarRB=U
      Break
    MouseClick, R
    }
  Return

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#E::    Edit
#R::    Reload
#Esc::  ExitApp

Share this post


Link to post
Share on other sites
JLogan3o13

 

Accomplish:  spam clicks easily for click-heavy games

 

It appears you missed the forum rules on your way in, which specifically prohibits "Launching, automation or script interaction with games or game servers, regardless of the game.". Please review them now, in the bottom right corner of each forum page, to see why you will not receive any help with this issue.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Astormooke

No Soup fo You!

Share this post


Link to post
Share on other sites
iSkilz

It appears you missed the forum rules on your way in, which specifically prohibits "Launching, automation or script interaction with games or game servers, regardless of the game.". Please review them now, in the bottom right corner of each forum page, to see why you will not receive any help with this issue.

I let my guard down. ya got me.

i'll resort to google now... saw an answer on a different thread in same forum somewhere..   -.-

Share this post


Link to post
Share on other sites
JLogan3o13

Aside from my personal respect for AutoIt as a language, as well as the forum. I would add only this:


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
iSkilz

Aside from my personal respect for AutoIt as a language, as well as the forum. I would add only this:

Thats funny... you seem to think using a bot for repetitive tasks is somehow better than becoming the bot.

Sorry you despise me for playing a game. In my defense, I'm trying to learn, have fun, and Not Grind my life away.

If you still despise me, thats your own issue, just don't pretend like you understand me -.-

Share this post


Link to post
Share on other sites
iSkilz

On a lighter note, I found out about various useful tools in Scite's Tools section  yay! very useful!

and how to add udfs, including the udf which solves this thread:  MouseOnEvent

sorry for being negative this thread. i'll try to refrain in the future.

thread solved, and gn :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×