zoukankan      html  css  js  c++  java
  • 关于剪切板操作的三个函数

    (defun ClearClipBoard ()
      (startapp "cmd /c "echo off | clip"")
    )                                        ; (clearclipboard)

    (defun _SetClipBoardText (text / htmlfile result)
      ;;  Caller's sole responsibility is to pass a
      ;;  text string. Anything else? Pie in face.

      ;;  Attribution: Reformatted version of
      ;;  post by XShrimp at theswamp.org.
      ;;
      ;;  See <a href="http://tinyurl.com/2ngf4r." target="_blank">http://tinyurl.com/2ngf4r.</a>

      (setq        result
             (vlax-invoke
               (vlax-get
                 (vlax-get
                   (setq htmlfile (vlax-create-object "htmlfile"))
                   'ParentWindow
                 )
                 'ClipBoardData
               )
               'SetData
               "Text"
               text
             )
      )
      (vlax-release-object htmlfile)
      text
    )                                        ;( _SetClipBoardText "testing")

    (defun _GetClipBoardText (/ htmlfile result)
      ;;  Attribution: Reformatted version of
      ;;  post by Patrick_35 at theswamp.org.
      ;;
      ;;  See <a href="http://tinyurl.com/2ngf4r." target="_blank">http://tinyurl.com/2ngf4r.</a>
      (setq        result
             (vlax-invoke
               (vlax-get
                 (vlax-get
                   (setq htmlfile (vlax-create-object "htmlfile"))
                   'ParentWindow
                 )
                 'ClipBoardData
               )
               'GetData
               "Text"
             )
      )
      (vlax-release-object htmlfile)
      result
    )                                        ;(setq test (_GetClipBoardText))

  • 相关阅读:
    【python】绘图,颜色,线型
    【python】绘图,画虚线
    【python】绘图坐标轴标题中包含上标或下标
    【python】python3.7与3.9共存,两个3版本同时存在(平时用vscode敲代码)pip复制
    【python】 matplotlib 画图刻度、图例等字体、字体大小、刻度密度、线条样式设置
    Charles乱码问题
    charles的设置断点
    Charles的设置手机抓包
    ajax
    java jdbc连接mysql数据库实现增删改查操作
  • 原文地址:https://www.cnblogs.com/mjgw/p/12459495.html
Copyright © 2011-2022 走看看