![]() |
[讨论]★★★出个题给高手玩玩★★★
[讨论]★★★出个题给高手玩玩★★★
www.dimcax.com [讨论]★★★出个题给高手玩玩★★★ 不知道论坛上有没有人做个这个题,有的话请告诉一下地址。 我知道这个论坛上的高手太多太多,所以想了一个题大家试试玩,有兴趣就试试! 让cad实现简单的聊天功能,如果跟外网聊天有困难的话,我们可以从内网开始。 聊天最基本的就是要实时,也就是说大家都开着cad,我在自己的电脑里输入信息并发送的话 接收的电脑要能实时的显示,这边一发送,那边就能接收到。 嘿,如果能实现,应该是简单的聊天了吧? d 唉 这个东西应该用winsock控件做网络编程吧? 以前啥都不会的时候写过一个手动的版本 扔个砖头先 (defun sssavetime() (setq mycad (vlax-get-acad-object)) (setq perf (vla-get-preferences mycad)) (setq opensave (vla-get-opensave perf)) (vla-put-autosaveinterval opensave 1) ) (defun c:cc() (vl-load-com) (setvar "savetime" 1) ; (vl-load-all "chat.lsp") ;;; (if (not(setq name(vl-bb-ref 'chat_name)))(setq name (getstring "请输入您的大名"))) ;;; (if (not name)(setq name "匿名人士")) ;;; (vl-bb-set 'chat_name name) (if (or (= chat_name "")(not chat_name))(setq chat_name (getstring "请输入您的大名"))) (if (not chat_line)(setq chat_line 0)) ;;; (if (not(setq line(vl-bb-ref 'chat_line)))(setq line 0)) (setq f "\\\\192.168.0.2\\secondary_development\\lisp\\chat.txt") (getwords nil nil) ;(vl-bb-set 'chat_line (setq line (1- i))) (setq chat_line (1- i)) (initget "say quit") (setq chat (getstring "请输入要说的话(20汉字或40英文):")) (if (/= chat "") (progn (setq time (rtos (getvar "cdate") 2 6));(substr time 1 4) "年" (substr time 5 2) "月" (substr time 7 2) "日" (setq time (strcat (substr time 10 2) ":" (substr time 12 2) ":" (substr time 14 2))) (while (not (setq file(open f "a")))(command "delay" 300)) (write-line (strcat "\n" "【" chat_name "说:" (substr chat 1 40) "--" time "】") file) (close file) (print (strcat "我说:" chat "--" time)) ;(vl-bb-set 'chat_line (1+ line)) (setq chat_line(1+ chat_line)) ) ) (print) ) (if (not (equal (type dwg_reactor_run) 'vlr-dwg-reactor)) (progn (setq dwg_reactor_run(vlr-dwg-reactor nil '((:vlr-savecomplete . getwords)))) (command "saveas" "") ) ) (defun getwords(a b) (vlr-current-reaction-name) (while (not (setq file(open f "r")))(command "delay" 300)) (setq go t i 1) (while go (setq co(read-line file)) (if (< chat_line i)(print co)) (setq i (1+ i)) (if (not co)(setq go nil)) ) (close file) ) (print "使用命令cc.最好新开一个cad.如果看不到其他人说话请重新开图,连续说话请说话后连敲两次回车继续") (princ) 原创加密lisp真正的破解.原创lisp操作cad内置对话框.原创lisp直接调用win32 api.原创lisp开发小助手(代码自动生成器).原创vba语句->lisp语句解释器.原创lisp音乐播放器.原创lisp直接使用vba对话框. 好像不行啊 d nonsmall是个高手,什么都能完的转,在论坛上有很多精辟的文章,我一一都拜读过 所益很多。 我相信您是有办法的! 论坛上高手太多,出来说说呗! d 感谢这位朋友支持 但我现在还够不上高手 那只是表面现象吧 看看论坛那些隐居的前辈 那才叫高手呢 成为高手是我的目标 正在努力! 附赠一言 与君共勉:3人行,都是我师. 原创加密lisp真正的破解.原创lisp操作cad内置对话框.原创lisp直接调用win32 api.原创lisp开发小助手(代码自动生成器).原创vba语句->lisp语句解释器.原创lisp音乐播放器.原创lisp直接使用vba对话框. 把高手都给顶出来 |
| 所有的时间均为北京时间。 现在的时间是 01:12 PM. |