试着练习了以下#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 194, 101, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Button1 = GUICtrlCreateButton("Button1", 32, 32, 129, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
GetPos()
Sleep(100)
WEnd
Func Form1Close()
Exit
EndFunc ;==>Form1Close
Func GetPos()
Local $a = GUIGetCursorInfo($Form1)
If $a[4] = $Button1 And $a[3] = 1 Then
run("explorer.exe /e,C:")
EndIf
EndFunc ;==>GetPos
|