Login / Register
▼
Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
VoiceBot
WallpaperFusion
Home
▼
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
▼
Features
Features
Incredible Desktop Wallpaper
Monitor Configuration
Monitor Splitting
Powerful Functions
Triggers
Multi-Monitor Taskbars
Useful Windows 10 Tweaks
Useful Windows 8 Tweaks
Windows Lock Screen
Multi-Monitor Screen Savers
Monitor Fading
Window Snapping
Window Management
Mouse Management
Alt+Tab Handler
Window Position Profiles
Desktop Icon Profiles
Remote Control
Available in dozens of Languages
Easy Administration
Free vs Pro
Purchase
Screenshots
Languages
▼
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Scripted Functions (Macros)
Display
Fusion
by Binary Fortress Software
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Select a Random Wallpaper Profile with Filter
Return to DisplayFusion Scripted Functions (Macros)
Description
This script lets you specify some text to search for and selects a random Wallpaper Profile from the profiles that match that text.
Language
C# (.Net)
Minimum Version
9.4.3+
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
Jan 28, 2019
Date Last Modified
Jan 28, 2019
Scripted Function (Macro) Code
Copy
Select All
using System; using System.Collections.Generic; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { // Set the text to look for when building the list of Wallpaper Profiles to pick from string wallpaperSeason = "Winter"; // Build the list of Wallpaper Profiles that match the text List<string> wallpaperProfilePool = new List<string>(); foreach (string profile in BFS.DisplayFusion.GetWallpaperProfiles()) { if (profile.ToLower().Contains(wallpaperSeason.ToLower())) { wallpaperProfilePool.Add(profile); } } // Select a random profile from the list Random randomNumber = new Random(); string selectedRandomWallpaperProfile = wallpaperProfilePool[randomNumber.Next(0,wallpaperProfilePool.Count - 1)]; BFS.DisplayFusion.LoadWallpaperProfile(selectedRandomWallpaperProfile); } }
Copyright © 2007-2021 Binary Fortress Software
•
News
•
Discussions
•
FAQ
•
Support
•
Privacy
•
ToS
•
Get DisplayFusion Merch