Jump to content

awurthmann

Members
  • Posts

    3
  • Joined

  • Last visited

About awurthmann

  • Birthday 12/18/1977

Profile Information

  • Location
    Silicon Valley

awurthmann's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I did not know that, thank you. Now if only I could figure out a cleaner way to do this compare. Hrmmmm....
  2. I'm struggling with the following which is a sort of a "if these processes are running kill them". Note the code below does work however it is a tad messy and not as dynamic as I would like. The goal here is this. Find processes that are LIKE those in the $clist array and close them (aka kill them). For example if notepad.exe is running kill it, if notepad++.exe is running kill it; cal.exe, calc.exe; cmd.exe, etc... Local $clist[3] = ["notep", "cal", "cmd"] Local $plist = ProcessList() For $i = 1 To $plist[0][0] $psname=$plist[$i][0] $result = StringInStr($psname, $clist[2]) if $result <> 0 Then ProcessClose($psname) $result = StringInStr($psname, $clist[1]) if $result <> 0 Then ProcessClose($psname) $result = StringInStr($psname, $clist[0]) if $result <> 0 Then ProcessClose($psname) Next PS If you really think I should use the array include please, if you can, recite which functions. I need the code to be as small as possible so I'll need to pull out those specific array functions.
×
×
  • Create New...