Re: [python-win32] PyWin32 API

2017-10-19 Thread Tim Roberts
hes.  It will not accept forward slashes. from win32com.client import Dispatch shell = Dispatch("Shell.Application") y = shell.NameSpace(r"c:\tmp\pvt") print( y.Title ) for z in y.Items():     print( z.Path )     print( z.ExtendedProperty("Author

Re: [python-win32] PyWin32 API

2017-10-20 Thread Tim Roberts
want to change it unless you're sure it's a numeric constant and not, say, a pointer. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Python - connexion to serial port

2018-01-15 Thread Tim Roberts
IT keeps retrying until it's able to open the port, with a short delay between each attempt.  That way, the web server would always see success. The delay with the two solutions should be about the same; you're always going to have to wait for request A to finish before request B starts, but t

Re: [python-win32] Python - connexion to serial port

2018-01-12 Thread Tim Roberts
  The open/send/close model should work just fine. > -   Even if I find a way to open a thread with the serial port or > to keep it open with a loop, is it possible to send it orders ? Why wouldn't it? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] Recycle bin deletion date - mixing shell and winshell?

2018-01-11 Thread Tim Roberts
it, but if you look in the source code (which should always be your fallback for True Answers), you'll see that the ShellRecycledItem object has a real_filename() method that returns the information you want. The documentation is on github, if you want to submit a fix. -- Tim Roberts, t...@probo

Re: [python-win32] Pywin32 outlook email organizer

2018-01-31 Thread Tim Roberts
_address], > msg.as_string()). > Remember that Python is just a gateway into Outlook.  You can't do anything that Outlook wouldn't ordinarily do, and Outlook doesn't allow you to override the sender address.  You can set up multiple identities in Outlook, and then use Python to choose which i

Re: [python-win32] Using DirectShow API to access webcam

2018-08-16 Thread Tim Roberts
the audio.  You can just render the graph at that point. Alternatively, it looks like this package might be more applicable:     http://videocapture.sourceforge.net/ -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME

Re: [python-win32] LNK4197 error building c++ extension

2018-08-17 Thread Tim Roberts
te" in the ".def" file that lists the exported functions.  That's the first export specification.  You are also using __declspec(dllexport) in the function definition, and that's the second export specification. When you use __declspec(dllexport), you don't need the ".def" file

Re: [python-win32] LNK4197 error building c++ extension

2018-08-21 Thread Tim Roberts
is just an alias for the .def file. You need to mention the entry point EITHER (1) in a .def file, (2) in a /EXPORT, or (3) with a __declspec(dll export). One and one only. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ pyth

Re: [python-win32] Using DirectShow API to access webcam

2018-08-17 Thread Tim Roberts
thin a COM interface, their parameters, and their types.  It is intended to be  a language-independent way to define the functions within an interface. Looks like you're on your way. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.

Re: [python-win32] Reg. taking folder ownership

2018-08-27 Thread Tim Roberts
I'm going to avoid answering your exact question, but I would point out that Admin1 can change the ACL to give Admin2 the right to change the ACL.  In the file permission dialog, that's the "Change permissions" right.  In code, it's the "WRITE_DAC" file permission. -- Tim Robe

Re: [python-win32] Using WMI to listen to window creation and destruction

2018-07-18 Thread Tim Roberts
s/library/windows/desktop/cc144067 Remember, you can open a new folder without opening a new window -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Dispatch multi instance of the some com server

2018-07-17 Thread Tim Roberts
he live instance instead of > creating a new one. > Why?  I know you weren't asking for a design review, but it seems like a serious design flaw if you cannot handle multiple requests with a single instance.  That's a big part of COM -- an easy way to have a server that handles multiple clients. -

Re: [python-win32] Using WMI to listen to window creation and destruction

2018-07-18 Thread Tim Roberts
g is a separate window.  You'd get thousands of hits.  Are you really looking to monitor the creation of new top-level windows, which means the creation of new processes?  Because WMI DOES provide information about processes. If you do want to find out about windows, you'd need to use a Windows hook.

Re: [python-win32] Issue on getting activesheet on win 8 and Win 8+ OS systems

2018-07-24 Thread Tim Roberts
> Here I attached the screenshot of my error and piece of code which i > execute. > Are you actually opening a file?  Does the file open correctly?  Is it possible the workbook isn't open yet by the time you query it?  Are you running as the logged in user, or is this a service?

