|
本帖最后由 crazy715 于 2009-6-17 09:58 编辑
#Include <GuiButton.au3>
Dim $bName,$handle
ShellExecute("C:\Documents and Settings\USER\桌面\1.txt")
WinWaitActive("1.txt - 记事本")
Run("rundll32.exe shell32.dll,Control_RunDLL access.cpl,,3")
WinWaitActive("辅助功能选项")
$handle = ControlGetHandle("[CLASS:Button;INSTANCE:2]","",1034)
$bName= _GUICtrlButton_GetText ($handle)
ControlSend("1.txt - 记事本","","Edit1",$bName)
这是一段小程序,希望是能够获得("[CLASS:Button;INSTANCE:2]","",1034)的text属性,返回到1.txt文本上。。但是。。没有成功,是不是_GUICtrlButton_GetText 用的不恰当?还是不用ControlGetHandle??
请高手指点。。感谢。。 |
|