Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Simple script to change win32 wallpaper

by bbfu (Curate)
on Jul 12, 2002 at 01:54 UTC ( #181191=sourcecode: print w/replies, xml ) Need Help??
Category: Win32 Stuff
Author/Contact Info Cory Johns (a.k.a. Bunny Boy Fu)

Simple script to change the MS Windows wallpaper from the command-line. Really just a wrapper around the SetSystemParametersInfo() API call, via Win32::API.

I'm using it as part of another small app. I'm writing (for my GF) to pick random papers. :)


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";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: sourcecode [id://181191]
[Yaerox]: I feel like i'm not seeing the forest for the trees. Can someone give me a hint how to research converting all kinds of files into ansi? If origin file is utf8 convert to ansi, is origin file is ansi then skip file.
[1nickt]: Yaerox probably best to whip up an SSCCE demonstrating the failure in what you have now and post to SoPW as a question.
[Corion]: Yaerox: That's a somewhat hard problem. Encode solves the conversion part, but for guessing what encoding a file is in, that's the hard part

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-03-28 13:13 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (331 votes). Check out past polls.