Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

BF4 Script - IfWinActive, Battlefield


  • Please log in to reply
10 replies to this topic
Gatekeeper
  • Members
  • 2 posts
  • Last active: Jan 19 2014 07:20 PM
  • Joined: 29 Dec 2013

Hello 

 

I thought I would share this, I got this to function so that I could leave the script running and only have Suspend, off when BF4 was running 

The sleep times would have to be adjusted for a players style and IO speeds I assume

 

Any other tweaks or feedback is appreciated  :-) 

SetTitleMatchMode, 1
SetTitleMatchMode, Slow
Loop{ 
    IfWinActive, Battlefield
    { 
        Suspend, off
    } 
    else 
    {    
        Suspend, on
    } 
}

;================== Toggle suspend in game if the above loop is not desired
F6::suspend 

;================== Auto holds breath when zoomed @key RButton - set steady to " hold " @key t
~RButton::
Sleep 600 
Send {t down}
Sleep 200 
Send {t up}
return

;================== Prone @key9 when reloading @key8
~8::9

;================== ONE BUTTON DEFIB / CLAYMORE / MINE ==========
;=== If Scroll Lock is down
;===  When DEFIB or CLAYMORE or MINE  is pressed @key 4  . . . . . . 
;=== GO Prone @key 9 - Click the Mouse to deploy / Defib  - Switch back to Primary weapon @key 1
~4::
GetKeyState, state, scrolllock, T
if state = D
{
Sleep 400 
Send {9 down}
Sleep 100 
Send {9 up}
Sleep 500 
   MouseClick, left,,, 1, 0, D
    Sleep 75
    MouseClick, left,,, 1, 0, U
       Sleep 75
Sleep 600 
Send {1 down}
Sleep 100 
Send {1 up}
}
return
;==================CAPS LOCK AUTO SINGLE FIRE WEAPON===========
;=== If Caps Lock is DOWN repeatedly click the Left Mouse when held down
;=== This is priceless when using the DMR weapons with low recoil - and killer for Handguns 

;=== To modify for handguns only, simply bind the secondary weapon key to set caps lock down 
;=== then Primary weapon key to set caps lock up 


~LButton::
GetKeyState, state, capslock, T 
if state = D
{
    Loop
    {
   GetKeyState, LButtonState, LButton, P
    if LButtonState = U
    {
       break
    }
   MouseClick, left,,, 1, 0, D
    Sleep 75
    MouseClick, left,,, 1, 0, U
       Sleep 75
; === TODO: 
; === Add recoil reduction mouse movement function here
; === Should have a couple variables to be able to adjust for different weapon stability
; === uncertain if this would be " Legal " 
    }
}
return
=================================================


jelllo
  • Members
  • 1 posts
  • Last active: Jan 07 2014 12:11 PM
  • Joined: 03 Jan 2014

sounds very usefull!
i'll try this shortly and give a reply.
plz keep on working on this.



Ryix
  • Members
  • 13 posts
  • Last active: Jan 14 2015 11:26 AM
  • Joined: 03 Jan 2014

Disapproving aside, i should point out autohotkey is fairly well known macro program and its process likely scanned for by punkbuster. I wouldnt suggest using this script at all unless you want to buy another copy of BF4.

The rapid fire for dmr/pistol thing however, explains so much, alot of full-auto dmr's out there at the moment... ya git!



stemsmit
  • Members
  • 17 posts
  • Last active: Feb 06 2015 11:17 PM
  • Joined: 16 May 2013

How likely is it that punkbuster picks up AHK?



nbbsn
  • Members
  • 2 posts
  • Last active: Apr 27 2014 01:45 AM
  • Joined: 12 Nov 2013

How likely is it that punkbuster picks up AHK?

Very likely imo.

I got kicked a lot from Punkbuster in BF3 when I forgot to stop my AHK scripts (and those were just my regular scripts for text expansion and launching programs).



Issvor
  • Members
  • 2 posts
  • Last active: Jan 24 2014 10:52 PM
  • Joined: 19 Jan 2014

Disapproving aside, i should point out autohotkey is fairly well known macro program and its process likely scanned for by punkbuster. I wouldnt suggest using this script at all unless you want to buy another copy of BF4.

The rapid fire for dmr/pistol thing however, explains so much, alot of full-auto dmr's out there at the moment... ya git!

I have a ahk for a few alt codes, would it pick up that? Or does it pick up anything that deals with ahk?



