SunAwtDialog类

时间:2015-10-09 22:40:05

标签: java windows autohotkey

通常,我的AHK程序使用以下信息读取文件对话框(打开,另存为等)中“文件名:”文本区域的内容:在类对话框中读取控件“Edit1”的内容“#32770”。它还可以使用以下代码读取控件列表:

; in Notepad, open the "Open" dialog box
WinGet, strControlsList1, ControlList, ahk_class #32770
WinGetTitle, strTitle1, ahk_class #32770
MsgBox, , %strTitle1% controls, %strControlsList1%

我想尝试使用Java Access Bridge在为Windows实现的Java程序(PDF Split and Merge和Geogebra)中执行相同的操作。我知道这些程序的对话框使用类名“SunAwtDialog”而不是通常的“#32770”。但我无法访问“文件名”控件名称。 “Edit1”不起作用。我无法使用以下代码获取此对话框中的控件列表:

; in a Java app like PDF Split and Merge, open the "Save As" dialog box
WinGet, strControlsList2, ControlList, ahk_class SunAwtDialog
WinGetTitle, strTitle2, ahk_class SunAwtDialog
MsgBox, , %strTitle2% controls, %strControlsList2%

知道AHK脚本如何从这些Java应用程序对话框中获取信息吗?

0 个答案:

没有答案