02-02-2018, 04:17 AM
It is probably not bug or maybe intended to function like this (or overlooked something).
It is explained in below code.
Macro Macro5
It is explained in below code.
Macro Macro5
;; 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)