Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

task master questions

$
0
0

           if someone knows about running task master under autio it maybe
           able to help with this.
           the following code access the task master in windows
           its similar to Processlist in autoit, however i am trying to
           extract the status of a process (there were no commands in the autoit
           help file or thru the search of the forums)
           according to the info i have $objtask.status should give me the
           status, but it only shows the name and no status.
           any ideas? anyone?
$strcomputer = "."
; get task manager
$oTaskSchedule = Objget("winmgmts:\\" & $strComputer & "\root\cimv2")

 if IsObj($oTaskSchedule) Then
	 msgbox(0,"","attached")
 endif
 $coltasks = $oTaskSchedule.instancesof("win32_process")
 ;$coltasks = $oTaskSchedule.execquery("win32_process")

 for $objtask in $coltasks
	 if stringinstr($objtask.name, "mastercontrol") then
	 msgbox(0,"",$objtask.name & " " & $objtask.Status)
	 endif
  next



simular windows script
dim state
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
    ("Select * from Win32_Process")
For Each objProcess in colProcessList
colProperties = objprocess.name
state = objprocess.status
msgbox  colproperties & " " & state
Next




Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>