Re: [python-win32] Writing event handlers

2018-08-30 Thread Tim Roberts
but after that, all you should need to do is create an instance of your object, and pass it to whatever method your server uses to register the callback object. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptogra

Re: [python-win32] pywintypes.error: (5, 'RegSetValueEx', 'Access denied')

2018-03-15 Thread Tim Roberts
vileges. Technically speaking, it would be possible to register that source once in an elevated process and then use it without re-registering, but the current code does not support that. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Service stucks in Starting state

2018-04-10 Thread Tim Roberts
the state? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Future of PyWin32

2018-03-28 Thread Tim Roberts
e I would suggest > investing time into making the code compatible to Python3 asap. PyWin32 has been Python 3 compatible for many years.  To what are you referring? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mail

Re: [python-win32] More info about Microsoft Foundation Classes (MFC)

2018-03-29 Thread Tim Roberts
rsion that Python itself uses.  The same applies to MFC.  When an application or DLL links with MFC, it links to a specific version (e.g., mfc90.dll).  You can't substitute another. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-

Re: [python-win32] More info about Microsoft Foundation Classes (MFC)

2018-03-29 Thread Tim Roberts
t depend on Python, but on which version you built PyWin32. > However, this is only my current feeling. Right.  The core interpreter has no UI, and does not link to MFC. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-

Re: [python-win32] com_error creating VSS shadow copy (running as windows service)

2018-03-26 Thread Tim Roberts
ring could not be parsed in the current context. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Get errors 7000 and 7009

2018-03-26 Thread Tim Roberts
  Are you saying your service sometimes takes more than 30 seconds to launch?  If so, then you need to figure out why it takes so long.  If you are waiting for some event during your startup, perhaps you can reorganize your code so that you defer some of your initialization until after you enter the

Re: [python-win32] win32com + Brother Printer + Django

2018-03-25 Thread Tim Roberts
ected? Microsoft does not recommend printing from Windows services, in parts because of security considerations. Your service is running as a special Windows user (unless you've configured it), and that special user needs permissions to use the printer. — Tim Roberts,

Re: [python-win32] Excel / Word: setting properties

2018-02-28 Thread Tim Roberts
> The Document object should have a BuiltinDocumentProperties collection and a CustomDocumentProperties collection that you can query and manipulate.  You'll have to discover whether the properties you need to tweak are builtin or not. -- Tim Roberts, t...@probo.com Providenza & Boekelhei

Re: [python-win32] Excel / Word: setting properties

2018-03-02 Thread Tim Roberts
DocumetProperties method returns a DocumentProperties object. I believe that is a collection of DocumentProperty objects. So you should be able to say something like for prop in workbook.BuiltinDocumentProperties: — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _

Re: [python-win32] Wait for process to be started

2018-04-25 Thread Tim Roberts
y > second whether the process is active, but I want to be more efficient > and wait on the system event that is generated when a process is > started. Is that possible? Is this a process you are starting?  If YOU start the process, you get a handle that you can wait on -- Tim Roberts

Re: [python-win32] How to get actual FILETIME from PyTime

2018-06-28 Thread Tim Roberts
compilers of the early 1990s did not have a 64-bit type. Another way to do the unpacking is     struct.unpack('II',struct.pack('Q',i)) and the reverse:     struct.unpack('Q','strict.pack('II',low,high)[0] -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice")

2018-10-10 Thread Tim Roberts
ere a fix for this? Basically, wanted to know the reason for this > exception and the fix for this. COM exceptions are listed in hex. -2147221164 is 0x80040154, which is E_CLASSNOTREG. Have you installed SAPI 5.1? It's not built-in. — Tim Rober

Re: [python-win32] COM: control menu bar

2018-09-30 Thread Tim Roberts
clicked/pressed? That's not a class ID, it's a window ID. You can trigger that by sending the exact same message you saw here. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org htt

Re: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice")

2018-10-10 Thread Tim Roberts
or 64-bit apps? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice")

2018-10-10 Thread Tim Roberts
ll. Are you making registry changes on the fly? — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] why do I get error 1804 from win32print.SetJob?

2018-11-16 Thread Tim Roberts
API itself (ERROR_INVALID_DATATYPE).  As an experiment, have you tried coding up the exact same sequence as a C program to see if you get the same error? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@py

Re: [python-win32] Bug - Passing byref an array to a com method interpreted as a single element

2019-01-21 Thread Tim Roberts
umed. Win32client is quite correct in interpreting your definition as it does.  The fact that it works in VBA is an lucky accident.  If you want this to work reliably, you need to change the interface. -- Tim Roberts, t...@probo.com Providenz

Re: [python-win32] Bug - Passing byref an array to a com method interpreted as a single element

2019-01-21 Thread Tim Roberts
Tim Roberts wrote: rv...@free.fr wrote: It seems win32client do not interpret correctly the type expected by the COM server, here float() instead of pointer on an array of float. That statement is not accurate.  The fault is not in win32client. The root of the problem

Re: [python-win32] python win32com.client; reverse engineer sql server timestamp

2018-12-17 Thread Tim Roberts
e. The "3F" in there is the "?" character, which means "this character does not exist in the current 8-bit code page". It's not a Unicode string, don't try to treat it like one. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___

Re: [python-win32] How to obtain printer HANDLE as int in Python

2018-12-10 Thread Tim Roberts
) hDC.CreatePrinterDC (win32print.GetDefaultPrinter ()) If that is getting you what you need, then     win32print.OpenPrinter( win32print.GetDefaultPrinter() ) will get you the handle to that printer. -- Tim Roberts, t...@probo.com Providenza & Boekelheide,

