> > Only strange, that return the desktop.. and set the desktop to.. needs
> > a try loop; I've not doubt about the quality of your work.
> Did the copy you downloaded have a try block in it somewhere?
no. there wasn't a try loop in any of these blocks.
> Are you saying you needed to add a try block to it to make it work
> somehow??
yes. But, thanks anyway for the gift. I'll make a gift to you too:
tell application "Finder"
set pic_files to {"jpg", "tif", "tiff", "png"}
set HD to name of startup disk
activate me
set collapsed of every window to true
tell application "System Events" to set visible of every application
process whose frontmost is true and visible is true to false
set fr_ to choose folder with prompt "Choose a main folder where
contains subfolders with images" default location (path to pictures
folder)
repeat
set a to count of items in container fr_
set this_item to item a of container fr_
if class of this_item is folder then
set rand_f to (random number of a) as integer
if rand_f is 0 then set rand_f to 1
set rand_f to rand_f as number
set this_r to item rand_f of container fr_
set this_r to this_r as text
repeat
set i to count every item in alias this_r
set rand_nr to (random number of i) as integer
if rand_nr is 0 then set rand_nr to 1
set rand_nr to rand_nr as number
set the_desk_f to item rand_nr of alias this_r
if name extension of the_desk_f is in pic_files then
set the desktop picture to the_desk_f
display dialog "Fix image ?" buttons {"Yes", "No"}
set but_y to the button returned of the result
if but_y is "Yes" then
exit repeat
end if
end if
end repeat
exit repeat
end if
end repeat
end tell
>> Stay informed about: Image margins