| View previous topic :: View next topic |
| Author |
Message |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Sun Jul 05, 2009 10:55 pm Post subject: Wallpaper Randomizer |
|
|
Wallpaper Randomizer
Not sure if I ever posted the source for this script of mine.
In any case, a simple system tray Wallpaper Randomizer / Changer.
Source code and compiled executable are available here
First version of this script was created a while ago, and I am almost certain I posted it here some time ago, but I was unable to find it searching the forum. _________________ Sector-Seven - Freeware tools built with AutoHotkey
Last edited by Icarus on Sun Mar 27, 2011 11:28 am; edited 1 time in total |
|
| Back to top |
|
 |
Grateful user Guest
|
Posted: Fri Aug 21, 2009 6:36 am Post subject: a new option |
|
|
Hi! I'd like to suggest the addition of a shortcut key that would delete the current wallpaper. This way one could easily get rid of a picture that is no more wanted.
Congratulations on the script! |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Fri Aug 21, 2009 6:53 am Post subject: |
|
|
Any chance you can generate a multi-monitor image? I use (and pay for) DisplayFusion Pro to get both multi-moniter autoswitching with a different background on each screen. _________________
(Common Answers) |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Fri Aug 21, 2009 7:19 am Post subject: |
|
|
You mean, you point it to a folder of single monitor images and it stitches together several copies to make it a multi monitor wallpaper? _________________ Sector-Seven - Freeware tools built with AutoHotkey |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Fri Aug 21, 2009 7:50 am Post subject: |
|
|
@Icarus, exactly.
@HugoV. I've looked at teh format for bmp files, and it's relatively straightforward. Just need SKAN'S binary code and the ability to wrap your head around it (The hard part).
I was also thinking that my two screens don't have the same dpi, and it would be nice to correct for that as well (I have a lot of panos, that I want to also use) _________________
(Common Answers) |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Fri Aug 21, 2009 7:55 am Post subject: |
|
|
Well,
In fact the AHK script is only handling the hotkey assignment and randomization.
Everything else I took out to a command line converter.
So, if there is any ready made AHK library or external command line that does that, please let me know - I will merge it in.
Personally, when I used dual or triple monitors, I downloaded dual/triple monitor wallpapers and used them...  _________________ Sector-Seven - Freeware tools built with AutoHotkey |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 8255 Location: Maywood, IL
|
Posted: Fri Aug 21, 2009 8:18 am Post subject: |
|
|
Those rarely fit my particular screen arrangement. They are nice if you have 2+ of the same screens.
I'm also a photographer, so I use my own pictures as the source images.
Maybe I'll tinker with this this weekend. _________________
(Common Answers) |
|
| Back to top |
|
 |
rempallaan Guest
|
Posted: Thu Sep 10, 2009 12:27 am Post subject: aspect ratio |
|
|
Wallpaper should preserve photo aspect ratio.
Is it possible somehow? Or should I crop all the pictures before use. |
|
| Back to top |
|
 |
wrecklass
Joined: 19 Mar 2007 Posts: 29
|
Posted: Fri Sep 25, 2009 8:15 am Post subject: |
|
|
I came here to find some suggestions on how to change my wallpaper with AHK, and find this wonderful script already written. Thanks!
I made one tweak to the script to make it slightly faster. Especially for people with a very large number of wallpaper images on their system. The randomizer you used depended on two arrays, a temporary array for the file names, and a final array that you moved the names into for randomizing. Every time you took a name from the temporary array, you had to reset a portion of the file names. In the worst case this ends up taking N-squared/2 moves. Meaning with a thousand images you could make millions of swaps.
With my code we use a single array and randomize it in place, swapping names as we go through the list once. The final result should be just as random, but take much less time.
| Code: |
ScanFiles:
Loop %ImageDir%\*.*,0,1
{
SplitPath A_LoopFileLongPath,,, OutExtension
If( OutExtension <> "bmp" and OutExtension <> "png" and OutExtension <> "jpg" and OutExtension <> "gif" )
continue
Counter++
Image%Counter% := A_LoopFileLongPath
}
Random Seed, 0, 10000000
Random ,,%Seed%
Loop %Counter% {
i := A_Index
Random SelectedImageIndex , 1, %Counter%
if ( i <> SelectedImageIndex )
{
TmpImage := Image%i%
Image%i% := Image%SelectedImageIndex%
Image%SelectedImageIndex% := TmpImage
}
}
Menu, Tray, Tip, %NameString% %VersionString% - %Counter% Wallpapers Loaded
FirstRun := false
Return
|
|
|
| Back to top |
|
 |
TT1 Guest
|
Posted: Wed Jun 09, 2010 8:07 pm Post subject: Wallpaper won't change |
|
|
WR changes Wallpaper.bmp in the WR folder every n-minutes as expected, but doesn't display the new image on the desktop. Usually I'm just stuck with whatever image is chosen by WR at startup.
I'm using WinXP-SP1, WR folder is in Program Files, the wallpaper folder is set as \windows\web\wallpaper\rotate, and WR is set to run at startup.
What's keeping the new image from displaying? Shouldn't the desktop image change as soon as Wallpaper.bmp changes? |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Wed Jun 09, 2010 8:50 pm Post subject: |
|
|
@TT1 - The line that changes the wallpaper is
| Code: |
DllCall( "SystemParametersInfo", UInt, 0x14, UInt, 0, Str, FinalPaper, UInt, 1 )
|
I do not know why it doesnt work for you
@wrecklass - is your solution still maintaining a fixed order, that can be navigated back and forth? _________________ Sector-Seven - Freeware tools built with AutoHotkey |
|
| Back to top |
|
 |
Azygos Guest
|
Posted: Sun Mar 27, 2011 10:06 am Post subject: Lower Time interval |
|
|
| Minimum time interval to change image is 2 minutes which is too long. I would like to change wallpapers at custom intervals of say 25 seconds. Is it possible? |
|
| Back to top |
|
 |
Icarus
Joined: 24 Nov 2005 Posts: 851
|
Posted: Sun Mar 27, 2011 10:15 am Post subject: |
|
|
Open the INI file and add "0.4," at the beginning of the Intervals line.
Restart Wallpaper Randomizer.
There is a small bug in the menu with fractions, but it works.
I will fix the bug and release a new version.
[EDIT] Fixed and available for download on the site. Now comes with 0.5 minutes refresh interval by default, and you can change to any fraction in the INI file. _________________ Sector-Seven - Freeware tools built with AutoHotkey |
|
| Back to top |
|
 |
|