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

  • 相关阅读:
    java通过dom读写xml文件
    SWT
    Eclipse RCP学习资料
    Integration Guide
    一个Linux命令,黑客帝国
    GET和POST两种基本请求方法的区别
    贫血模式-AnemicDomainModel
    Synchronized锁在Spring事务管理下,为啥还线程不安全?
    redis 集群配置、启动
    redis cluster集群
  • 原文地址:https://www.cnblogs.com/mjgw/p/12459495.html
Copyright © 2011-2022 走看看