669423907 发表于 2012-7-24 17:26
请教一下:按搜索后,能否自动关闭对话框?
因为按搜索以后的操作就不在CAD上了。不知可否?
;;;把下面的这段代码加个(DONE_DIALOG)即可
- (defun GoogleIt (Scopes / Index Keywords scope url browser scopeName)
- (setq Index (read (get_tile "Scopes")))
- (setq keywords (get_tile "Keywords"))
- (setq scope (nth Index scopes))
- (setq url (vl-string-subst (notrailspace (noleadspace keywords)) "{searchTerms}" (cdr scope)))
- (setq Browser (GetDefaultBrowser))
- (setq scopeName (car scope))
- (cond
- ( (= scopeName "百度")
- (startapp browser (strcat "http://www.baidu.com/s?wd=" keywords)) ;很无奈!不然的话,对中文关键字搜索会有问题哦?
- )
- (t
- (startapp browser url)
- )
- )
- (DONE_DIALOG)
- )
-
|