$pid() and $process() identifiers to check whether a program is running or not,
mostly to be used by bots, saying a service is up or down.
example:
$pid(400) returns $true or $false wether a process with id 400 exists
$process(notepad.exe) returns $true or $false wether a process with name notepad.exe exists.
How is this related to *Services* being up or down?
PS: It can be scripted in $COM
PS: It can be scripted in $COM
Yes it can be scripted, but that goes for the most of the features requested in here.
This sounds like a potentially useful feature. Although, I would have it work more like this:
$pid(<number>)
$pid(400)
- Returns $null if PID 400 does not exist
- Returns the name of PID 400 if it exists, ie notepad.exe
$pid(<program>,n)
$pid(notepad.exe,1)
- Returns $null if a program called notepad.exe isn't running
- Returns the PID of the nth program called notepad.exe, or if n=0 returns total number of programs called notepad.exe
$pid(<number/name>[,n]).<param>
$pid(400).handles
- Returns $null if the PID/program doesn't exist
- Returns the specified param data
* <param> could potentially be any column that is displayed in the windows task manager (view > select columns). ie handles, threads, username, memory, description, etc.
-genius_at_work
I guarantee that right after an mIRC release with $pid in it, someone will suggest to manipulate those process ids; the ability to kill a process, change its priority, etc.
So you are suggesting a /pid command then?
-genius_at_work
with such a command it would become even easier to trojans to do their work abusing mIRC for it's own good. giving them the ability to kill virusscanner processes etc for instance.
I would highly suggest against such a feature ( the /pid one ).
I'm also not really sure what the $pid identifier would add personally but maybe someone can explain some usecases which show more then one person actually having use for it.
Agreed.
As for the $pid identifier, myggan wrote one on
mircscripts.org.
No more dangerous than the $encode/$decode identifiers. You could just put a lock on them the same as Run/dll/decode/com
I'm not sure why you think it would be a security risk, the capability to end processes via script already exists via /run, /dll and $com.
Also, if your virus scanner is letting anyone kill it then your virus scanner sucks.
with such a command it would become even easier to trojans to do their work abusing mIRC for it's own good. giving them the ability to kill virusscanner processes etc for instance.
I would highly suggest against such a feature ( the /pid one ).
I'm also not really sure what the $pid identifier would add personally but maybe someone can explain some usecases which show more then one person actually having use for it.
I would not like to see a /pid command for above reasons,
if the $pid() feature could be realised it would be awesome!
The question is, how many people actually need process control when scripting? It doesn't seem to me like a common scripting task. Common tasks make sense to add to mIRC.. less common ones are perfectly okay when left as one-line snippets people can import when needed.
I'm not a big fan of clogging up the global space. Adding an extra identifier would break any script already using some custom $pid identifier since identifiers can't be overloaded like /commands can. I don't get what the advantage of putting this in mIRC is? Unlike the poster above, I disagree that all (most) feature suggestions here can be scripted.. Most of the valid feature suggestions I see are ones that extend the language to allow scripters to do things they could not; I'd rather see more of those.
I agree.
Snippet that allow you to get info on process (or even kill them) already exists.
There shouldnt be any question about "needing" a function.
It would be nice if this function is available though.
edit: [read: available --> more simple to access]
Scripting is usefull, but not neccesary.