Re: [python-win32] win32api.FindFiles hangs (was COM registration hangs up: 32 bit Python 3.7 on 64 bit Win 7)

2018-12-05 Thread Tim Roberts
.  Of course, I'm not sure what the next step would be, whether that worked or failed. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] win32api.FindFiles hangs

2018-12-06 Thread Tim Roberts
virus scanner and see if that alters things. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] why do I get error 1804 from win32print.SetJob?

2018-11-20 Thread Tim Roberts
a very nasty bug.  I'll file a bug report. In the meantime, I'll fix up my little C++ example to do the job for you. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-w

Re: [python-win32] why do I get error 1804 from win32print.SetJob?

2018-11-20 Thread Tim Roberts
hich works), or for win32print.cpp (which maybe doesn't). I built mine for non-Unicode. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mailing list python-win32@py

Re: [python-win32] why do I get error 1804 from win32print.SetJob?

2018-11-19 Thread Tim Roberts
recognized that 1804 is a Windows errors code, not a Python error.  Let me see if I can write up a C++ test that would be useful for you. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signa

Re: [python-win32] Making a COM server that accepts COM objects

2019-01-09 Thread Tim Roberts
  What happens when you register yourself as in-process? Note that the registry has to look different for this. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 m

Re: [python-win32] python win32com.client; reverse engineer sql server timestamp

2018-12-18 Thread Tim Roberts
em. Don't you have the code that originally created those fields? It is absolutely pointless for us to guess how this was done. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] ExportAsFixedFormat's ValueError

2019-03-27 Thread Tim Roberts
essage?  Did it tell you which argument was wrong?  What, exactly, is "output"? It would be helpful to see the code leading up to this as well. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature

Re: [python-win32] hook the left mouse button down event on any window

2019-03-29 Thread Tim Roberts
exits, the window object is deleted, and the hook is released. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mailing list python-win32@python.org https://mail

Re: [python-win32] hook the left mouse button down event on any window

2019-03-30 Thread Tim Roberts
okMessage call and when the function returns. The right answer is to use a package like pyHook to install a global hook. This is exactly what it is for. https://stackoverflow.com/questions/165495/detecting-mouse-clicks-in-windows-using-python <https://stackoverflow.com/questions/165495/detec

Re: [python-win32] chapter 5 : implementing com objects with python

2019-03-26 Thread Tim Roberts
whether Office 365 is a 32-bit app or a 64-bit app, but your version of Python must match. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mailing list py

Re: [python-win32] adodbapi: paramstyle 'named' doesn't work as expected

2019-02-20 Thread Tim Roberts
. I WOULD consider this a subtle bug in the ADODBAPI code. You are being too kind.  This bug is not subtle in any way. Python is so good at string parsing -- there must be a better way to write that. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Descriptio

Re: [python-win32] How to get target of folder shortcuts

2019-03-18 Thread Tim Roberts
es? Your code works for me, although the SFGAO_FOLDER bit is not set for my folder shortcut.  If you do a "dir" of the folder where the link lives, what do you see?  Is it actually a .lnk file of about a kilobyte? There are no DOS attributes on my folder shortcut.  What do you see

Re: [python-win32] Performing ReplyAll to outlook email message

2019-03-15 Thread Tim Roberts
have to do it all "the hard way". Create a new message, copy the Receipts list into the new message, set your body, send it.  Not a lot of code, but it's a little tedious. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptogra

Re: [python-win32] COM Photoshop - Exception occurred

2019-03-09 Thread Tim Roberts
ent versions of Photoshop? Could the “slct” action refer to a plugin that isn’t present on your Windows 10 system? The key point is that this is almost certainly going to end up being a Photoshop issue, not a Python issue. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime

Re: [python-win32] Facing issue while connecting to alm via python

2019-01-29 Thread Tim Roberts
.  An in-process COM server has to match the bittedness of the caller.  Do you have the option of installing a 32-bit Python to see if it works from there? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signa

Re: [python-win32] connecting to labview executable

2019-05-12 Thread Tim Roberts
ay, LabView can do socket comunication so I think this is the way do > go rather than reading LabView controls via pywin32. Agreed. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME cryptographic signature ___

Re: [python-win32] Retrieve Windows Notifications With pywin32

2019-06-02 Thread Tim Roberts
cations are there for a reason, and they are expected to be handled by a human user. What kind of notifications are you trying to dismiss? — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.

Re: [python-win32] Retrieve Windows Notifications With pywin32

2019-06-06 Thread Tim Roberts
s to deal with. There are many things that would be inappropriate for you to dismiss. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Problem reading a shortcut (.lnk) with cPython 3.7 (32 bit)

2019-06-18 Thread Tim Roberts
-bit Python on a 64-bit system?  Theoretically, you should be able to use CLSID_ShellLink from either one, but I'm trying to narrow things down.  Tim's code works fine for me with Python 3.7.2 (64 bit) on Windows 10. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime

Re: [python-win32] connecting to labview executable

2019-05-12 Thread Tim Roberts
lready running? If so, then all you should have to do is use os.spawn or subprocess.Popen to launch the executable. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME cryptographic signature ___ python-win32 ma

Re: [python-win32] getvireference issue

2019-05-09 Thread Tim Roberts
LabView.Application") > VI = labview.getvireference(r'Controller.vi') > I get the following error: > > AttributeError: ' instance at 0x43780248>' object has no attribute 'getvireference' The actual spelling is GetVIReference. Does that work? — Tim Roberts

Re: [python-win32] Dispatch command hangs

2019-08-15 Thread Tim Roberts
ee if that helps. But even then, you bang up against the Python interpreter lock, which only allows the interpreter to handle one thread at a time. I wouldn’t think you’d have to wait for the whole set of object requests to drain, but threading in Python is always tricky. — Tim Roberts

Re: [python-win32] Dispatch command hangs

2019-08-15 Thread Tim Roberts
t-of-process server, so you’re receiving requests from other processes? If so, then I think you’re seeing RPC (Remote Procedure Call), which marshals the parameters back and forth, and I believe those are all first-come first-served. — Tim Roberts, t...@probo.com Providenza &

Re: [python-win32] DoAction problem

2019-07-28 Thread Tim Roberts
oshop questions. Adobe has documentation on the Photoshop APIs, and they have their own user forums. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] DoAction problem

