明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4063|回复: 20

各位版主,帮过我的好朋友,工作需要要个CAD屏保加密码lsp,在线等中.....

  [复制链接]
发表于 2008-6-10 19:18 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2018-12-8 22:01 | 显示全部楼层
yxp 发表于 2008-6-10 22:42
本帖最后由 作者 于 2008-6-10 22:54:40 编辑  ;;默认密码为“yxp”,输入限制3次,(取自yxpxa@163.com, ...

你好,请问一下密码保存在哪里了?改了密码后新密码登陆不了,必须原密码,换个CAD就可以,不知道怎么清除。谢谢
发表于 2017-12-12 09:53 | 显示全部楼层
yxp 发表于 2008-6-10 22:42
本帖最后由 作者 于 2008-6-10 22:54:40 编辑  ;;默认密码为“yxp”,输入限制3次,(取自yxpxa@163.com, ...

好像改了不对,一直是原始密码
发表于 2019-12-14 07:49 | 显示全部楼层
这么一设置密码,领导和同事万一用你这台机器,岂不是很麻烦?
发表于 2008-6-10 21:20 | 显示全部楼层

楼主为什么不直接使用 windos 的屏保功能

我觉得实现有困难-->怎样使 AutoCAD 在无人操作时延迟 N 秒而激活“屏保”程序...

 楼主| 发表于 2008-6-10 21:35 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2008-6-10 22:42 | 显示全部楼层
本帖最后由 作者 于 2008-6-10 22:54:40 编辑

;;默认密码为“yxp”,输入限制3次,(取自yxpxa@163.com,请自行修改)。离开时顺手输入 asdf  即可

(defun c:asdf( / wj prow pdat a b)
(setvar "cmdecho" 0)
  (if (setq wj (findfile "psword.dcl")) T (cydcl))
  (if (setq wj (findfile "psword.dcl"))(progn (setq pdat (open wj "r")
               prow (read-line pdat) ) (close pdat)))
  (setq a (substr prow 11 3) b (atoi (substr prow 19 1)))            
  (pword a b)
)

(defun pword(ps m / abc n)
(setq n 0) (if (> (strlen ps) 8) (setq ps (substr ps 1 8)))
(while (if (/= (setq abc (getpass m n)) ps) (if (= abc "tcc") (tc_ca) T)
          (progn (princ " 验证成功!") Nil))
(setq n(1+ n))(if (> n m)(tc_ca)))
)

(defun getpass (ina nn / dcl_id pass )
  (setq dcl_id (load_dialog "psword.dcl"))
  (if (new_dialog "psword" dcl_id)
    (progn (mode_tile "star" 2)
      (if (= ina nn) (progn (set_tile "txt" " 警告!最后1次输入密码!")
          (mode_tile "ga_tc" 1))
      (if (>= nn 1)(set_tile "txt" (strcat " 错误,已输入 " (itoa nn) "次,剩余" (itoa (- ina nn)) "次" ))
      (set_tile "txt" (strcat "输错限制≤ " (itoa ina) "次,已登陆 " (itoa nn) "次"))))
      (action_tile "star" "(setq pass $value)")
      (action_tile "ga_dd" "(done_dialog 1)")
      (action_tile "ga_tc" "(tc_ka)")
      (start_dialog) (unload_dialog dcl_id)
   ))pass
)
(defun tc_ca()(command "quit" "y" ""))
(defun tc_ka()(done_dialog 1)(setq pass "tcc"))
(defun cydcl()
(setq f_dcl (open "psword.dcl" "w"))
(write-line "//程序开发yxpxa@163.com" f_dcl)
(write-line "psword: dialog {label = \"登陆验证\"; spacer_1; :row{spacer_0; " f_dcl)
(write-line ":edit_box{label =\"请输入密码:\";key = \"star\";edit_width = 8;password_char = \"*\";edit_limit = 8;}spacer_0;}spacer_1;" f_dcl)
(write-line ":row{:text{key=\"txt\";value=\"\";}}" f_dcl)
(write-line ":row{:button {label = \"确定(&Y)\";alignment = centered;key = \"ga_dd\";fixed_width = true;is_default = true;} " f_dcl)
(write-line ":button{label=\"退出(&Q)\";key = \"ga_tc\";alignment = centered;fixed_width = true;is_cancel = true;}}" f_dcl)
(write-line ":spacer{fixed_height =true;}}" f_dcl)
(close f_dcl))
(princ)

发表于 2008-6-10 23:50 | 显示全部楼层
没有吧,只要win键+L不行么?
 楼主| 发表于 2008-6-11 13:58 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2008-6-11 18:13 | 显示全部楼层
本帖最后由 作者 于 2008-6-11 23:24:40 编辑

liminnet发表于2008-6-11 13:58:00yxp大哥,我要改密码在那修改一下呀,还有你的程序还需要DCL文件的吗?谢谢

很好修改啊。仔细看,密码取自yxpxa@163.com,修改3次,你修改成你的163邮箱就行了啊,当然不要超过5个字。

这个lisp不需要DCL文件。 将代码 (defun s::startup ()  "命令" ) 加入acad.lsp可以在CAD启动时运行。

如果还不行,输入下面代码

命令: shell
操作系统命令: (del (findfile "psword.dcl"))

 楼主| 发表于 2008-6-11 19:10 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2008-6-11 20:36 | 显示全部楼层
DCL的界面比较简单,你自己可以修改的华丽一些。
发表于 2008-6-11 22:11 | 显示全部楼层
yxp真的很厉害,谢谢了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-3-28 20:43 , Processed in 0.311558 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表