*EDIT: I just tested with some example scripts that don't have the zero-width spaces, and that's replicating the exact same issues.*

Code: Select all

```
Character1 := A_ScriptDir "\Example 1.ahk"
Character2 := A_ScriptDir "\Example 2.ahk"
Character3 := A_ScriptDir "\Example 99.ahk"
Character4 := A_ScriptDir "\Example 10.ahk"
Character5 := A_ScriptDir "\Example.ahk"
```

Code: Select all

```
if WinExist(Character1) ; Delete the two lines that correspond with *this* script.
WinClose
if WinExist(Character2)
WinClose
if WinExist(Character3)
WinClose
if WinExist(Character5) ; Skipping Character 4 as though this were in the script for Example 10.
WinClose
```

Code: Select all

```
ScriptNumber := 1
loop 15 ; Increase this number if you add more scripts.
{
if ScriptNumber = 0 ; Change this for the number that corresponds with *this* script.
{
++ScriptNumber
}
else
{
Current := ("Character" Scriptnumber)
if WinExist(Current)
WinClose
++ScriptNumber
}
}
```

Thanks for any input you might have!

Edit: Also, here's the header that I've got:

Code: Select all

```
#Requires AutoHotkey v2.0
#SingleInstance Force
DetectHiddenWindows(true)
```

Code: Select all

```
^!+x::ExitApp()
#HotIf WinActive("Game")
```