明らかな何かが欠けていることは知っていますが、なぜこれが機能しないのかわかりません。#Warn のコメントを外すと、変数が割り当てられていないことを知っている最初のメッセージボックスに hello が表示されないのはなぜですか? これは、ahk ファイル内の唯一のものです。
#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.
#SingleInstance force
; Reload the script
^!z::
WinActivate, ahk_class Notepad++
Send {ctrl down}s{ctrl up}
sleep 100
Reload
return
ADPass = hello
!5::
MsgBox, %ADPass%
Msgbox, test
return