Gatekeeper
  • Members
  • 2 posts
  • Last active: Jan 19 2014 07:20 PM
  • Joined: 29 Dec 2013

@ Jello - Thanks  :shy:. .. . workin' on it occasionally, not much more I wish to do really the recoil mouse movement would be over the top I think.
@ Ryix / Isvor / stemsmit / nbbsn - B) Compile your scripts into an EXE and run that instead of running the AutoHotKey.exe - Problem solved

In relation to whether or not you disapprove - This script is nothing more than what can be done with a good programmable mouse,  without the $169 cost

A side note on PB :angry:
I have been getting kicked since the PB last patch for " Disallowed Program/Driver [130827]  "
After some debugging - I discovered this is NOT for the compiled  AHK exe but for running Sapphire TRIXX.exe
PB telling me that  I CAN NOT overclock my video card is a bit overbearing I think . . .so  . . .
Rename Trixx.exe to  WeClockWhatWeWant.exe - Problem Solved



Ryix
  • Members
  • 13 posts
  • Last active: Jan 14 2015 11:26 AM
  • Joined: 03 Jan 2014

Is PB not smart enough to see through a rename of an exe? or a compiled script?



Shadesss
  • Members
  • 5 posts
  • Last active: Jun 17 2016 08:39 PM
  • Joined: 13 Feb 2015

Is PB not smart enough to see through a rename of an exe? or a compiled script?

my post is pretty much grave digging but yes , changing exe name and md5 hash may affect only if the script is blacklisted



Wyvern010
  • Members
  • 24 posts
  • Last active: Jul 11 2016 11:17 PM
  • Joined: 30 Mar 2015

I have alway used my personal Anti-Recoil Script in BF4 BF3 and BFH, Never had any problems with it, and never got kicked or banned.



Wyvern010
  • Members
  • 24 posts
  • Last active: Jul 11 2016 11:17 PM
  • Joined: 30 Mar 2015

The RPM is function is used to calculate when to pull the mosue down.
like: RPM = 800 would be 60000(ms)/800 = 75ms so every 75MS the mouse is pulled down bij X# of pixels.
 
Have fun and play with it.
(Need iniLib to save settings)
 
 
 
HOW TO USE:
1. Open Game(Windowed-Borderless)
2. Open Anti-Recoil.
3. Make settings
4. Save.
 
 
 
 
 
Shots before Y Down = Ins
Shots before Y UP = Home
 
Pixels up/down/left/right
PixelUp = pgup
PixelDown = pgdn
PixelLeft = del
PixelRight = end
 
Toggle Anti-Recoil = NumpadMult
Tap Firing = NumPad6 
Skip First Shot = NumPad1
IF SFS is ON can use FSM
First Shot Multipliers = NumPad2
rpm + = NumpadAdd
rpm - = NumpadSub
;Save and Load Function
Load and Save = Numpad0
 
use Anti Recoil  = R + L MouseButton

 
 
#NoEnv
#SingleInstance force
;#InstallKeybdHook
;#InstallMouseHook
#include IniLib1.0.ahk
SetBatchLines, -1
SetTitleMatchMode, 3
SetTitleMatchMode, Fast
#MaxThreadsPerHotkey 3
 
 
 
 
;-------------------------------------------------------------------------------
; Vars
;-------------------------------------------------------------------------------
PorS = 1
Both = 1
FSM = 1.00
SFS = 1
ReadWin = 0
Tap = 0
SH = 1
pixelx = 0
pixely = 0
rpm = 800
NoRecoil = 0
enough = 0
;xhair = 00
Wheel_Count = 1
 
 
 
; X shots before to go Left/Right
SHDown = Ins
SHUP = Home
;Pixels up/down/left/right
PixelUp = pgup
PixelDown = pgdn
PixelLeft = del
PixelRight = end
;On/OFF
ToggleNoRecoil = NumpadMult
;RPM
DelayUp = NumpadAdd
DelayDown = NumpadSub
;Save and Load Function
BothButtons = LButton
 
 
 
