mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 295
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 295
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


Never argue with an idiot...they'll drag you down to their level and beat you up with experience
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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).

Joined: Dec 2002
Posts: 21
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 21
$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.


DNWT.net Coalition of irc networks
Joined: Dec 2002
Posts: 1
B
Mostly harmless
Offline
Mostly harmless
B
Joined: Dec 2002
Posts: 1
Using COM objects.. check out www.mircscripts.org for more about that..

Joined: Dec 2002
Posts: 295
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 295
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


Never argue with an idiot...they'll drag you down to their level and beat you up with experience
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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...

Joined: Dec 2002
Posts: 295
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 295
Thanks Online, i`ll have a play with that code, see if i can come up with sumthing


ShadowDemon


Never argue with an idiot...they'll drag you down to their level and beat you up with experience

Link Copied to Clipboard