View Full Version : Activating and deactivating process(.exe) with screensaver?
AshleyQuick
07-24-2003, 03:43 AM
Is there a way to have an application that's running in the background deactivate and activate when the screensaver activates and deactivates respectively?
Any thoughts, recommendations, solutions?
Ash
P.S. Running Windows 2000
sage45
07-24-2003, 02:10 PM
Well progmattically you could be able to... What you would have to do is write some sort of a TSR that activates when your screensaver activates... Your TSR would then make an api call to kill/stop the process/service you are wishing to control... And then vice versa when the screen saver deactivates...
Problems with this can be as follows:
1. Some services require other services while running... If you are killing a service that has dependancies, you may stop/kill the dependant services without knowing it... When you go to start back up, your service may not load correctly as it's dependancies are stopped... By the same token some services are dependants of other services and cannot be stopped unless the service that they are a dependant of is stopped first... With this in mind, you would be able to reload the service that you stopped but the service(s) that it was a dependant of will not restart unless you start them and any other dependancies of theirs after you reload the service that you stopped...
2. Memory allocation/use could factor in as the service you stop/kill may not relenquish the memory and grab more memory when it is started/loaded again...
-sage-
AshleyQuick
07-24-2003, 03:17 PM
Cool. I'm assuming TSR is an acronym? :)
To be honest, I wouldn't know where to start with regards to your recommendation. The app I wish to activate and deactivate is an email checking app so I doubt it has dependancies of any sort.
If possible, could you elaborate on your proposed TSR method? :)
Ash
sage45
07-24-2003, 05:08 PM
TSR is an acronym for Terminate (and) Stay Resident... Basically it's a program that when it starts up, it loads a stub of itself into memory and then terminates itself... The stub then looks for an action (whether it be keyboard combination, app activation, etc...)... When the action string is satisfied (or true, in other words happens), then the stub reactivates the program and implements whatever the action calls for...
In this case it would be when the screen saver application/program activates or is called, kill this process/service...
A flowchart would look something like this:
1 Start
2 Is the screen saver loaded?
3 If yes goto 8
4 Is the service/process to be started killed?
5 If no goto 11
6 Call start service/process stub
7 Goto 11
8 Is the service/process to be killed started?
9 If no goto 11
10 Call kill service/process stub
11 End
-sage-
Mhtml
07-29-2003, 10:10 AM
[edit:] That's not a bad idea for a proggy, if you know C++ it's easy to do.. I might write it up for you if I get some time.. I could use it myself.
MotherNatrsSon
07-29-2003, 06:44 PM
Originally posted by AshleyQuick
Cool. I'm assuming TSR is an acronym? :)
To be honest, I wouldn't know where to start with regards to your recommendation. The app I wish to activate and deactivate is an email checking app so I doubt it has dependancies of any sort.
If possible, could you elaborate on your proposed TSR method? :)
Ash
What are you using for a mail program? It seems like it would be easier to schedule checking mail for a longer duration of time or just turn it off in your email preferences as needed.
MNS
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.