| View previous topic :: View next topic |
| Author |
Message |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Thu Apr 22, 2004 11:44 am Post subject: Do idle time tasks with custom-made ScreenSavers! |
|
|
A lot many ppl don't know that screensaver (*.scr) files are actually regular executables. try renaming a .scr file to .exe or vice versa, they'll run the same.
now utilising this we can make a compiled script to do some tasks like cleaning temp files etc. and rename it to something.scr to make windows see it as a screensaver. (i use one that cleans temp folder, and scans entire drive for *.tmp , ~*.* files and cleans them, then runs defrag or AV tools)
here are few things worth noting:
-when a screensaver is dbl-clicked, its run by windows with a '/S' cmd line parameter.
-when you select a screensaver in display properties window, its run by windows with a '/P' cmd line parameter.
-when the ScreenSaver Settings button is pushed on Display Properties window, then windows runs the screensaver with '/C:3346456' parameter. (actually the number can be anything)
these are utilised to detect if the screensaver is actually run when system is idle or is a preview run or is dbl-clicked.
you can have the following as the starting point for your script.
| Code: | ifequal, 1, /P, goto, preview
IfInString, 1, /c:, goto, config
MouseGetPos, X, Y
ifnotequal, 1, /S, goto, select
SetTimer, check, 500
; stuff to do when system is idle, goes here
exitapp
select:
;stuff to do when screensaver is run manually
exitapp
preview:
;splashtext saying 'Rajat is cool' here ;)
exitapp
config:
;screensaver settings here
exitapp
check:
MouseGetPos, CX, CY
ifnotequal, CX, %X%, exitapp
ifnotequal, CY, %Y%, exitapp
return
|
_________________

Last edited by Rajat on Fri Apr 23, 2004 2:31 am; edited 2 times in total |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Apr 22, 2004 1:38 pm Post subject: |
|
|
Wow, that is great info. I did not know you could just rename an EXE to be SCR and use it as a screensaver.
You didn't mention in your post, but I guess it's obvious that you must first compile your script into an EXE for this to work.
Thanks for the tip; I wish I had known about it years ago. |
|
| Back to top |
|
 |
JonTheNiceGuy
Joined: 22 Apr 2004 Posts: 18 Location: Manchester, UK
|
Posted: Thu Apr 22, 2004 11:14 pm Post subject: In the same vein... how about |
|
|
Why not make splashtext be something like HTML, so you can include an image and tables? This would mean you could write a full screensaver in AHK?
Perhaps something like the (now apparently defunct) electricsheep.org?
JonTheNiceGuy |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Apr 23, 2004 12:32 am Post subject: |
|
|
| Nice idea, I'll put it on the list. |
|
| Back to top |
|
 |
JonTheNiceGuy
Joined: 22 Apr 2004 Posts: 18 Location: Manchester, UK
|
Posted: Fri Apr 23, 2004 12:46 am Post subject: Just out of interest... |
|
|
| How long is the list, and how does one go about helping? |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Fri Apr 23, 2004 1:50 am Post subject: |
|
|
er, Chris I've mentioned the compiling part... maybe i should've made that bold. see :
| Quote: | | now utilising this we can make a compiled script to do some tasks like cleaning temp files etc. |
uhh...sorry for being late! _________________
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Fri Apr 23, 2004 2:23 am Post subject: |
|
|
| Quote: | | Chris I've mentioned the compiling part | Oops, so you did. Sorry.
| Quote: | | How long is the list, and how does one go about helping? | The list is a prioiritized spreadsheet and has over 500 pending items (admittedly many of them are minor or out-of-date). Help is always welcome, and can take many forms, e.g. suggesting new features, making add-ons for editors such as Crimson Editor and Scite, improving the documentation, finding open source code that might be adaptable to new features, or even contributing your own design and code. For this last one, you don't even have to be a programmer: well thought-out designs can be just as valuable as code (even more so since they tend to be more understandable). |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Fri Apr 23, 2004 2:28 am Post subject: |
|
|
| Quote: | | Why not make splashtext be something like HTML, so you can include an image and tables? |
this can already be done... instead of posting it here i'm posting it as a separate thread so that more ppl can use it. http://www.autohotkey.com/forum/viewtopic.php?p=537 _________________
 |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Fri Apr 23, 2004 2:30 am Post subject: |
|
|
added a note regarding settings in main post. _________________
 |
|
| Back to top |
|
 |
JonTheNiceGuy
Joined: 22 Apr 2004 Posts: 18 Location: Manchester, UK
|
Posted: Mon Apr 26, 2004 9:25 am Post subject: The ToDo List |
|
|
| Quote: | | The list is a prioiritized spreadsheet and has over 500 pending items |
Where would I find that spreadsheet? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Apr 26, 2004 11:55 am Post subject: |
|
|
| It's not published since it's very informally written. If you have an interest, after I make the next release today or tomorrow I'll try to put at least the highest priority items online or in the forum. |
|
| Back to top |
|
 |
|