Results 1 to 7 of 7
  1. #1
    zminh1's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    Request: Simple AHK Script.

    So I feel tired of spamming my mouse2 as a Tomb Raiser, anyone can make a simple script that when you press a key, it automatically presses mouse2 every 0.1s, and when you press again, it stops.

    Something like this:

    *Press X*
    Mouse2()
    Mouse2()
    ...
    *Press X again*
    Stop()
    Sorry for my english .

  2. #2
    maddoggy00's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Philly
    Posts
    3,413
    Reputation
    637
    Thanks
    5,336
    In autoit, just change whatever you need the mouse button(s) to be. As it is here, clicking the mouse wheel will toggle on/off spamming the left mouse button. You can easily change whatever key/button you're spamming as well as they toggle key. GL



    HotKeySet("{END}", "ForceEnd")
    DeclareGlobals()
    Local $hDLL = DllOpen("user32.dll")
    While 1
    If _IsPressed("04", $hDLL) Then
    ToggleSpamLClick()
    EndIf
    If $SpamLClick=1 Then
    MouseClick("Left")
    EndIf
    Sleep(80)
    WEnd
    Func ToggleSpamLClick()
    If $SpamLClick=0 Then
    $SpamLClick=1
    For $click=1 to 5
    MouseClick("Left")
    sleep(80)
    Next
    Else
    $SpamLClick=0
    Sleep(500)
    EndIf
    EndFunc
    Func DeclareGlobals()
    Global $SpamLClick=0
    EndFunc
    Func ForceEND()
    Exit
    EndFunc

    As of 9/17, I will be away for a few days due to medical reasons. Should be back up soon. Please refer to a GM or other mods in whatever particular section you need help with.



    Quote Originally Posted by Nico View Post
    I'm playing legit with my hacks
    MSN/Email/Skype: maddoggy00@aol.com
    If you add me on skype without an explicit message stating who you are on MPGH, you will be denied and blocked.

    Feel free to donate if I helped you earn some $$

    Tutorials for consoles and hacks

    Woo.exe Oath Mode with Next Map option, Follow-Bot, Master map (runs any S1 map), Two Moons, Mining. Requires a .dll with hacks for full functionality.

  3. #3
    zminh1's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Tyvm but when I run this script, it says there is an error on line 3.

  4. #4
    taejim's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Location
    Trove
    Posts
    301
    Reputation
    10
    Thanks
    892
    My Mood
    Devilish
    @zminh1 ok this is really simple everytime you hit Alt it will spam right mouse 5 times and it will reload the script itself so you can just alt everytime you want to spam mouse2. Tell me if it works for you. BTW this is in AutoHotKey.

    Code:
    #WinActivateForce
    
    Alt::
    	Counter := 0
    	
    	While Counter = 0
    		{
    			Loop	
    			{
    				MouseClick, right
    				if Counter = 5
    				{
    					Break
    				}
    				Sleep, 80
    				Counter++
    			}
    		}
    	Counter := 0
    	Reload
    	
    Return

    Code:
    My Trove Bot (OUTDATED) LazyFishing v1.9
    If you appreciate what i have done:

    1. Press the Thanks button above and give me reputation <3

    2. You can donate me if you feel like it, any amount is much appreciate.


  5. #5
    reppin's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    1,070
    Reputation
    17
    Thanks
    5,365
    My Mood
    Dead
    Here is my shot at it with my stop and start timer that I wrote for alot of my stuff.


    To use F1 to start you will hear 1 ding. Then F1 again to stop you will hear 2 Dings.
    Code:
    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    SetKeyDelay 10,50
    
    AutoMouseClick = off
    
    
    
    F1::
    		If AutoMouseClick = off
    			{
    				AutoMouseClick = on
    				SetTimer, AutoMouseClick, 100
    				Ticks := 0
    				SoundPlay, %A_WinDir%\Media\Windows Ding.wav
    			} else 	If AutoMouseClick = on
    			{
    
    			  AutoMouseClick = off
    			  SetTimer, AutoMouseClick, Off
    		  	SoundPlay, %A_WinDir%\Media\Windows Ding.wav
            sleep 100
            SoundPlay, %A_WinDir%\Media\Windows Ding.wav
    			}
    return
    
    
    AutoMouseClick:
     MouseClick, right
    return
    Like what I do? Well feel free to donate to show your love.


  6. #6
    reppin's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    1,070
    Reputation
    17
    Thanks
    5,365
    My Mood
    Dead
    Opps miss post
    Like what I do? Well feel free to donate to show your love.


  7. #7
    GHOSTKILL190's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    124
    Reputation
    10
    Thanks
    8
    Quote Originally Posted by taejim View Post
    @zminh1 ok this is really simple everytime you hit Alt it will spam right mouse 5 times and it will reload the script itself so you can just alt everytime you want to spam mouse2. Tell me if it works for you. BTW this is in AutoHotKey.

    Code:
    #WinActivateForce
    
    Alt::
    	Counter := 0
    	
    	While Counter = 0
    		{
    			Loop	
    			{
    				MouseClick, right
    				if Counter = 5
    				{
    					Break
    				}
    				Sleep, 80
    				Counter++
    			}
    		}
    	Counter := 0
    	Reload
    	
    Return
    With this, When your in battle you hit ALT and it will right click 5 times, (Sends out your 5 minions), Then when your energy is regen, You can hit ALT again and it will repeat sending out 5 minions? (It automatically after pushing ALT with start script, and automatically stop. Until you hit ALT again?) I would have a hard time remembering to toggle it on / off.

Similar Threads

  1. [Release] Simple AHK Bhop Script ( NEVER VAC)
    By Versecious in forum Counter-Strike 2 Coding & Resources
    Replies: 4
    Last Post: 06-30-2018, 07:05 PM
  2. [Release] AHK Scripts | Super Simple Recoil Reduction |
    By Vendetta773 in forum Counter-Strike 2 Scripts
    Replies: 21
    Last Post: 12-22-2015, 08:52 AM
  3. [Request] AHK script to stop your movement
    By SethC in forum Counter-Strike 2 Coding & Resources
    Replies: 12
    Last Post: 02-10-2015, 11:38 AM
  4. Simple AHK Script
    By noyster in forum Counter-Strike 2 Discussions
    Replies: 3
    Last Post: 12-14-2014, 06:49 PM
  5. ahk script request list
    By dg123 in forum Realm of the Mad God Help & Requests
    Replies: 14
    Last Post: 07-12-2013, 01:52 AM