如下代码,在WIN8 X64位系统下,无法实现将文件拖放到input控件中,但去掉“#RequireAdmin”就可以正常拖放了,这是为什么呢?我的脚本必须包含“#RequireAdmin”,应该怎么实现文件拖放,以便脚本可以获得文件路径?#RequireAdmin ;=>WIN8 X64位系统下去掉该行就正常了。郁闷!
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 300, 60, Default, Default, -1, $WS_EX_ACCEPTFILES)
$Input1 = GUICtrlCreateInput("拖放文件到此处", 10, 24, 250,20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg=$GUI_EVENT_CLOSE
Exit
Case $nMsg=$GUI_EVENT_DROPPED
MsgBox(0,'',GUICtrlRead($Input1))
EndSelect
WEnd
|