[python-win32] settin wallpaper
DogWalker
forestiero at qwest.net
Sun Aug 3 22:38:58 EDT 2003
I have no knowledge of the function, never used it. The following is the
MSDN documentation on the last parameter, which may be helpful. But you
should proceed the string that names the file with an 'r':
r'C:\pics\closeup.jpg' or double the backslashes, you are most certainly not
getting what you think. You should also check the result:
if not windll.user32....:
raise WinError()
HTH
----------------------------------------------------------------------------
----
fWinIni
[in] If a system parameter is being set, specifies whether the user profile
is to be updated, and if so, whether the WM_SETTINGCHANGE message is to be
broadcast to all top-level windows to notify them of the change.
This parameter can be zero if you don't want to update the user profile or
broadcast the WM_SETTINGCHANGE message, or it can be one or more of the
following values. Value Action
SPIF_UPDATEINIFILE Writes the new system-wide parameter setting to the
user profile.
SPIF_SENDCHANGE Broadcasts the WM_SETTINGCHANGE message after updating
the user profile.
SPIF_SENDWININICHANGE Same as SPIF_SENDCHANGE.
----------------------------------------------------------------------------
----
----- Original Message -----
From: "ryan" <ambiod at sbcglobal.net>
To: "DogWalker" <forestiero at qwest.net>
Sent: Sunday, August 03, 2003 7:30 PM
Subject: Re: [python-win32] settin wallpaper
> is there somethin extra i have to do to make it take affect after i call
the
> function:
>
> windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0,
> 'C:\pics\closeup.jpg', 0)
>
> because nothin happened after i entered it
>
> ----- Original Message -----
> From: "DogWalker" <forestiero at qwest.net>
> To: <Python-win32 at python.org>
> Sent: Sunday, August 03, 2003 6:56 PM
> Subject: Re: [python-win32] settin wallpaper
>
>
> > As the exception says: You must define 'SPI_SETDESKWALLPAPER' .
> >
> > from win32con import SPI_SETDESKWALLPAPER
> >
> > -- or--
> >
> > from win32con import *
> >
> > -- or --
> >
> > SPI_SETDESKWALLPAPER = 0x14
> >
> > -- or --
> >
> > Use 0x14 or 20 in place of SPI_SETDESKWALLPAPER in the function call
> >
> > HTH
> >
> > ----- Original Message -----
> > From: ryan
> > To: DogWalker
> > Sent: Sunday, August 03, 2003 6:00 PM
> > Subject: Re: [python-win32] settin wallpaper
> >
> >
> > thats what i was doing, sorry for the typeo..
> >
> > >>> from ctypes import *
> > >>> windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0,
> > 'C:\pics\closeu
> > p.jpg', 0)
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > NameError: name 'SPI_SETDESKWALLPAPER' is not defined
> > ----- Original Message -----
> > From: DogWalker
> > To: Python-win32 at python.org
> > Sent: Sunday, August 03, 2003 5:56 PM
> > Subject: Re: [python-win32] settin wallpaper
> >
> >
> > Try this:
> >
> > windll.user32.SystemParametersInfoA(.....
> >
> > You were calling the wrong function. If you just mistyped it in your
> email,
> > repost with the pertinent code, including the value you used for
> > SPI_SETDESKWALLPAPER and pertinent import statements.
> >
> > HTH
> > ----- Original Message -----
> > From: ryan
> > To: python-win32 at python.org
> > Sent: Sunday, August 03, 2003 4:05 PM
> > Subject: [python-win32] settin wallpaper
> >
> >
> > the win32 python extentions don't seem to have "SysParametersInfo()" and
i
> > need it to set the wallpaper in windows.
> >
> > cyptes has a "SysParametersInfoA()" function but wont let me use the
> > SPI_SETDESKWALLPAPER attribute.
> >
> > anyone have any ideas how i can set the windows wallpaper from a python
> > program?
> >
> > -ryan
> >
> >
> >
> > _______________________________________________
> > Python-win32 mailing list
> > Python-win32 at python.org
> > http://mail.python.org/mailman/listinfo/python-win32
> >
> >
> >
> >
> > _______________________________________________
> > Python-win32 mailing list
> > Python-win32 at python.org
> > http://mail.python.org/mailman/listinfo/python-win32
> >
> >
> > _______________________________________________
> > Python-win32 mailing list
> > Python-win32 at python.org
> > http://mail.python.org/mailman/listinfo/python-win32
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20030803/0ea1b701/attachment.htm
More information about the Python-win32
mailing list