Results 1 to 2 of 2
  1. #1
    esbe1175's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    My Mood
    Confused

    Question Toggle between modes? [AHK]

    I currently have a code for rapid fire with Chicom, which works pretty well. And now I had the idea of creating a toggle key so you can switch between modes (Chicom, M4A1, BER etc.), How would i do that? My code is as follows:
    Code:
    ~F6::Suspend
     $Lbutton::
    Random, SleepTime, 150, 160
    loop{
    GetKeyState, keystate, Lbutton,P
    if keystate = U
    	break
    else
    Click, Left, 1
    Sleep, %SleepTime%
     }
    Edit: Also if possible, I'd like to make it display a tooltip showing which mode you're in.

    Edit2: I figured it out, for people who are interested, this is what i did:
    Code:
    Mode = 0
    ~F6::Suspend
    
        *m::           
    If (Mode = 0)
    {
    	Mode = 1
    	ToolTip, CHICOM
    	Sleep, 500
    	ToolTip
    	Random, SleepTime, 150, 160
    }
    Else If (Mode = 1)
    {
    	Mode = 2
    	ToolTip, M4A1
    	Sleep, 500
    	ToolTip
    	Random, SleepTime, 400, 400
    }
    Else If (Mode = 2)
    {
    	Mode = 0
    	ToolTip, BER
    	Sleep, 500
    	ToolTip
    	Random, SleepTime, 800, 800
    }
    
     $Lbutton::
    loop{
    GetKeyState, keystate, Lbutton,P
    if keystate = U
    	break
    else
    Click, Left, 1
    Sleep, %SleepTime%
     }
     Return
    Last edited by esbe1175; 08-03-2015 at 08:59 PM.

  2. #2
    ImJames's Avatar
    Join Date
    Feb 2015
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    2
    My Mood
    Yeehaw
    Ignore me, I'm stupid, I just reread the script and realized my idiocy...
    Last edited by ImJames; 01-21-2016 at 12:48 PM.

Similar Threads

  1. [Help] Toggle scrip on AHK
    By higuys1 in forum Counter Strike: Global Offensive Coding & Resources
    Replies: 1
    Last Post: 08-18-2015, 04:15 AM
  2. [Solved] Is there a key bind that toggles between Primary and Secondary?
    By iD4rklord in forum Counter Strike: Global Offensive Help
    Replies: 3
    Last Post: 07-03-2015, 05:47 AM
  3. [Release] .AHK CapsLock Toggle BunnyHop
    By Madsta1 in forum Counter Strike: Global Offensive Coding & Resources
    Replies: 9
    Last Post: 05-11-2015, 05:23 PM
  4. [Help Request] Switch Between Full Screen And Win Mode
    By phuocdai11 in forum C++/C Programming
    Replies: 1
    Last Post: 03-24-2012, 02:09 PM
  5. [Solved] How to toggle between selfhide and selfshow code
    By RAZUBA in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 07-30-2011, 04:57 AM