Jump to content

Recommended Posts

Posted

Well, just though,

On call of duty two, i see many people bobbing up and down while working.

Croush, stand, crouch, stand etc etc.

I thought, well, it may help. So... to save my fingers.

I coded this simple script.

Hey, all you guys are probebly way above this, but oh well.

#include <GUIConstants.au3>


$Form1 = GUICreate("CoD2", 179, 36, 304, 162)
$Label1 = GUICtrlCreateLabel("R == Start", 8, 8, 64, 17)
$Label2 = GUICtrlCreateLabel("F == Start", 104, 8, 62, 17)
$Label3 = GUICtrlCreateLabel(":", 80, 8, 7, 17)
GUISetState(@SW_SHOW)

HotKeySet("r", "Start")
HotKeySet("f", "Pause")

Global $Pause = 1

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func Start()
    $Pause = 1
        While $Pause = 1
            Send("c")
            Sleep(200)
            Send("{SPACE}")
        WEnd
EndFunc

Func Pause()
    $Pause = 3
EndFunc
Posted

#include <GUIConstants.au3>

$Form1 = GUICreate("CoD2", 179, 36, 304, 162)
$Label1 = GUICtrlCreateLabel("R == Start", 8, 8, 64, 17)
$Label2 = GUICtrlCreateLabel("F == Pause", 104, 8, 62, 17)
$Label3 = GUICtrlCreateLabel(":", 80, 8, 7, 17)
GUISetState(@SW_SHOW)

HotKeySet("r", "Start")
HotKeySet("f", "Pause")

Global $Pause = 3

While 1

    $nMsg = GUIGetMsg()
Switch $nMsg
    Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch

If $Pause = 1 Then
    Send("c")
        Sleep(200)
        Send("{SPACE}")
EndIf

WEnd

Func Pause()
$Pause = 3
EndFunc

Func Start()
$Pause = 1
EndFunc

This way you can check to see if the GUI is closed while the macro is running.

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
  • Recently Browsing   0 members

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