I found this script on Reddit. I have no idea how to code and have only used AHK a few times. How do i go about making it work while tabbed out in Fortnite? So that i don't have to have the Fortnite window active? I'm new to AHK and tried doing it on my own with ControlSend via Google, instead of SendEvent, but couldn't figure it out.
Code:
#Requires AutoHotkey v2.0 ; AES (Auto-Execute Section)
#SingleInstance Force ; Only 1 instance can run at a time
SetKeyDelay(6000) ; SendEvent has a 6000ms delay between keystrokes
return ; Marks the end of the AES
; Make a section for your hotkeys
$*F1::use_functions(1) ; F1 starts/stops the script
*Esc::ExitApp() ; This is an example of a kill switch (You can remove this if you want)
; Make a section for your functions
use_functions(flip := 0) { ; Flip is an optional parameter and is used to start/stop/reset things.
Static toggle := 0 ; Track on/off state
T := Random(100, 3000) ; Timer
L := Random(100,200) ; FailSafeTimer
If flip ; If flip parameter is true
toggle := !toggle ; Switch toggle On <-> Off
SendEvent("B" "{SPACE}") ; Send count and other keys
Sleep L
Sleep T
SendEvent("B" "{SPACE}")
SetTimer(use_functions, -1) ; Set timer to run func one more time
}
Comment