https://github.com/sangafabrice/shuffler
A simple component that helps shuffle a list of related objects like a playlist.
https://github.com/sangafabrice/shuffler
desktop-background lockscreen-background logon-picture personalization photos-app-tile vbscript windows-script-component
Last synced: 3 months ago
JSON representation
A simple component that helps shuffle a list of related objects like a playlist.
- Host: GitHub
- URL: https://github.com/sangafabrice/shuffler
- Owner: sangafabrice
- Created: 2022-03-14T22:44:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-26T21:50:04.000Z (about 3 years ago)
- Last Synced: 2025-01-15T23:42:49.811Z (5 months ago)
- Topics: desktop-background, lockscreen-background, logon-picture, personalization, photos-app-tile, vbscript, windows-script-component
- Language: VBScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# **The shuffler component**
##### Author: Fabrice Sanga
The component is mainly built around the `RandomSelect()` function that selects an element from a list of objects randomly, as its name suggests. The selection proceeds similarly to a media player in shuffle mode. It avoids selecting an item that it had already picked til every item in the list is marked. Then the process restarts.
It works on any type of list, but for illustration purposes, it is restricted to Photos App Tiles, Desktop and Lockscreen Backgrounds, and the default Logon Picture.
An example of use:
```vbscript
With CreateObject("CustomUI.Shuffler")
.WorkDir = "\Path\to\Example" '(1)
.Shuffle "DesktopBG" '(2)
.Shuffle "LockScreenBG"
.Shuffle "LogonPicture"
.Shuffle "PhotosTile"
.RefreshStartMenu '(3)
End With
```
**(1)** `WorkDir` is the root directory**(2)** `Shuffle` is a sub that shuffles the items of the `DesktopBG` subfolder of the root
**(3)** `RefreshStartMenu` is a feature sub that makes the change available immediately and is needed for `LogonPicture` and `PhotosTile`
The filesystem:
```
Example
|--DesktopBG
|--LockScreenBG
|--LogonPicture
|--PhotosTile
```
`DesktopBG`, `LockScreenBG`, `PhotosTile` contain image objects.
`PhotosTile` contain subfolders of square images of `32px`, `40px`, `48px`, `192px` and `448px` size. They are different sized-images of the same picture. The figure shows an example of those images.