;-------------------------------------------------------------------------------
; Hotkeys
;-------------------------------------------------------------------------------
Hotkey, ~*$%SHDown%, DoSHDown
Hotkey, ~*$%SHUp%, DoSHUp
Hotkey, ~*$%PixelLeft%, DoPixelLeft
Hotkey, ~*$%PixelRight%, DoPixelRight
Hotkey, ~*$%PixelUp%, DoPixelUp
Hotkey, ~*$%PixelDown%, DoPixelDown
HotKey, ~*$%ToggleNoRecoil%, DoToggleNoRecoil
HotKey, ~*$%DelayUp%, DoDelayUp
HotKey, ~*$%DelayDown%, DoDelayDown
Hotkey, ~*$%BothButtons%, BothButtons
Hotkey ~*WheelUp, WheelCount_Up, On B0 T20
Hotkey ~*WheelDown, WheelCount_Down, On B0 T20
SetTimer,CheckActiveWin, 500
 
;-------------------------------------------------------------------------------
; Functions
;-------------------------------------------------------------------------------
 
 
TipRPS(PopupText)
{
Gui,2: Destroy
Gui,2: +AlwaysOnTop +ToolWindow -SysMenu -Caption
Gui,2: Color, 000000
;WinSet, Transparent, 100
Gui,2: Font, s8, norm, Verdana
Gui,2: Add, Text, x5 y5 c00ff00, %PopupText%
Gui,2: Show, NoActivate X0 Y36
}
 
TipOn(PopupText)
{
Gui,2: Destroy
Gui,2: +AlwaysOnTop +ToolWindow -SysMenu -Caption
Gui,2: Color, 000000
;gui, 2: WinSet, Transparent, 100
Gui,2: Font, s8, norm, Verdana
Gui,2: Add, Text, x5 y5 c00ff00, %PopupText%
Gui,2: Show, NoActivate X0 Y18
}
 
TipOff(PopupText)
{
Gui,2: Destroy
Gui,2: +AlwaysOnTop +ToolWindow -SysMenu -Caption
Gui,2: Color, 000000
;Gui, 2: WinSet, Transparent, 100
Gui,2: Font, s8, norm, Verdana
Gui,2: Add, Text, x5 y5 cff0000, %PopupText%
Gui,2: Show, NoActivate X0 Y54
}
 
 
TipClear:
{
SetTimer,TipClear, 2000
Gui,2: destroy
}
return
 
 
 
;-------------------------------------------------------------------------------
; Hotkey labels
;-------------------------------------------------------------------------------
 
^F3::
Suspend, Permit
if getkeystate("F3", "P") = 1
{
SetTimer, CheckActiveWin, Off
WinGetActiveTitle, CurrentWindow
WinGet, ActiveADD, ProcessName, %CurrentWindow%
IniWrite, %ActiveADD%, AllowedGames.ini,Games,%CurrentWindow% ;Writes ProcessName to ini as "ActiveWindow=ProcessName"
MsgBox, Added %ActiveADD%
SetTimer, CheckActiveWin, On
}
return
 
CheckActiveWin:
suspend, permit
WinGetActiveTitle, WinTitle
WinGet,ProcesName, ProcessName, %WinTitle%
loop,1
{
;tooltip, | %Pors% | %PorsW% ,0,0
IniRead,Allowed,AllowedGames.ini,Games,%WinTitle%, ; checks if current window is in AllowdGames.ini, returns ERROR if (Key=WinTitle Value=ProcesName)  is not found.
if Allowed = Error ;Suspend All Hotkeys
{
Count := 2
AllSuspend := 1
Suspend, On
}
else
{
Count := 1
AllSuspend := 2
Suspend, Off
}
}
return
 
WheelCount_Down:
if WheelCount = 1
WheelCount -= 1
WeaponLoad = %SecundairyWeapon%
    gosub, LoadFromIni
Return
 
WheelCount_Up:
if WheelCount = 0
WheelCount += 1
WeaponLoad = %PrimairyWeapon%
Gosub, LoadFromIni
Return
 
PorST:
if PorS = 1
{
PorS -= 1
if PorS = 0
{
PorSW = Secundairy
    }
}
else 
{
PorS = 1
if PorS = 1
{
PorSW = Primairy
}
}
GuiControl ,, Button4, Save As %PorSW%
Return
 
 
Numpad3::
BothB:
if Both = 1
{
Both -=1
TipOn(" LMouseButton")
}
else
{
Both = 1
TipOff("L+R MouseButton")
}
return
 
 
Numpad2::
if FSM <= 3.0
{
FSM += 0.1
TipOn("Fisrt Shot Multi  = "Round(FSM,1) " X =" Round(FSM*pixelY,1))
}
else ;FSM = 2.00
{
FSM := 1.0
TipOn("First Shot Multi  = " FSM)
}
return
 
