自定义函数返回多个值示例#Include <WinAPI.au3>
$Get = WinGetEX("输入窗口标题",'')
MsgBox(0, "鼠标状态 (X坐标,Y坐标", $Get[1] & ", " & $Get[2])
MsgBox(0, "活动窗口状态 (宽度,高度):", $Get[3] & ", " & $Get[4])
MsgBox(0, "活动窗口文本", $Get[5]& " "&$Get[0])
Func WinGetEX($x,$y)
Dim $EX[6]
$EX[0] ='自定义数组文字'
$EX[1] =_WinAPI_GetMousePosX()
$EX[2] =_WinAPI_GetMousePosy()
$EX[3] =_WinAPI_GetWindowWidth(WinGetHandle($x,$y))
$EX[4] =_WinAPI_GetWindowHeight(WinGetHandle($x,$y))
$EX[5] =_WinAPI_GetWindowText(WinGetHandle($x,$y))
Return $EX
EndFunc
更详细资料请参考帮助文档:Func...Return...EndFunc
或 return如何返回多个变量
|