Sign in to follow this  
Followers 0
cmnetworx

If else loop?

6 posts in this topic

I am trying to write a simple little program that waits for yahoo messenger to load, then kills it and remains running.. So if the user tries to load yahoo again, it will kill it again and so on..

This is what I have so far, the problem with it is, well its not done right, and I know there is a better way of performing this..

CODE
If ProcessExists ("YahooMessenger.exe") Then

Processclose ("YahooMessenger.exe")

EndIf

Sleep(2000);

Run("c:\killyahoo.exe");

anybody have any ideas?

also, Is there a way for it to watch for a few different services also?

Share this post


Link to post
Share on other sites



wait, I just realized this would work..

Anybody have any comments on if this is a good way to approach this or not?

also how do I hide the icon, I used

#No TrayIcon but it still shows up..

CODE
While 1

If ProcessExists ("YahooMessenger.exe") Then

Processclose ("YahooMessenger.exe")

EndIf

Sleep(15000)

WEnd

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

awesome, Thanks for your help..

Share this post


Link to post
Share on other sites

one more suggestion would be to compile it to .exe and have it run as scheduled task on startup (as restarting the computer will close the script). one more precaution would be to give it a more ambiguous name so that it won't be detected with a ctrl+alt+delete.

cheers :P

Share this post


Link to post
Share on other sites

You shouldn´t help him creating his little "virus" !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0