【问题标题】:Detect coordinates of touchpad检测触摸板的坐标
【发布时间】:2016-10-16 03:00:41
【问题描述】:

我想开发类似 Synaptics 触摸板手势应用程序。 Synaptics 设置显示 x 和 y 坐标。有什么软件可以用吗?喜欢这段代码:

$x_start = 300
$y_start = 300
While 1
   If $ontouch == True Then
     MouseMove($x_start + $x_touch, $y_start + $y_touch)
   EndIf
Wend

您可以建议任何语言,但最好是 AutoIt 或 VBScript。一些图片澄清:

【问题讨论】:

  • 您能多解释一下您的想法的功能吗?比如,你想识别手势还是只识别触摸屏动作。
  • @ShaunZyrille 哦,你说的不是触控板,而是笔记本电脑的触控板。据我所知,这是不可能的,因为触控板不会向 PC 发送坐标,只有运动。还用@标记人,然后是他们的名字,以便我们收到通知。
  • @IkeRoyle 哦,谢谢你通知我,Synaptics 让这成为可能,但我想我做不到。

标签: vbscript coordinates autoit detect touchpad


【解决方案1】:

Synaptics 设置显示 x 和 y 坐标。有什么软件可以用吗?

 

Global Const $g_iDelay     = 10
Global Const $g_sKeyExit   = 'q'
Global Const $g_sTooltip   = 'X = %i\nY = %i'

Global       $g_bStateExit = False

Main()

Func Main()
    Local $sTooltip = ''
    Local $aCoordinates

    HotKeySet($g_sKeyExit, 'SetStateExit')

    While Not $g_bStateExit

        $aCoordinates = MouseGetPos()
        $sTooltip     = StringFormat($g_sTooltip, $aCoordinates[0], $aCoordinates[1])

        ToolTip($sTooltip)
        Sleep($g_iDelay)

    WEnd

    Exit
EndFunc

Func SetStateExit()

    $g_bStateExit = True

EndFunc

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-12-16
    • 1970-01-01
    • 1970-01-01
    • 2012-05-31
    • 1970-01-01
    • 1970-01-01
    • 2010-12-06
    • 1970-01-01
    相关资源
    最近更新 更多