Crank 发表于 2005-12-21 11:18:27

剪贴板功能

现在在“下载”部分下有一个新的ARX应用程序,它包括以下功能:
(SetClipboardText)
(GetClipboardText)
(emptyClipboard)
适用于AutoCAD 2004-2006和垂直行业。
ClipBoard.arx
http://www.geometricad.com
最好的问候;
路易斯。
**** Hidden Message *****

GDF 发表于 2005-12-21 13:52:14

(start app"clipbrd")

mark 发表于 2005-12-21 14:15:13


我不懂....?
我们的想法是为最终用户提供这些新功能,并在他们的lisp例程中直接使用它们,Dale Fugier的DOSlib tm是一款出色的扩展应用程序,但大多数lisp程序员更喜欢小型的3d party应用程序,并且不加载消息...对于所有权问题。
玩得开心。

mark 发表于 2005-12-21 15:07:31

谢谢路易斯。
我可以充分利用您的功能。
我已经将它添加到我的mnl文件中:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;自动加载剪贴板应用程序;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;http://www . geometricad . com
;;;作者路易斯·埃斯基维尔;;;剪贴板功能:
;;;用法:(SetClipboardText
)
;;;用法:(GetClipboardText)
;;;用法:(EmptyClipboard)
(defun ARCH:ClipBoard()
(cond((> =(distof(substr(getvar " acad ver ")1 4))16.0)
(if(not(member " ClipBoard . ARX "(ARX)))
(ARX load(findfile(strcat ARCH # SUPF " V _ 16/ClipBoard . ARX)))))
)
(princ))
加里

LE3 发表于 2005-12-21 21:37:14


拍打额头
嘟嘟,现在我明白了!
非常感谢路易斯,非常:kewl:

Pad 发表于 2005-12-21 21:41:44

下面是一些关于如何使用函数的小示例:
;; to set some text to the clipboard
_$ (SetClipboardText "This is a way to sent into the ClipBoard some text data")
T
;; here we can get the text inside the clipboard, coming from any application
_$ (setq string (GetClipboardText))
"This is a way to sent into the ClipBoard some text data"
;; this will empty the clipboard coming from any application
_$ (EmptyClipBoard)
T

HTH

LE3 发表于 2005-12-22 18:29:56

像魅力路易斯一样工作的人。Muchas gracias mi amigo。

LE3 发表于 2005-12-22 19:01:11


这是一个很好的例子

Pad 发表于 2005-12-23 12:31:38

从不上传这些函数的源代码,在代码丢失之前,这里只是以防万一:
//-----------------------------------------------------------------------------
//----- acrxEntryPoint.h
//-----------------------------------------------------------------------------
#include "StdAfx.h"
#include "resource.h"
//-----------------------------------------------------------------------------
#define szRDS _RXST("LESQ")
//-----------------------------------------------------------------------------
//----- ObjectARX EntryPoint
class Cclipboard17App : public AcRxArxApp {
public:
        Cclipboard17App () : AcRxArxApp () {}
        virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
                // TODO: Load dependencies here
                // You *must* call On_kInitAppMsg here
                AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
               
                acutPrintf(_T("\n\nClipBoard Functions:"));
                acutPrintf(_T("\nUsage: (SetClipboardText )"));
                acutPrintf(_T("\nUsage: (GetClipboardText)"));
                acutPrintf(_T("\nUsage: (EmptyClipboard)\n\n"));
                return (retCode) ;
        }
        virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
                // TODO: Add your code here
                // You *must* call On_kUnloadAppMsg here
                AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
                // TODO: Unload dependencies here
                return (retCode) ;
        }
        virtual void RegisterServerComponents () {
        }
public:
        // ----- ads_setclipboardtext symbol (do not rename)
        static int ads_setclipboardtext(void)
        {
                struct resbuf *rb=acedGetArgs();
                LPCTSTR pszText;
                // temp string just for testing
                CString tmp;
                // get the argument
                if (rb && (rb->restype==RTSTR)){
                        pszText=rb->resval.rstring;
                        rb=rb->rbnext;
                        tmp=pszText;
                }
...

下载以下完整的源代码:

mark 发表于 2005-12-23 13:02:14

嗨,LE
你能上传arx吗?
http://www.geometricad.com/网站似乎不再。
谢谢
P
页: [1] 2
查看完整版本: 剪贴板功能