Jump to content

IamNoob

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by IamNoob

  1. Hmm, I may have to play with this, I like the idea. Here is where I am atm, It seems to be working so far. Simply lets you chose which window you want set as safe, gets the PID and closes the rest. MsgBox(0, "", "Please click the MyProg Window that you DO NOT want to be closed.", "5") WinWaitActive("MyProg") $SafePID = WinGetProcess("[active]") Msgbox(0, "", "I have recorded " & $SafePID & " as a safe process") $list = ProcessList("myprog.exe") for $i = 1 to $list[0][0] If $list[$i][1] <> $SafePID then ProcessClose($list[$i][1]) EndIf next Anybody see potential problems with this? Better Ideas?
  2. Hello! I am working on a script and am Stumped with this, have searched for a little while with no luck I have a 2 instances of 1 program running, Same exact Process name (myprog.exe), I am trying to end only ONE of the process' and I would like to be able to control WHICH ONE closes. I have tried ProcessClose() but Obviously no real way of controlling that as it just kills the highest PID of the process. I cannot use RUN to start this program as it is must be started through a different program. If possible, I would like to be able to have the First process opened left alone, Only the second one closed. Thanks in advanced for the help! Back to trying to figure this out So I seemed to get something with ProcessList(), Here is my Code... $list = ProcessList("notepad.exe") $Safe = 2456 for $i = 1 to $list[0][0] If $list[$i][1] <> $Safe then ProcessClose($list[$i][1]) EndIf next Is there a better way to do it?
×
×
  • Create New...