The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




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:
Copy      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)


Messages In This Thread
ShutDownProcess, if process is passed as ID and flag 4 (terminate matching) - by r0n - 02-02-2018, 04:17 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)