0
我知道我錯過了明顯的東西,但我不明白爲什麼這不起作用。爲什麼你不會在第一個msgbox中顯示我知道它說變量沒有被分配,如果我取消註釋#Warn?這是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
謝謝,我一定是錯過了手冊中! –