2019-07-25 Thread Tim Roberts
s, I strongly suggest you take a look at the ImageMagick package.  It is an incredible powerful photo manipulation tool that is all driven from the command line.  It can be a bit tricky to set up the command lines, but once you do, it works the same way, time after time. -- Tim Robe

Re: [python-win32] DoAction problem

2019-07-25 Thread Tim Roberts
onvert TIF to JPG, you certainly do not need to launch the Photoshop behemoth for that. Just use pip to install "pillow", the Python Imaging Library, and all you need is this:     from PIL import Image     Image.open('myfile.tif').save('myfile.jpg') -- Tim Roberts, t...@probo.com Prov

Re: [python-win32] Calling Methods of an object returned by an COMObject method

2019-09-20 Thread Tim Roberts
round as a COM server, so there’s no visible change when you quiet. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-10 Thread Tim Roberts
ring', None, None) That’s correct. “” is not a valid class string. SHGetPropertyStoreFromParsingName returns a COM interface, and you have to tell it what interface you want. It is usually IPropertyStore. What are you trying to do here? Are you porting some C++ code you found into Pyth

Re: [python-win32] NotifyAddrChange

2019-11-05 Thread Tim Roberts
jects/iphelpers/files/> — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-07 Thread Tim Roberts
at I had to figure this out twice today. dateShifted = propsys.PROPVARIANTType(mDate+shift_time.timedelta_obj, pythoncom.VT_DATE) The PROPVARIANTType function returns a PyPROPVARIANT object. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. __

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-14 Thread Tim Roberts
ia files, but I seriously doubt they will be to MODIFY media files. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] How to set value with PyIPropertyStore

