AutoHotkey Community

It is currently May 27th, 2012, 8:45 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Display a Random Picture
PostPosted: May 23rd, 2006, 2:19 am 
Offline

Joined: April 29th, 2005, 12:14 am
Posts: 84
Location: Maryland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2006, 7:27 am 
Quote:
I've been browsing thru the search and the commands help on the main site and I've been wondering
Hu? :shock: I guess to identify the Random command will be the toughest challenge!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2006, 7:29 am 
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

:)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2006, 9:32 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Why a double post?

Change wallpaper from script!
http://www.autohotkey.com/forum/viewtop ... ndom+image
Automatic Wallpaper Changer [AHK Script, requires IrfanView]
http://www.autohotkey.com/forum/viewtop ... ndom+image
Random screensaver
http://www.autohotkey.com/forum/viewtop ... ght=random

The last link is for the clever algorithm of choosing a random file out of a list without having to know in advance the number of files, nor having to read the whole list of files.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2006, 4:03 pm 
Offline

Joined: April 29th, 2005, 12:14 am
Posts: 84
Location: Maryland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2006, 4:32 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], XstatyK and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group