Closed hoatk closed 6 years ago
Hi, as mentioned in #18 this requires some serious understanding of Win API's which unfortunately I don't possess. Could you please post it on stack overflow?
I tested this code on a Windows 10:
from win10toast import ToastNotifier
toaster = ToastNotifier()
toaster.show_toast("TEST", duration=5)
The code runs fine and got expected results when being run on native shell.
However I got the error when I run the code through a SSH connection from other machine.
I wrote code below:
Then compile and install service (python AlertService.py install) then start it.
It dump an error on Event Viewer: The instance's SvcRun() method failed Traceback (most recent call last): File "C:\PYTHON27\lib\site-packages\pypiwin32-219-py2.7-win-amd64.egg\win32serviceutil.py", line 835, in SvcRun self.SvcDoRun() File "D:\DB\Python\Test\AlertService.py", line 33, in SvcDoRun toaster.show_toast('test',duration=10) File "build\bdist.win-amd64\egg\win10toast__init__.py", line 115, in show_toast Shell_NotifyIcon(NIM_ADD, nid) error: (-2147467259, 'Shell_NotifyIcon', 'Unspecified error') %2: %3
Please help me fix, thank so much