baitang36
发表于 2020-12-3 12:08:57
好东西,留个脚印
caoliu023
发表于 2021-3-13 18:24:21
感谢分享
magicheno
发表于 2022-12-5 18:46:02
感谢海哥分享~
guankuiwu
发表于 2023-4-14 16:02:10
很好的功能!多谢分享!
slmmwan2008
发表于 2023-4-14 17:43:25
路过学习了
XIAO890325
发表于 2023-5-10 10:58:30
不知道是不是电脑的问题,昨天拖入黑屏,重启后启动组里一直没有拖入的文件。
xieling888
发表于 2023-10-19 10:15:14
必须给海哥一个赞
gwar
发表于 2023-10-23 15:58:43
路过学习了
qazxswk
发表于 2024-6-10 18:54:49
本帖最后由 qazxswk 于 2024-6-10 21:40 编辑
楼主的代码,我,加载不成功。我用下面的代码,加载成功
(vl-load-com)
(defun try-tuo-path(/ path str)
(princ "\n")
(setq path (getvar "lastprompt"));读取拖进黑框的路径
(if (wcmatch (strcase path) "*(LOAD \"*")
(setq str (vl-string-search "(LOAD \"" path)
path (substr path (+ str 8) (- (vl-string-search "\")" path) str 7))
)
)
(vl-string-translate "/" "\\" path)
)
;(gps->appload-addfile "d:\\12.lsp")
(defun gps->appload-addfile (AppName /$skey numstartup)
(if (= (type appname) 'STR)
(progn
(setq$skey (strcat "HKEY_CURRENT_USER\\"
(vlax-product-key)
"\\Profiles\\"
(getvar "CPROFILE")
"\\Dialogs\\Appload\\Startup")
)
(setq NumStartup (vl-registry-read $skey "NumStartup"))
(if NumStartup
(progn
(vl-registry-write $skey (strcat (itoa (+ 1 (atoi NumStartup))) "Startup") AppName)
(vl-registry-write $skey "NumStartup"(strcat (itoa (+ 1 (atoi NumStartup)))))
)
(progn
(vl-registry-write $skey "0Startup" AppName)
(vl-registry-write $skey "NumStartup" "1")
)
)
T
)
nil
)
)
(gps->appload-addfile (try-tuo-path))
sjl_fyl
发表于 2024-6-12 10:57:11
{:1_1:}谢谢