FW: Win32all documentation?
Mark Hammond
MarkH at ActiveState.com
Mon Dec 10 21:29:48 EST 2001
David Brady wrote:
> Three things, again:
> 1 - Finding the start menu folder so the script can
> put itself there to continue running after each
> reboot.
win32com.shell.shell.GetSpecialFolderEx() - look up SHGetSpecialFolderEx
in MSDN.
> 2 - Launching an app and then monitoring it, waiting
> for it to die.
If you want to start the application, simply use
win32process.CreateProcess(), then wait on the returned process handle.
If an arbitary process, look at killprocname.py for an example of
getting a process ID.
> 3 - Walking through the start menu shortcuts and
> renaming them.
SHGetSpecialFolderPath, then simply using os.rename.
> P.S. Bonus question. How can I change the desktop
> background image in Win32 from Python? Thanks again!
Not sure - hitting the registry directly I imagine. Possible also
requires broadcasting a WM_SETTINGCHANGED message to all top-level windows.
> P.P.S. No disrespect is intended towards Hammond &
> Robinson, their book, or their documentation as
> presented on the ActiveState site.
None taken. I would *love* to fix this, but have about 500 things
higher on the todo list. All contributions gratefully accepted :)
Mark.
More information about the Python-list
mailing list