回复 1# dreamneo
'松开'滑块其实就是松开鼠标左键. 所以应该监测鼠标的操作, 可以注册鼠标点击的系统信息.
但AU3窗口程序已经集成了个有用函数, 所以可以取下巧.#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $x = 0
$Form1 = GUICreate("Slider Test", 307, 125)
$Label1 = GUICtrlCreateLabel("0", 130, 32, 80, 17)
$Slider1 = GUICtrlCreateSlider(64, 58, 177, 65)
GUISetState(@SW_SHOW)
While 1
$m = GUIGetCursorInfo($Form1)
$p = WinGetPos('Slider Test')
If IsArray($m) Then
If $m[4] = $Slider1 And $m[2] = 1 And $m[0] <> $x Then
GUICtrlSetData($Label1, GUICtrlRead($Slider1))
$x = $m[0]
Endif
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Slider1
GUICtrlSetData($Label1, GUICtrlRead($Slider1))
EndSwitch
WEnd
关于另一问题, input 控件的, 论坛上已有很多帖子, 请自行搜索学习! |