egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TCL request

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
eliteop
Voice


Joined: 12 Feb 2006
Posts: 2

PostPosted: Sun Feb 12, 2006 3:23 pm    Post subject: TCL request Reply with quote

Hi, can somebody help me?
I need a tcl that search every x minutes if a process is running and, if it is, tell it on a irc channel.
Something like: if i open notepad.exe i would like windrop to tell on irc "notepad.exe was just opened bla bla bla"
Thanks for your time
Very Happy Very Happy Very Happy
Back to top
View user's profile Send private message
deadite66
Halfop


Joined: 30 May 2005
Posts: 74
Location: Great Yarmouth, UK

PostPosted: Thu Feb 16, 2006 1:04 pm    Post subject: Reply with quote

it could be done with a small vbscript as your using windrop.

Code:
set wmi = getobject("winmgmts:")
wql = "select * from win32_process " _
    & " where name='notepad.exe'"
set results = wmi.execquery(wql)
WScript.Echo results.count


if you had a tcl script to run
c:/windows/system32/cscript //Nologo c:/myscript.vbs
and catch the result.
0 = no notepad open
1+ = how many open
_________________
<- tcl newb
Back to top
View user's profile Send private message
eliteop
Voice


Joined: 12 Feb 2006
Posts: 2

PostPosted: Wed Feb 22, 2006 7:33 am    Post subject: Reply with quote

and how to link it with the tcl for irc announcement?
Thanks
Back to top
View user's profile Send private message
deadite66
Halfop


Joined: 30 May 2005
Posts: 74
Location: Great Yarmouth, UK

PostPosted: Wed Feb 22, 2006 4:08 pm    Post subject: Reply with quote

try this, youl need to change the path to where the vbs script is and change the 2 #mychannel bits to your channel.

Code:
set apprunningcheck 0

bind time - * go:appcheck

proc go:appcheck {m h d mo y} {
global apprunningcheck
set appres [exec c:/windows/system32/cscript //Nologo c:/test.vbs]

if {$appres != $apprunningcheck & $appres == "0"} {
puthelp "PRIVMSG #mychannel :app exited" ; set apprunningcheck 0
   }
if {$appres != $apprunningcheck & $appres == "1"} {
puthelp "PRIVMSG #mychannel :app started" ; set apprunningcheck 1
   }
}

_________________
<- tcl newb
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber