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))

  • 相关阅读:
    五种方法实现python3-随机生成10位包含数字和字母的密码
    用matplotlib中imshow()函数绘图
    MTNET 自用ios网络库开源
    移动时代软件测试团队该往哪里去?
    自己做的加速app测试流程的小工具,目前打算开放使用,想注册的朋友抓紧了,嘻嘻
    golang append
    Invalid Image Path
    xcode 插件之KSImageNamed-Xcode
    dissmiss a UISearchBar with an SearchBarController
    nginx server_name
  • 原文地址:https://www.cnblogs.com/mjgw/p/12459495.html
Copyright © 2011-2022 走看看