Code: Select all
Gui, Font, S20 CDefault, Verdana
Gui, Add, Text, x122 y-1 w250 h50 , Test
Gui, Add, Text, x62 y-45 w0 h324 , Text
Gui, Font, S13 CDefault, Verdana
Gui, Font, S16 CDefault, Verdana
Gui, Add, Text, x22 y99 w180 h30 , Test
Gui, Font, S12 CDefault, Verdana
Gui, Add, CheckBox, x52 y139 w100 h30 , On/Off
Gui, Font, S20 CDefault, Verdana
Gui, Font, S16 CDefault, Verdana
Gui, Add, Text, x22 y189 w150 h30 , Test
Gui, Font, S12 CDefault, Verdana
Gui, Add, CheckBox, x12 y229 w160 h20 gFOV, Show/Don't show
Gui, Add, Text, x72 y269 w100 h30 , FOV Size
Gui, Add, Slider, x22 y299 w190 h70 , 25
; Generated using SmartGUI Creator 4.0
Gui, Show, x127 y87 h379 w479, New GUI Window
Return
FOV: #NoEnv
#SingleInstance Force
SetBatchLines -1
SetTitleMatchMode 2
GAME_TITLE := "VALORANT"
X_OFFSET := 860
Y_OFFSET := 439
hCircle := makeCircle(0x00FF00, 200, 2, 180)
SetTimer MoveCircle, 100
Return
MoveCircle:
if (hGame := WinActive(GAME_TITLE))
{
WinGetPos x, y, , , % "ahk_id " hGame
Gui %hCircle%: Show, % Format("NoActivate x{} y{}", x + X_OFFSET, y + Y_OFFSET)
}
else
Gui %hCircle%: Hide
Return
makeCircle(color, r := 400, thickness := 10, transparency := 254) {
static HWND := MakeGui()
; https://autohotkey.com/board/topic/7377-create-a-transparent-circle-in-window-w-winset-region/
outer := DllCall("CreateEllipticRgn", "Int", 0, "Int", 0, "Int", r, "Int", r)
inner := DllCall("CreateEllipticRgn", "Int", thickness, "Int", thickness, "Int", r - thickness, "Int", r - thickness)
DllCall("CombineRgn", "UInt", outer, "UInt", outer, "UInt", inner, "Int", 3) ; RGN_XOR = 3
DllCall("SetWindowRgn", "UInt", HWND, "UInt", outer, "UInt", true)
Gui %HWND%:Color, % color
Gui %HWND%:Show, xCenter yCenter w%r% h%r% NoActivate
WinSet Transparent, % transparency, % "ahk_id " HWND
return HWND
}
MakeGui() {
Gui New, +E0x20 +AlwaysOnTop +ToolWindow -Caption +Hwndhwnd
return hwnd
}
Return
GuiClose:
ExitApp