2019-11-07 Thread Tim Roberts
(VIDEO_DATE_ENCODED, dateShifted) I found it.  Try   dateShifted = propsys.PyPROPVARIANT(mData + shift_time.timedelta_obj, pythoncom.VT_DATE) -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signa

Re: [python-win32] passing array by reference (3)

2019-10-27 Thread Tim Roberts
, thank you! What DID happen? You don’t have a newline at the very end of the string. CATIA might need that. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/m

Re: [python-win32] How to set value with PyIPropertyStore

2019-10-14 Thread Tim Roberts
get an error? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Word Application saving to PDF

2019-10-09 Thread Tim Roberts
'Command failed', 'wdmain11.chm', 36966, -2146824090), None) Did you do any web searching for this? -2146824090 is 0x80A1066, which is a security issue. Do you have permission to write into that directory? Are you able to do this same action if you do it by hand? —

Re: [python-win32] pure python way to open a file with write deny for others

2020-03-06 Thread Tim Roberts
atively, and perhaps more hacky, you can use subprocess to copy the file to a safe temporary name. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mailing list

Re: [python-win32] VT_DECIMAL variant

2020-04-15 Thread Tim Roberts
anding in the pythoncom code. CURRENCY goes back to the days of Visual Basic 6, whereas DECIMAL is much more recent.  It may be appropriate to file a bug report. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic

Re: [python-win32] VT_DECIMAL variant

2020-04-15 Thread Tim Roberts
it by hand.  I just don't know the recipe.  If Tim Golden is listening, perhaps he can point us to a reference. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mai

Re: [python-win32] VT_DECIMAL variant

2020-04-15 Thread Tim Roberts
at you should use. In order to use VT_DECIMAL, then you probably can’t use automatic translation. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] User login details when running a service

2020-04-11 Thread Tim Roberts
There is a WMI query that can return the name of all logged in users: https://stackoverflow.com/questions/5218778/how-do-i-get-the-currently-logged-username-from-a-windows-service-in-net <https://stackoverflow.com/questions/5218778/how-do-i-get-the-currently-logged-username-from-a-windows-servi

Re: [python-win32] How to change print copies

2020-04-23 Thread Tim Roberts
le copies on its own. Have you seen a multi-copy setting work using the native driver? — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] [win32com] Meaning of "TypeError: Only com_record objects can be used as records"?

2020-04-30 Thread Tim Roberts
the old mailing list threads I found. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] [win32com] Meaning of "TypeError: Only com_record objects can be used as records"?

2020-04-28 Thread Tim Roberts
ric structs like that are not in those rules. Some people get the idea that anything they can express in C++ can be shoved in a COM interface, but it ain’t so. You should be able to add a GUID attribute to the IDL: [ uuid(12345678-1234-1234-1234-123456789ABC) ] typedef struct SoftwareInfo { … } Softw

Re: [python-win32] How to install pywin32 for Text only/TTY, excluding all GUI components

2020-05-24 Thread Tim Roberts
ents, e.g. MFC.dll. > What are your thoughts? What is the point? Installing a package does not mean you are required to use all of it. If you ship a package that doesn’t need the UI components, then your package will not include the components. — Tim Roberts, t...@probo.com Providen

Re: [python-win32] how to use win32process.CreateRemoteThread

2020-09-11 Thread Tim Roberts
be part of the other process. If you want to do threading in Python, use the ’thread’ or ’threading’ modules. Don’t use win32process for that. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@

Re: [python-win32] pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

2020-09-08 Thread Tim Roberts
to determine. If a company wants to support both 32-bit and 64-bit processes, then it has to install two different COM servers.  I suggest you describe your problem to the QuickOPC folks; they would know right away if this were the issue. -- Tim Roberts, t...@probo.com Providenza & Boekelh