NumPad1::
if SFS = 1
{
SFS += 1
TipOn("Skip 1st Shot  = ON")
}
else
{
SFS -= 1
TipOn("Skip 1st Shot  = OFF")
}
Return
 
Numpad6::
If Tap = 0
{
Tap +=1
TipOn("Tap  = ON")
}
else
{
Tap -= 1
TipOn("Tap  = OFF")
}
return
 
 
DoToggleNoRecoil:
if NoRecoil < 1
{
NoRecoil += 1
if NoRecoil = 1
{
;SoundBeep, 800, 200
TipOn("ON")
}
}
else
{
NoRecoil := 0
;SoundBeep, 200, 100
;SoundBeep, 200, 100
TipOff("OFF")
}
return
 
DoSHDown:
If SH > 1
SH -= 1
SHK = 0
TipOn("SH  = " SH)
return
 
DoSHUp:
If SH <20
SH += 1
SHK = 0
TipOn("SH  = " SH)
return
 
DoPixelLeft:
if pixelx < 10
pixelx += 1
TipOn("Pixel X Is " pixelX)
return
 
DoPixelRight:
if pixelx > -10
pixelx -= 1
TipOn("Pixel X Is " pixelX)
return
 
DoPixelUp:
if pixely < 50
pixely += 1
TipOn("Pixel Y Is " pixelY)
return
 
DoPixelDown:
if pixely > 0
pixely -= 1
TipOn("Pixel Y Is " pixelY)
return
 
DoDelayUp:
if rpm > 400
rpm -= 10
TipRPS("RPM: " rpm "  " "RPS:" f(rpm))
return
 
DoDelayDown:
if rpm < 4000
rpm += 10
TipRPS("RPM: " rpm "  " "RPS:" f(rpm))
return
 
DoPeriodUp:
if period > 100
period -= 100
TipOn("PERIOD IS " period)
return
 
DoPeriodDown:
if period < 6000
period += 100
TipOn("PERIOD IS " period)
return
 
 
;----------------------------------------------SAVE, LOAD, DELETE, FUNC-------------------------------------------------------------------
;-----------------------------------------------------------------------------------------------------------------------------------------
;Pulls up Listview of Saved Weapon for easy picking.
Numpad0::
GetFromIni:
SetTimer, Update, 100
SetTimer, TipClear, Off
FileRead, iniWeapons, %title%.ini ; reads .ini for the game you are playing
FileRead, iniPriSec, %title%PriSec.ini
Sort, PriSec,D[]
Sort, iniWeapons,D[]
;NoRecoil = 0
PorS = 1
SetTimer,CheckActiveWin, Off
NoRecoil = 0
PorS = 1
 
if ReadWin = 0
{
ReadWin = 1
WinGetTitle, title, A
}
; Create the ListView with 4 columns:0
Gui,Destroy
Gui, Add, Checkbox, checked%Both% gBothB, Press L + R Mousekey to Activate
gui, add, text,  W150 H20 R1, Save To INI
Gui, Add, Edit, W150 H20 R1 vWeaponSend
Gui, Add, Button,  W150 H20 R1 gSaveToIni, Save To Ini
Gui, Add, Checkbox,  W150 H20 Check%PorS% gPorST ,Checked is Secundary
Gui, Add, Button,  W150 H20 vPorSW gLoadFromIni, Save As %PorSW%
Gui, Add, Button, W150 H20 gDelete, Delete
Gui,Add, Text, W300 H20 ,Settings from %title%.ini 
gui, add, text,W300 H20 ,Double Click to LOAD from INI
Gui, Add, ListView,vLV1 r20 h150 w480 gMyWeaponView, Name|SH|X|Y|RPM|TAP|SFS|FSM
Gosub,FillWeaponList
Gui, Add, Text, W300 H20, Settings From %title%PriSec.ini
Gui, Add, Edit, W150 H20 r1 vSetSend
Gui, Add, Button, W150 H20 gSaveToClass, Save Class to Ini
;Gui, Add, Button, W150 H20 gDelete2, Delete
Gui, Add, ListView,vLV2 r20 h150 w480 gMyClassView, Class|Primary|Secundary
Gosub,FillClassList
Gui, Show, x100 y100 h650 w500
return
 
