mIRC Homepage
Hi, i was wondering if it's possible to make a script that when a user types a certain word, for example !showrun then mirc checks to see if a number of pre-determined apps are running, and display if they are or not ?

Say a user called squid joins my channel, and types !showrun, then my bot process the event and checks to see if mIRC, winamp, roger wilco and a few other apps are running and then display in the channel or even perhaps a PM window thje following

mIRC Running
Winamp Not Running
Roger Wilco Running
Outlook Express Running

Now user squid can see that outlook is running, and i might get their email they sent me, if they knew my addy, or they now know that roger wilco is running, and they can connect to my roger wilco base station, if they knew my password n stuff to get access.

I have read the mirc help file on on ACTIVE/APPACTIVE but this info doesnt seem to tell me what i want to do.

Any help or pointers in the right direction would be great, perhaps i would make an app running dialog, and add the apps i want to a variable or something, and get the script to process them or whatever.

Thanks
ShadowDemon
mIRC V6.03
I searched through the whole helpfile a few weeks ago for such an option, and couldn't find it, so I don't think there is a way to do this atm (apart with a DLL, but I haven't been able to find one that does it).
$active just replys the current active mIRC window, and $appactive just says if mIRC is an active application, which could be useful for highlights in a separate stuck window.

I don't know how to check if this or that application is active or not, the fact is that I have never wondered that. I shall check if it is possible.
Using COM objects.. check out www.mircscripts.org for more about that..
Ok, thanks guys, i`ll keep searching, i`m on mircscripts.org, searching for com sockets or whatever, i`ll try searching the web too.

If anybody else has any more info, please feel free to share it, lol cool

ShadowDemon
Searching at ms.org wouldn't give many results anyway.

Here's a tricky way to check whether a program is running
Code:
isopen {
  var %a = app $+ $ticks, %p = $$1-, %r = $false
  .comopen %a WScript.Shell
  if $comerr { return %r }
  if $com(%a,AppActivate,3,bstr,%p) && $com(%a).result {
    %r = $true
    showmirc -s
  }
  .comclose %a
  return %r
}

//echo $isopen(program title)
Title should be the exact (how sad :tongue:) title of the program. For example, $isopen(mIRC v $+ $version Help) tells you whether the help file is open...

You can give process ID instead of program title, but I have no idea how to get it...
Thanks Online, i`ll have a play with that code, see if i can come up with sumthing


ShadowDemon
© mIRC Discussion Forums