本帖最后由 hlzxcjx 于 2010-7-28 11:00 编辑
如下代码可获得显示窗口的文本,但不能获得隐藏窗口的文本:$text = WinGetText("窗口标题", "")
MsgBox(0, "获得的文本:", $text)
假如第三方软件如下:#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$AForm1 = GUICreate("窗口标题",633, 447, 193, 125)
$Button1 = GUICtrlCreateButton("隐藏窗口", 224, 168, 169, 65, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
WinSetState ( "窗口标题", "", @SW_HIDE )
EndSwitch
WEnd
隐藏窗口后就不能获得其文本了,如何解决? |