<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Tasklist command in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386091#M1658</link>
    <description>&lt;P&gt;Is this not part of your response to another post about switch to another program window ?&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/switch-focus-to-another-program/td-p/13371274" target="_blank"&gt;Switch focus to another program - Autodesk Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Mar 2025 22:14:14 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2025-03-23T22:14:14Z</dc:date>
    <item>
      <title>Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13385903#M1654</link>
      <description>&lt;P&gt;The "tasklist" command can be run from a command window to list the currently running processes. When used like this:&amp;nbsp;&amp;nbsp; tasklist | find "blender"&amp;nbsp;&amp;nbsp; it returns the name blender.exe if blender is currently active (either minimized or maximized) and also sets an errorcode that can be used to determine if the blender program is currently running.&lt;/P&gt;&lt;P&gt;Can the tasklist command be run from autolisp?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2025 17:39:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13385903#M1654</guid>
      <dc:creator>autoid374ceb4990</dc:creator>
      <dc:date>2025-03-23T17:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386005#M1655</link>
      <description>&lt;P&gt;This lisp may not meet the exact result you want but give it a try.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(load "TaskFind")
(TaskFind "Blender.exe") &lt;/LI-CODE&gt;&lt;P&gt;Note: Task&amp;nbsp;"Blender.exe" must match in case as listed in the Tasklist.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; TaskFind check for name of process that's running
; if found notepad opens created text file in current drawing folder
; Argument:
; img-nam = case sensitive process name to look for 
; Example:
; (taskfind "NVDisplay.Container.exe")
; (taskfind "Registry")
; OP:
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/td-p/13385903
(defun TaskFind (img-nam / fil fr exe txt)
  (vl-load-com)
  (setq fil (strcat (getvar 'dwgprefix) "MyTaskList.txt") ; save file to current dwg location
        exe (strcat "Tasklist.exe | find \"" img-nam "\" &amp;gt; " fil)
        txt (strcat "Notepad.exe " fil)
  )
  (if (findfile fil) ; chk if file exists
    (vl-file-delete fil) ; delete file
  )
  (command "_Sh" exe) ; shell tasklist find process
  (alert (strcat "Completed Find Process on:\n" img-nam)) ; forces pause to allow for text file to be created
  (if (setq fr (open fil "r")) ; chk if txt file created
   (progn
    (if (read-line fr) ; chk if file is empty 
     (startapp txt) ; open with notepad
     (progn
      (vl-file-delete fil) ; delete file
      (alert (strcat "Process " img-nam " Not Found."))   
     )
    )
    (close fr)
   ) 
   (alert "Failed to create Text File.")
  ) ; if
  (princ)  
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 23 Mar 2025 20:02:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386005#M1655</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-23T20:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386037#M1656</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I am using R14, so visual lisp not available.&lt;/P&gt;&lt;P&gt;I can call the SHELL command and then run a batch file that contains:&lt;/P&gt;&lt;P&gt;tasklist | find "blender"&lt;BR /&gt;if errorlevel 0 SET FOUND="YES"&lt;BR /&gt;if errorlevel 1 SET FOUND="NO"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then check the FOUND variable to see if blender is active.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2025 20:58:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386037#M1656</guid>
      <dc:creator>autoid374ceb4990</dc:creator>
      <dc:date>2025-03-23T20:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386066#M1657</link>
      <description>&lt;P&gt;Wow, are you running R14 on Window 2000?&lt;/P&gt;&lt;P&gt;Also just out of curiosity, does this revised version run inside R14:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; TaskFindr14 version check for name of process that's running
; if found notepad opens created text file in current drawing folder
; Argument:
; img-nam = case sensitive process name to look for 
; Example:
; (taskfind "NVDisplay.Container.exe")
; (taskfind "Registry")
; OP:
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/td-p/13385903
(defun TaskFind (img-nam / fil fr exe txt)
;  (vl-load-com)
  (setq fil (strcat (getvar 'dwgprefix) "MyTaskList.txt") ; save file to current dwg location
        exe (strcat "Tasklist.exe | find \"" img-nam "\" &amp;gt; " fil)
        txt (strcat "Notepad.exe " fil)
  )
  (if (findfile fil) ; chk if file exists
;    (vl-file-delete fil) ; delete file
    (close (open fil "w")) ; empty file
  )
  
  (command "_Sh" exe) ; shell tasklist find process
  (alert (strcat "Completed Find Process on:\n" img-nam)) ; forces pause to allow for text file to be created
  (if (setq fr (open fil "r")) ; chk if txt file created
   (progn
    (if (read-line fr) ; chk if file is empty 
;     (startapp txt) ; open with notepad
      (command "_Sh" txt)  
     (progn
;    (vl-file-delete fil) ; delete file
      (close (open fil "w")) ; empty file
      (alert (strcat "Process " img-nam " Not Found."))   
     )
    )
    (close fr)
   ) 
   (alert "Failed to create Text File.")
  ) ; if
  (princ)  
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2025 21:27:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386066#M1657</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-23T21:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386091#M1658</link>
      <description>&lt;P&gt;Is this not part of your response to another post about switch to another program window ?&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/switch-focus-to-another-program/td-p/13371274" target="_blank"&gt;Switch focus to another program - Autodesk Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2025 22:14:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386091#M1658</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2025-03-23T22:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386101#M1659</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264" target="_self"&gt;&lt;SPAN class=""&gt;paullimapa&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Yes, I am running R14 on 64 bit Windows 7 and Windows 10.&lt;/P&gt;&lt;P&gt;Your file loads in R14 but what do you enter to run it?&lt;/P&gt;&lt;P&gt;Also no vl_ commands in my old LISP so it will not execute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2025 22:29:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386101#M1659</guid>
      <dc:creator>autoid374ceb4990</dc:creator>
      <dc:date>2025-03-23T22:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386108#M1660</link>
      <description>&lt;P&gt;Which is why I purposedly revised it by commenting out the vl functions.&lt;/P&gt;&lt;P&gt;In my first reply I posted how you can run the function:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_1-1742769389012.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1480752i08902A71C899EF2B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="paullimapa_1-1742769389012.png" alt="paullimapa_1-1742769389012.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If the &lt;STRONG&gt;TaskFind&lt;/STRONG&gt; function finds &lt;STRONG&gt;Blender.exe&lt;/STRONG&gt; as one of the running processes in the &lt;STRONG&gt;Tasklist, &lt;/STRONG&gt;the contents will be saved into the current drawing folder a text file called &lt;STRONG&gt;MyTaskList.txt&lt;/STRONG&gt; and then the file will be opened for review using &lt;STRONG&gt;Notepad&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2025 22:40:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13386108#M1660</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-23T22:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13387120#M1661</link>
      <description>&lt;P&gt;My LISP is a bit rusty, but I changed the (getvar 'dwgprefix) to (getvar "dwgprefix") in the line below and it works.&lt;/P&gt;&lt;PRE&gt; (setq fil (strcat (getvar 'dwgprefix) "MyTaskList.txt") ; save file to current dwg location&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 13:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13387120#M1661</guid>
      <dc:creator>autoid374ceb4990</dc:creator>
      <dc:date>2025-03-24T13:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Tasklist command</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13387149#M1662</link>
      <description>&lt;P&gt;Good. So back in r14 lisp days it doesn’t take the apostrophe method to retrieve system variable info. but required the good old surrounded by quotes method.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 13:29:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/m-p/13387149#M1662</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2025-03-24T13:29:40Z</dc:date>
    </item>
  </channel>
</rss>

