本帖最后由 自贡黄明儒 于 2016-11-7 14:16 编辑
网友panliang9@sohu.com(2259433769)发给了我Everything,试了一下,速度相当快 我用了sendkeys 自动拾取文本,但存在一个问题,如果中文或者带有特殊符号就不行,各位高手可有更好办法?
- (defun C:TZ (/ TXT)
- (if (setq txt (cdr (assoc 1 (entget (car (nentsel "\n 拾取搜索文本"))))))
- (if (= (getenv "PROCESSOR_ARCHITECTURE") "x86") ;32位
- (Everything32 TXT)
- (Everything64 TXT)
- )
- )
- (princ)
- )
- (defun Everything64 (TXT)
- (startapp "Everything-1.4.1.773b.x64-Setup.exe")
- (sendkeys txt)
- )
- (defun Everything32 (TXT)
- (startapp "Everything1.3.4.686.x86.x64.exe")
- (sendkeys txt)
- )
- (defun sendkeys (keys)
- (or *WSH* (setq *WSH* (vlax-get-or-create-object "wscript.shell")))
- (vlax-invoke-method *WSH* 'sendkeys keys)
- (princ)
- )
|