After getting annoyed at the pixel thingy, I decided to rework the script a bit. Instead of trying to find a pixel of that stealth icon pressing the button will just toggle a variable and make it do different things. This change also provides something of a benefit over the original if I'm reading it correctly: if you're ever in solo mode but not stealth mode, the script will always try to disable solo mode first so your allies will come to assist if you press it after you ambush an enemy or get discovered.
Just overwrite everything in the downloaded file with this:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, Mouse, Screen,
#SingleInstance Force ; Personal preference
#IfWinActive, Star Wars: Knights of the Old Republic
G:: ;This is the hotkey button, but it should be set to use the same binding as Stealth Mode
{
inStealth = 0
if (inStealth == 0) ;Activates stealth mode
{
Send, {G} ;G is the default Stealth Mode key, if you rebound it change this to match
inStealth := !inStealth
}
if (inStealth == 1) ;Deactivates stealth and solo mode
{
Send, {V} ;V is the default Solo Mode key, if you rebound it change this to match
inStealth := !inStealth
}
Return
}
G UP:: ;Same as the hotkey button, releasing it will close the pop-up
{
Send, {ENTER}
}
The reason I suggest using the Stealth Mode key as the hotkey binding is because it'll work better if you're alone. By binding it to something separate, you'll require 2 keypresses to enable or disable stealth since the Solo Mode button doesn't exist. If you really want to bind it to something else, however, you could disable this script while you don't have a party.