这是我试图从函数调用的代码。
如果我自己使用它可以正常工作
#3::
FileRead, OutputVar, C:\temp\test.txt
msgbox %OutputVar%
#SingleInstance, force
Gui, Color, White
Gui, -caption +toolwindow +AlwaysOnTop
Gui, font, s30 bold, Arial
Gui, add, text, vTX cRed TransColor, %OutputVar%
Gui, Show, % "x" A_ScreenWidth-1500 " y" A_ScreenHeight-900 ,TRANS-WIN
WinSet, TransColor, White, TRANS-WIN
return
当我调用将其放入函数并从那里调用它时,我在下面得到错误。
:*:11::
Run calc.exe
numcodee()
return
numcodee()
{
FileRead, OutputVar, C:\temp\test.txt
msgbox %OutputVar%
#SingleInstance, force
Gui, Color, White
Gui, -caption +toolwindow +AlwaysOnTop
Gui, font, s30 bold, Arial
Gui, add, text, vTX cRed TransColor, %OutputVar%
Gui, Show, % "x" A_ScreenWidth-1500 " y" A_ScreenHeight-900 ,TRANS-WIN
WinSet, TransColor, White, TRANS-WIN
}
从函数调用时出错