FillWeaponList:
Gui, ListView, LV1
Weapons := ini_getAllSectionNames(iniWeapons)
Loop, Parse, Weapons, `,
{
LV_Add("", A_LoopField, ini_getValue(iniWeapons, A_LoopField, "SH"),ini_getValue(iniWeapons, A_LoopField, "X"),ini_getValue(iniWeapons,A_LoopField, "Y"), ini_getValue(iniWeapons, A_LoopField, "rpm"), ini_GetValue(iniWeapons, A_LoopField, "TAP"),ini_GetValue(iniWeapons, A_LoopField, "SFS"),ini_GetValue(iniWeapons, A_LoopField, "FSM"))
}
LV_ModifyCol(20)  ; Auto-size each column to fit its contents.
LV_ModifyCol()  ; For sorting purposes.
return
 
FillClassList:
Gui, Listview, LV2
PriSec := ini_getAllSectionNames(iniPriSec)
loop, Parse, PriSec, `,
{
LV_Add("", A_LoopField, ini_getValue(iniPriSec, A_LoopField, "PrimairyWeapon"),ini_getValue(iniPriSec, A_LoopField, "SecundairyWeapon"))
}
LV_ModifyCol(20)  ; Auto-size each column to fit its contents.
LV_ModifyCol()  ; For sorting purposes.
; Display the window and return. The script will be notified whenever the user double clicks a row.
return
 
 
 
Update: 
GuiControlGet,focused,FocusV
if A_GuiEvent = 
loop
{
if focused = LV1
RowNumber = 0
Loop,1
  ; This causes the first loop iteration to start the search at the top of the list.
    {
Gui,ListView, LV1
RowNumber := LV_GetNext(0,"focused") ; Resume the search at the row after that found by the previous iteration.
if not RowNumber  ; The above returned zero, so there are no more selected rows.
break
LV_GetText(Delete, RowNumber)
GuiControl,, WeaponSend, %Delete%
    }
if focused = LV2
RowNumber = 0
loop,1
  ; This causes the first loop iteration to start the search at the top of the list.
    {
Gui, ListView, LV2
RowNumber := LV_GetNext(0,"focused") ; Resume the search at the row after that found by the previous iteration.
if not RowNumber  ; The above returned zero, so there are no more selected rows.
break
LV_GetText(set, RowNumber)
GuiControl,, SetSend, %set%
    }
Sleep,20
}
return
 
Delete:
GuiControlGet, focused2,FocusV
{
if focused = LV1
RowNumber = 0
Loop
{
Gui,ListView, LV1
RowNumber := LV_GetNext(0,"focused2")
if not RowNumber
break
LV_GetText(Delete, RowNumber)
IniDelete,%title%.ini,%Delete%
gosub,GetFromIni
}
if focused = LV2
RowNumber = 0
loop
{
Gui, ListView, LV2
RowNumber := LV_GetNext(0,"focused2")
if not RowNumber
break
LV_GetText(set, RowNumber)
IniDelete,%title%PriSec.ini,%set%
gosub,GetFromIni
}
}
return
 
MyClassView:
Gui,ListView, LV2
if A_GuiEvent = DoubleClick
{
LV_GetText(Class, A_EventInfo)
LV_GetText(PrimairyWeapon, A_EventInfo, 2)  ; Get the text from the row's first field.
LV_GetText(SecundairyWeapon, A_EventInfo, 3)
TipRPS(" Loaded!!  Sec = "SecundairyWeapon "     Pri = " PrimairyWeapon)
}
Gosub, GuiClose
return
 
