| View previous topic :: View next topic |
| Author |
Message |
newoob Guest
|
Posted: Fri Mar 19, 2010 7:10 am Post subject: Random Desktop Background |
|
|
Hi everyone,
I need help in making my script, i need some codes to make my script select a random file inside a folder every time the script is executed, i already had my script for changing the background, i just need to select a random file. Any help would be appreciated. Thanks.
P.S.
I don't want to rename the filenames of my wallpapers. |
|
| Back to top |
|
 |
MasterFocus
Joined: 08 Apr 2009 Posts: 3035 Location: Rio de Janeiro - RJ - Brasil
|
Posted: Fri Mar 19, 2010 7:28 am Post subject: |
|
|
1) Loop the files
2) Inside the Loop, store the number of files (use A_Index)
3) Use the Random command to get a number between 1 and the number of files
4) Loop the files once again
5) This time, if A_Index is the same as your randomized number, change the background _________________ "Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried."
Antonio França
My stuff: Google Profile |
|
| Back to top |
|
 |
newoob Guest
|
Posted: Fri Mar 19, 2010 8:13 am Post subject: |
|
|
| Many thanks. |
|
| Back to top |
|
 |
|