Welcome Guest.   Make a donation to an author on the site April 17, 2014, 07:20:41 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: Batch command screensaver  (Read 5463 times)
Hirudin
Charter Member
***
Posts: 542


View Profile Give some DonationCredits to this forum member
« on: April 03, 2006, 12:43:58 AM »

Has anyone heard of a screensaver that is capible of launching a bunch of commands when it starts? I bet there's something like this out there, if anyone knows of any, please let me know. (Also, I'm going to start searching the net after I post this...)

I think a screensaver (that could be selected in "Display Properties > Screen Saver") that I could use to run a few programs every time the screensaver is activated would be very useful.

The commands/programs I would enable by default would be:
1. Run CCleaner (to clear cache, recycle bin, history, etc.)
2. Lock KeePass (I want my passwords available while I'm at the computer, not while I'm not)
3. Start a "pretty" screen saver (so that it's like a normal screensaver) or maybe start a random screensaver

A couple other ideas:
- Mute the system audio (like IdleMute)
- Kill/pause various programs (like Winamp Killer)
- Maybe turn on some kind of e-mail monitor
- Maybe send IM clients into "away" mode (though I assume most do this by default anyway)

Seems like some of the commands could be as simple as running a shortcut, others might require simulated keystrokes/mouse movements.

Other possible uses:
- Run defrag program
- Start virus scan
- Disable internet activity
« Last Edit: April 03, 2006, 12:55:55 AM by Hirudin » Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: April 03, 2006, 05:18:57 AM »

I think the best way to do that isn't really with a screensaver. How about a script that lets you execute multiple commands after some time of idle time? It'd have the same effect, but would also allow you to use a different screensaver, or not use one at all.
Logged

Hirudin
Charter Member
***
Posts: 542


View Profile Give some DonationCredits to this forum member
« Reply #2 on: April 03, 2006, 05:27:58 AM »

That would be OK, but it seems a little silly to have a program running just to check if the system has been idle when windows already does that. Also, this way, the screensaver batch program would start the actual "pretty" screensaver. If I saw the pretty screensaver running, I would know the screensaver batch program ran successfully.

I made myself a lil' batch program that I can launch using Maomi. Here it is:
[copy or print]
D:\ProgNew\CCleaner\ccleaner.exe /auto
D:\ProgNew\NirCmd\nircmd.exe screensaver -d
start D:\ProgNew\KeePass\KeePass.exe D:\ProgNew\KeePass\Database.kdb
Note: it uses a little command line program called "nircmd" to start the screensaver.
Logged
brotherS
Master of Good Ideas
Honorary Member
**
Posts: 2,105


To make a difference, be different.

View Profile Give some DonationCredits to this forum member
« Reply #3 on: April 03, 2006, 05:56:33 AM »

That would be OK, but it seems a little silly to have a program running just to check if the system has been idle when windows already does that.
Not at all! cheesy

AutoHotkey is checking LOTS of things here all the time, it's very helpful.

You could use something like "If A_TimeIdlePhysical > 9000000" to do what you asked for, check http://www.autohotkey.com/docs/Tutorial.htm and feel free to ask if you want to try it.
Logged

Thank you.
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: April 03, 2006, 06:04:26 AM »

I can fully understand your point of view, Hirudin.
But there's one important thing here. Screensaver files are actually executable files with a different extension.
That means, you can create your script, rename the executable to .scr, and set it as your screensaver.
This way, no more other things waiting.
Logged

Hirudin
Charter Member
***
Posts: 542


View Profile Give some DonationCredits to this forum member
« Reply #5 on: April 03, 2006, 07:41:17 AM »

Yeah, that's a good idea!
brotherS, I'll see if I can get an AHK script put together that does the couple things I want (doesn't seem like it should be too hard). Then do like you say, jgpaiva, and rename the exe to an scr.
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: April 03, 2006, 07:59:34 AM »

Yeah, that's a good idea!
brotherS, I'll see if I can get an AHK script put together that does the couple things I want (doesn't seem like it should be too hard). Then do like you say, jgpaiva, and rename the exe to an scr.
smiley Good to know!
If you'd like some help, feel free to send me an email, or come by the Irc channel! (http://www.donationcoder....rum/index.php?action=chat)
Logged

Hirudin
Charter Member
***
Posts: 542


View Profile Give some DonationCredits to this forum member
« Reply #7 on: April 03, 2006, 09:28:16 AM »

Welp, I've been messing with this for a while now. I can create the exe easy enough with AHK, and renaming it to ahk.scr is fine, manually running the scr file works fine, but once I select it in the display properties it activates(?). I mean, I select it in the list and it starts... I never hit "OK" or "Apply" or "Preview." It has a mind of it's own.
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: April 03, 2006, 10:51:33 AM »

I tried to do it, and i got the same behaviour.
But, nevertheless, it still acts correctlly, it is ran after the screensaver time.
I don't know why that happens, it might be windows confirming that it does exist.
So, my solution for that is:
See what is the ahk_id of that window, and put a ifwinactive clause in the beginning of the script, so that in case that window is active, it simply returns Wink

(to find out the ahkid of that window, check the autoitwinspy, which should be present in the folder of instalation of ahk)
Does that solve it?
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.036s | Server load: 0.31 ]