Re: [python-win32] pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

2020-09-08 Thread Tim Roberts
the 32-bit Python, instead of the 64-bit Python? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mai

Re: [python-win32] pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

2020-09-09 Thread Tim Roberts
C installation, or you need the 64-bit Python. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Strange issues when using pywin32 to develop solidworks

2020-10-07 Thread Tim Roberts
lity() ActiveDoc is a property, and so should not need parens. > Running this code and vscode says: > > line 15, in > swModel.AddComponents3(vtName,vtTrans,vtCoordName) > TypeError: 'NoneType' object is not callable > If I code it like this 'swModel.AddComponents3' then it

Re: [python-win32] AES based win32crypt lib for python3

2020-10-07 Thread Tim Roberts
ure call into the Windows LSA (Local Security Authority) to get access to the login credentials through an undocumented internal function. You can certainly find AES encryption for Python, but it’s not going to use the login credentials. — Tim Roberts, t...@probo.com

Re: [python-win32] Any update on this issue? https://github.com/mhammond/pywin32/issues/1568

2020-09-24 Thread Tim Roberts
ill have Excel installed? Are you quite sure it’s a 64-bit Excel? — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME cryptographic signature ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] python-win32 Digest, Vol 205, Issue 5

2020-05-25 Thread Tim Roberts
needed. When I say “package”, I mean an application package that you want to distribute, created by something like pyinstaller. It will only include the components your application needs. I just don’t see that there is anything to gain in making such a substantial change.

Re: [python-win32] How to install pywin32 for Text only/TTY, excluding all GUI components

2020-05-26 Thread Tim Roberts
in32 that are actually required by the application. If you’re shipping your application via pip on WIndows, then virtually everyone will already have pywin32. It is a critical component. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. __

Re: [python-win32] Licensing requirement for usage of win32com APIs through python package (pywin32)

2020-08-02 Thread Tim Roberts
How does a Microsoft license get involved? I think you’re worrying more than you need to here. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32

Re: [python-win32] Pythonwin.exe - trouble on the starting line

2020-07-20 Thread Tim Roberts
(the two libraries started at pretty much the same time), and wxPython has the advantage of being cross-platform. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-win32 mai

Re: [python-win32] Server Exectuion Failed

2020-11-12 Thread Tim Roberts
se the process after I am done with my object? It’s up to the the application. Out-of-process servers often provide a “close” or “exit” method to tell them to clean up. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ pyth

Re: [python-win32] Use TPM from Crypto API

2020-11-22 Thread Tim Roberts
u have some ideas in mind to reach my goal ? The APIs from ncrypt.dll are not, as of yet, exposed in pywin32. You can certainly use ctypes to access them. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-wi

Re: [python-win32] Using python to create outlook rules - comtypes (working) vs. pywin32 (not working)

2020-10-30 Thread Tim Roberts
-using-python-to-create-o This is not Visual Basic.  The following statement does nothing in Python: |oFromCondition.Recipients.ResolveAll| If you want the method to be called, you have to call it: |oFromCondition.Recipients.ResolveAll()| -- Tim Roberts, t...@probo.com Providenza & Boekelh

Re: [python-win32] how to code pywin32 run existing window task scheduler?

2021-01-14 Thread Tim Roberts
e already using them. ;) > I have tried already but error > That’s 0x80070005, which is ERROR_ACCESS_DENIED. Have you tried running this from an elevated process? — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32

Re: [python-win32] Basic question about pywin32, does it work with 64 bit versions of O365?

2021-01-21 Thread Tim Roberts
and 64-bit Pythons.) However, the Office applications are out-of-process servers, so there’s a proxy in the middle, and that should let it work. — Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. ___ python-win32 mailing list python-

Re: [python-win32] Error: VARIANT Type is unknown

2021-01-26 Thread Tim Roberts
that!  If it doesn't ask for a variant, then you don't deliver a variant.  Did you try just passing a string, as Mark suggested? -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. smime.p7s Description: S/MIME Cryptographic Signature ___ python-w

Re: [python-win32] Issue with monitor off

2021-06-10 Thread Tim Roberts
not only goin off state but the machine is also going sleep mode . My question is : Is there any way to prevent machine going to sleep ? The only thing i need is to turn monitor off :) The operating system can do this for you automatically, in the "Power & Sleep" control panel page.

<    6   7   8   9   10   11   12   >