in reply to Trigger refresh after changing wallpaper when called from scheduled task
wallpaper.pl:perl wallpaper.pl bg.jpg
This script was part of a larger series of scripts that would pull down RSS data, pull the next 2 days of meetings from outlook, then overlay it at specific coordinates (with GD) on top of my background image... then I'd run the following where bg.jpg was the dynamically generated image.use Win32::API; use constant SPI_SETDESKWALLPAPER => 20; use constant SPIF_UPDATEANDSENDINI => 3; use constant NULL => 0; my $syspinf = Win32::API->new('user32','SystemParametersInfo', [I,I,P, +I], I) or die "Could not import function.\n"; $syspinf->Call(SPI_SETDESKWALLPAPER, 0, $ARGV[0], SPIF_UPDATEANDSENDIN +I);
Update: As for suppressing the cmd window... my script ran at 5am so I never saw it, but the .bat that the scripts are wrapped in begins with @echo off. Also, I thought there was an option in windows task scheduler to run as "Hidden".
|
|---|