zoukankan      html  css  js  c++  java
  • mouse_event,keybd_event

    mouse_event

    代码
    procedure MyMouseClick();
    begin
    mouse_event(MOUSEEVENTF_LEFTDOWN,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP,
    0, 0, 0, 0);
    end;

    procedure MyMouseDBClick()
    begin
    mouse_event(MOUSEEVENTF_LEFTDOWN,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTDOWN,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP,
    0, 0, 0, 0);
    end;
    代码
    void MyMouseClick()
    {
    mouse_event(MOUSEEVENTF_LEFTDOWN,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP,
    0, 0, 0, 0);
    }

    void MyMouseDBClick()
    {
    mouse_event(MOUSEEVENTF_LEFTDOWN,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTDOWN,
    0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP,
    0, 0, 0, 0);
    }
    keybd_event

    代码
    //a
    keybd_event(Ord(
    'A'), KEYEVENTF_EXTENDEDKEY or 0, 0);
    keybd_event(Ord(
    'A'), 0, KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP, 0);
    //A
    keybd_event(VK_SHIFT,
    0, KEYEVENTF_EXTENDEDKEY or 0, 0);
    keybd_event(Ord(
    'A'), KEYEVENTF_EXTENDEDKEY or 0, 0);
    keybd_event(Ord(
    'A'), 0, KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP, 0);
    keybd_event(VK_SHIFT,
    0, KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP, 0);
    //Ctrl + A
    keybd_event(VK_CONTROL,
    0, KEYEVENTF_EXTENDEDKEY or 0, 0);
    keybd_event(
    65, 0, KEYEVENTF_EXTENDEDKEY or 0, 0);
    keybd_event(
    65, 0, KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP, 0);
    keybd_event(VK_CONTROL,
    0, KEYEVENTF_EXTENDEDKEY or KEYEVENTF_KEYUP, 0);

  • 相关阅读:
    主成分分析(PCA)原理及推导
    SVD在推荐系统中的应用详解以及算法推导
    奇异值分解(SVD)原理详解及推导
    jdk1.8源码学习笔记
    #WeakHashMap
    #TreeSet
    如何在Centos7安装swoole的PHP扩展
    Photoshop 使用过程中遇到的问题
    Sublime 配置 Markdown,并实时预览
    移动端响应式布局,rem动态更新
  • 原文地址:https://www.cnblogs.com/Jekhn/p/1918650.html
Copyright © 2011-2022 走看看