有没有人能告诉我:一个函数能快速切换鼠标左右键?
我的au3中controlClick原本用的全部是左键,今天把脚本换到同事机器上跑出现了搞笑的问题,他习惯用左手,而我们一般都是用右手,这样导致了我的脚本完全不能用了,请问有没有一个函数是切换鼠标左右键的? Run("CONTROL.EXE main.cpl @0")Sleep(2000)
ControlClick("Mouse Properties","",101)
Sleep(2000)
Send("{ENTER}")这个是我自己写的 可以实现左右键的切换但是会弹出面板来点击,能不能静默切换?点击exe后左右键直接就换了,可不可以?
等待中。。。。。。 Run("CONTROL.EXE main.cpl @0")
Sleep(2000)
ControlClick("","",101)
Sleep(2000)
Send("{ENTER}")
寒, 用一个api 就可以啊
SwapMouseButton
或
SystemParametersInfo(SPI_SETMOUSEBUTTONSWAP,TRUE,NULL,SPIF_UPDATEINIFILE|SPIF_SENDCHANGE); 你可以设置个复选框,选上就是左手,不选就是右手,这样可扩展性能好点。 回复 4# kylinpoet
能不能再详细点?我看了下 但是不会用 寒, 用一个api 就可以啊
SwapMouseButton
或
SystemParametersInfo(SPI_SETMOUSEBUTTONSWAP,TRUE,NUL ...
kylinpoet 发表于 2010-6-18 20:59 http://www.autoitx.com/images/common/back.gif
; #FUNCTION# ====================================================================================================================
; Name...........: _WinAPI_SystemParametersInfo
; Description ...: Retrieves or sets the value of one of the system-wide parameters
; Syntax.........: _WinAPI_SystemParametersInfo($iAction[, $iParam = 0[, $vParam = 0[, $iWinIni = 0]]])
; Parameters ....: $iAction - The system-wide parameter to be retrieved or set
; $iParam - A parameter whose usage and format depends on the parameter being queried or set
; $vParam - A parameter whose usage and format depends on the parameter being queried or set
; $iWinIni - If a system parameter is being set, specifies whether the user profile is to beupdated,and
; +if so, whether the $WM_SETTINGCHANGE message is to be broadcast. This parameter can be zero if you don't want
; +to update the user profile or it can be one or more of the following values:
; |$SPIF_UPDATEINIFILE - Writes the new setting to the user profile
; |$SPIF_SENDCHANGE - Broadcasts the $WM_SETTINGCHANGE message after updating the user profile
; Return values .: Success - True
; Failure - False
; Author ........: Paul Campbell (PaulIA)
; Modified.......:
; Remarks .......:
; Related .......:
; Link ..........; @@MsdnLink@@ SystemParametersInfo
; Example .......;
; ===============================================================================================================================
Func _WinAPI_SystemParametersInfo($iAction, $iParam = 0, $vParam = 0, $iWinIni = 0)
Local $aResult
$aResult = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $iAction, "int", $iParam, "int", $vParam, "int", $iWinIni)
If @error Then Return SetError(@error, 0, False)
Return $aResult <> 0
EndFunc ;==>_WinAPI_SystemParametersInfo SwapMouseButton这个函数没找到 也不知道到底怎么用的 SwapMouseButton 这个函数没找到 也不知道到底怎么用的 谢谢了 回复 9# yarsye
是系统 dll啊 不是 udf 回复 10# kylinpoet
用dllcall?试了不行
能详细点吗? 还在研究中
页:
[1]