[python-win32] Login dialog user ID restriction?
We have been using the login dialog that comes with pywin32 for over a decade. Works great. [cid:image002.jpg@01D47DA8.65B2A050] We have a client who until recently required a 4 character max user ID. Now they want an option for up to a 19 character user ID. I told them no problem, that should work. One of their user decided to go for it and set their password to 19 characters on their server, then tried to log in via the login box. They claimed only 14 characters will fit in the User ID entry window. Really? So I ran some tests. I held down the 'a' key for user ID and 'b' key for password. Result: ('aa', 'b') User ID - 14 characters PW - 21 characters Then I decided to go skinny and held the i key for both. Result: ('ii', 'i') User ID - 42 characters PW - 21 characters I'm a data mover and very seldom work with dialogs. The restriction appears to be entry window size based on character width. I assumed if there was any kind of a restriction it would be x number of characters. I've looked at how I send could parameters to alter this behavior but don't see anything. Feel free to verbally abuse me if I'm missing the obvious, but can anyone tell me how to expand the number of characters I can send for a user ID? Thank you Gary "FINASTRA" is the trade name of the FINASTRA group of companies. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and FINASTRA. Please refer to the executed contract between you and the relevant member of the FINASTRA group for the identity of the contracting party with which you are dealing. ___ 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?
On 11/16/2018 12:08 PM, Tim Roberts wrote: Glenn Linderman wrote: Here is the code I'm using. Note that the variables js and rename are the control variables if you need to tweak this to run in your environment. js contains a substring of an existing document name, and the idea is that the document name of the first matching spool job having a document name containing that fragment will be changed to the content of the rename variable by the code. ... Here is the error I'm getting: {'JobId': 27, 'pPrinterName': 'HL6180dw', 'pMachineName': 'STEPHEN', 'pUserName': 'Glenn', 'pDocument': 'duh', 'pDatatype': 'NT EMF 1.008', 'pStatus': None, 'Status': 8210, 'Priority': 1, 'Position': 0, 'TotalPages': 22, 'PagesPrinted': 0, 'Submitted': pywintypes.datetime(2018, 11, 14, 21, 1, 27, 882000, tzinfo=TimeZoneInfo('GMT Standard Time', True))} Traceback (most recent call last): File "D:\my\py\spool.py", line 109, in win32print.SetJob( phandle, res[ 1 ], 1, jobinfo, 0 ) pywintypes.error: (1804, 'SetJob', 'The specified datatype is invalid.') That's very odd. This is not from the Pywin32 code -- it has correctly parsed your structure. That error is coming from the SetJob 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? Hi Tim, Thanks for your response. I've not coded up the equivalent C program, as I don't have a C compiler installed here, and haven't done any C coding for 8 or 10 years. Were you able to reproduce the problem, or is your error analysis based on code reading? Glenn ___ 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?
Glenn Linderman wrote: Here is the code I'm using. Note that the variables js and rename are the control variables if you need to tweak this to run in your environment. js contains a substring of an existing document name, and the idea is that the document name of the first matching spool job having a document name containing that fragment will be changed to the content of the rename variable by the code. ... Here is the error I'm getting: {'JobId': 27, 'pPrinterName': 'HL6180dw', 'pMachineName': 'STEPHEN', 'pUserName': 'Glenn', 'pDocument': 'duh', 'pDatatype': 'NT EMF 1.008', 'pStatus': None, 'Status': 8210, 'Priority': 1, 'Position': 0, 'TotalPages': 22, 'PagesPrinted': 0, 'Submitted': pywintypes.datetime(2018, 11, 14, 21, 1, 27, 882000, tzinfo=TimeZoneInfo('GMT Standard Time', True))} Traceback (most recent call last): File "D:\my\py\spool.py", line 109, in win32print.SetJob( phandle, res[ 1 ], 1, jobinfo, 0 ) pywintypes.error: (1804, 'SetJob', 'The specified datatype is invalid.') That's very odd. This is not from the Pywin32 code -- it has correctly parsed your structure. That error is coming from the SetJob 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@python.org https://mail.python.org/mailman/listinfo/python-win32