[Wnd-commit] wnd/wnd/tools __init__.py,1.2,1.3
Status: Alpha
Brought to you by:
jurner
|
From: jürgen u. <cer...@us...> - 2005-07-23 19:34:03
|
Update of /cvsroot/wnd/wnd/wnd/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32072 Modified Files: __init__.py Log Message: bit of this and a bit of that Index: __init__.py =================================================================== RCS file: /cvsroot/wnd/wnd/wnd/tools/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** __init__.py 1 May 2005 15:22:31 -0000 1.2 --- __init__.py 23 Jul 2005 19:33:55 -0000 1.3 *************** *** 1 **** --- 1,19 ---- + + """*************************************************************************** + Create a new GUID and sets it as string to the clipboard + ***************************************************************************""" + def ClipGUID(): + from ctypes import oledll, byref + from ctypes.com import GUID + from wnd.api import clipboard + + guid= GUID() + oledll.ole32.CoCreateGuid(byref(guid)) + text= clipboard.cf.text(str(guid)) + do= clipboard.DataObject(text) + clipboard.SetDataObject(do) + clipboard.Flush() + do.Close() + text.value= None + |