| View previous topic :: View next topic |
| Author |
Message |
Laughing Man
Joined: 29 Apr 2005 Posts: 84 Location: Maryland
|
Posted: Tue May 23, 2006 2:19 am Post subject: Display a Random Picture |
|
|
I've been browsing thru the search and the commands help on the main site and I've been wondering. What commands would I need to look at to display a random picture on the desktop every 5 minutes from a directory? _________________ "I thought what I'd do was I'd pretend I was one of those deaf-mutes" ~ Laughing Man - GITS:SAC |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue May 23, 2006 7:27 am Post subject: |
|
|
| Quote: | | I've been browsing thru the search and the commands help on the main site and I've been wondering | Hu? I guess to identify the Random command will be the toughest challenge! |
|
| Back to top |
|
 |
Zippo() Guest
|
Posted: Tue May 23, 2006 7:29 am Post subject: |
|
|
DllCall:
| Quote: | ; Example: Change the desktop wallpaper to the specified bitmap (.bmp) file.
DllCall("SystemParametersInfo", UInt, 0x14, UInt, 0, Str, A_WinDir . "\winnt.bmp", UInt, 2) |
... and Sleep or SetTimer
 |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
|
| Back to top |
|
 |
Laughing Man
Joined: 29 Apr 2005 Posts: 84 Location: Maryland
|
Posted: Tue May 23, 2006 4:03 pm Post subject: |
|
|
I'm not changing wallpaper though. I was just wondering if there was a way to display a picture on the desktop..kinda like how some widgets do. Though I don't think AHK has any built in way to draw a box to display the picture in? _________________ "I thought what I'd do was I'd pretend I was one of those deaf-mutes" ~ Laughing Man - GITS:SAC |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue May 23, 2006 4:32 pm Post subject: |
|
|
You have to be more precise on the concept of "display a picture on the desktop". In a window? As part of the wallpaper (Active Desktop?)?
If you just want a little window, you have to create a GUI.
Basically something like:
Gui Add, Picture, x20 y20, %imagePath%
Gui Show
I let you assign randomly imagePath, using the algorithm of the last link... _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
|