TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Adesu on February 08, 2007, 01:39:25 AM
-
Hi Alls,
How to know or check number program still running, as look in show desktop,look at attach file.
-
Hi
I mean to know name program still running with autolisp,then the result
(alert (strcat "\nIn your desktop still running program"
"\n"
"\nNo 1 = Outlook Express"
"\nNo 2 = Window Explorer"
"\nNo 3 = AutoCad 2005"))
Hi Alls,
How to know or check number program still running, as look in show desktop,look at attach file.
-
Hi
Try this
(defun appli(/ apps item lst meth1 meth2 WMI)
(setq WMI (vlax-create-object "WbemScripting.SWbemLocator")
meth1 (vlax-invoke WMI 'ConnectServer nil nil nil nil nil nil nil nil)
meth2 (vlax-invoke meth1 'ExecQuery "Select * from Win32_Process"))
(vlax-for item meth2
(setq lst (append lst (list (vlax-get item 'CommandLine))))
)
(vlax-release-object WMI)
(vlax-release-object meth1)
(vlax-release-object meth2)
(vl-remove nil lst)
)
@+
-
Hi Patrick,
Yes that right,as I looking for,thanks for your help.
Hi
Try this
(defun appli(/ apps item lst meth1 meth2 WMI)
(setq WMI (vlax-create-object "WbemScripting.SWbemLocator")
meth1 (vlax-invoke WMI 'ConnectServer nil nil nil nil nil nil nil nil)
meth2 (vlax-invoke meth1 'ExecQuery "Select * from Win32_Process"))
(vlax-for item meth2
(setq lst (append lst (list (vlax-get item 'CommandLine))))
)
(vlax-release-object WMI)
(vlax-release-object meth1)
(vlax-release-object meth2)
(vl-remove nil lst)
)
@+