Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ShutDownProcess, if process is passed as ID and flag 4 (terminate matching)
#1
It is probably not bug or maybe intended to function like this (or overlooked something).
It is explained in below code.


Macro Macro5
Code:
Select All      Help
;; When multiple notepad windows are open.
;; Trying to close multiple instances in one go only works
;; in situation 2.

;; SITUATION 1
;; If multiple notepad windows open, it only closes one
;; FLAG 4 - terminate all processes matching program name
int x=ProcessNameToId("notepad.exe")
ShutDownProcess(x 1|4)

;; SITUATION 2
;; This correctly closes multiple instances of notepad
ShutDownProcess("notepad" 4)

;; (also tested with wordpad)
Reply
#2
Intended.
A process id belongs to a single process, not to all notepad processes.
Reply
#3
AH!
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)