我有一个李Mac的弹出代码副本,我在我的办公室尝试,所有发生的是一个快速闪烁的鼠标点击,但没有弹出窗口。我在家用机器上复制了相同的代码,效果很好。今天晚些时候,我会再次检查一下办公室里的副本,但有没有人对限制它在特定机器上运行的因素有什么建议。这个地方的IT人员有一些政策,但他们给了我的机器几乎完全的访问权限,因为我在做开发。
(defun c:test (/ x) (vl-load-com)(LM:Popup "Title Text" "This is a test message." (+ 2 48 4096)));;-------------------------=={ Popup }==----------------------;;;; ;;;; Displays a pop-up message box prompting the user. ;;;;------------------------------------------------------------;;;; Author: Lee Mac, Copyright © 2011 - [url="http://www.lee-mac.com"]www.lee-mac.com[/url] ;;;;------------------------------------------------------------;;;; Arguments: ;;;; title - Text to be displayed in the pop-up title bar ;;;; msg - Text content of the pop-up message box ;;;; flags - Integer indicating icon & button appearance ;;;;------------------------------------------------------------;;;; Returns: Integer indicating the button pressed to exit ;;;;------------------------------------------------------------;;(defun LM:Popup ( title msg flags / wsh res ) (vl-catch-all-apply (function (lambda nil (setq wsh (vlax-create-object "WScript.Shell")) (setq res (vlax-invoke-method wsh 'popup msg 0 title flags)) ) ) ) (if wsh (vlax-release-object wsh)) res)