MyWeaponView:
Gui,ListView, LV1
if A_GuiEvent = DoubleClick
{
WeaponLoad = %Delete%
    if PorS = 1
    {
        PrimairyWeapon = %WeaponLoad%
    }
else
    {
   SecundairyWeapon = %WeaponLoad%
    }
}
LV_GetText(Delete, A_EventInfo)
LV_GetText(SH, A_EventInfo, 2)  ; Get the text from the row's first field.
LV_GetText(pixelx, A_EventInfo, 3)
LV_GetText(pixely, A_EventInfo, 4)
LV_GetText(rpm, A_EventInfo, 5)
LV_GetText(Tap, A_EventInfo, 6)
LV_GetText(SFS, A_eventInfo, 7)
LV_GetText(FSM, A_eventInfo, 8)
TipRPS(" Loaded!!    Weapon : " WeaponCall " " "Y : "pixely "  " "X : "pixelx "  "  "RPM : " rpm "  "" SH" "  " SH " "" TAP" TAP)
Gosub, GuiClose
return
 
 
LoadFromIni:
If ReadWin = 1
{
    GoSub, Update
WeaponLoad = %Delete%
    if PorS = 1
    {
        PrimairyWeapon = %WeaponLoad%
    }
else
    {
   SecundairyWeapon = %WeaponLoad%
    }
}
IniRead, SH, %a_workingDir%\%title%.ini, %WeaponLoad%, SH
IniRead, pixely, %a_workingDir%\%title%.ini, %WeaponLoad%, Y
IniRead, pixelx, %a_workingDir%\%title%.ini, %WeaponLoad%, X
IniRead, rpm, %a_workingDir%\%title%.ini, %WeaponLoad%, rpm
IniRead, TAP, %a_workingDir%\%title%.ini, %WeaponLoad%, TAP
IniRead, SFS, %a_workingDir%\%title%.ini, %WeaponLoad%, SFS
IniRead, FSM, %a_workingDir%\%title%.ini, %WeaponLoad%, FSM
return 
 
SaveToClass:
{
Gui,Submit, Nohide
;IniDelete, %A_WorkingDir%\%title%PriSec.ini, %SetSend%
IniWrite,%PrimairyWeapon%,%A_WorkingDir%\%title%PriSec.ini,%SetSend%,PrimairyWeapon
IniWrite,%SecundairyWeapon%,%A_WorkingDir%\%title%PriSec.ini,%SetSend%,SecundairyWeapon
TipRPS(" Saved!! ")
    }
gosub,GuiCLose
return
 
 
SaveToINI:
{
Gui,Submit, Nohide
IniDelete, %A_WorkingDir%\%title%.ini, %WeaponSend%
IniWrite,%SH%,%A_WorkingDir%\%title%.ini,%WeaponSend%,SH
IniWrite,%pixely%,%A_WorkingDir%\%title%.ini,%WeaponSend%,Y
IniWrite,%pixelx%,%A_WorkingDir%\%title%.ini,%WeaponSend%,X
IniWrite,%rpm%,%A_WorkingDir%\%title%.ini,%WeaponSend%,rpm
IniWrite,%TAP%,%A_WorkingDir%\%title%.ini,%WeaponSend%, Tap
IniWrite,%SFS%,%A_WorkingDir%\%title%.ini,%WeaponSend%, SFS
IniWrite,%FSM%,%A_WorkingDir%\%title%.ini,%WeaponSend%, FSM
TipRPS(" Saved!!    Weapon :" WeaponSend " " "Y :" pixely "  " "X : " pixelx "  "  "RPM :" rpm "  ""SH" "  " SH " " "TAP" TAP)
Gosub, GuiClose
    }
return
 
ExitApp:
GuiClose:
SetTimer,CheckActiveWin, On
SetTimer,Update, Off
Settimer, TipClear, 2000
Gui, Destroy
ReadWin = 0
NoRecoil = 1
return
;------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------------------
 
BothButtons:
if NoRecoil = 1
{
if Both = 1
{
GetKeyState, state, RButton, P ; RButton must me held down to use the LButton(Mouse)
if state = U
return
}
loop
{
GetKeyState, state2, LButton, P
if state2 = U
break
if Tap = 1
{
MouseClick, Left,,,,,D
MouseClick, Left,,,,,U
}
if getkeystate("LButton", "P") = 1
{
If A_Index >= %SFS%
{
if FSM >= 1.00
{
if A_Index <= 1
{
Floor(FSMY := pixely * FSM)
DllCall("mouse_event", "uint",1 , "Uint", 0,"Uint", FSMY)
}
else
{
DllCall("mouse_event", "uint",1 , "Uint", 0,"Uint", pixely)
SHK += 1
}
If SH = %SHK% ; If equals then x
{
SHK := 0 ; Resets Counter
DllCall("mouse_event", "uint",1 , "Uint", pixelx,"Uint", 0)
}
if Tap = 1
{
SetMouseDelay, f(rpm)
}
else
{
sleep, f(rpm)
}
if getKeystate("LButton", "P") = 0
{
DllCall("mouse_event", "uint",1 , "Uint", 0,"Uint", -pixely)
break
}
}
}
}
}
}
return
 
;-------------------------------interval per shot in Miliseconds----------------------------------------
 
 
f(n)
{
Return Round(60000/n)
 
}
return