使用下面的函数可以输出所有加载的自定义函数的搜狗词库,包括加载的ARX定义函数 !然后按猫老师的方法将词库加到搜狗输入法里!
- ;;输出所有加载的自定义函数搜狗词库,包括加载的ARX定义函数 By Gu_xl
- (defun c:sgck (/ PARSE LST FN F S1 N)
- (defun Parse (str del / pos lst)
- (if (/= "" str)
- (progn
- (while (setq pos (vl-string-search del str))
- (setq lst (cons (substr str 1 pos) lst)
- str (substr str (+ pos 1 (strlen del)))
- )
- )
- (if (= " " Del)
- (vl-remove "" (reverse (cons str lst)))
- (reverse (cons str lst))
- )
- )
- )
- )
- (setq lst
- (vl-sort
- (vl-remove-if
- (function
- (lambda (name /)
- (or
- (= (substr name 1 2) "c:")
- (< (strlen name) 3)
- (not
- (or
- (eq 'SUBR (type (eval (read name))))
- (eq 'USUBR (type (eval (read name))))
- (eq 'EXRXSUBR (type (eval (read name))))
- )
- )
- )
- )
- )
- (mapcar
- '(lambda (x) (strcase x t))
- (atoms-family 1)
- )
- )
- '<
- )
- )
- (setq fn (getfiled "" "myphrases.ini" "ini" 1))
- (if fn
- (progn
- (setq f (open fn "w"))
- (foreach s lst
- (setq s1 (VL-LIST->STRING (vl-remove-if '(lambda (x) (member x '(42 43 45 58 60 61 62 95))) (VL-STRING->LIST s))))
- (if (VL-STRING-SEARCH "-" s)
- (progn
- (WRITE-LINE
- (strcat
- (apply 'strcat (mapcar '(lambda (x) (substr x 1 1)) (Parse s "-")))
- ",3=" s) f)
- )
- )
-
- (setq n (strlen s1))
-
- (while (> n 0)
- (WRITE-LINE (strcat (substr s1 1 n) ",3=" s) f)
- (setq n (1- n))
- )
- )
- (close f)
- (startapp "notepad.exe" fn)
- )
- )
- (princ)
- )
|