Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

eg.WindowMatcher issue?

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
Dragon470
Experienced User
Posts: 205
Joined: Thu Feb 10, 2011 2:16 am

eg.WindowMatcher issue?

Post by Dragon470 »

I have an issue with eg.WindowMatcher. I use an application called AltDesk which mimics multiple desktops. I know it does this by actually making the application windows on the "other" screens invisible. So that means I need to use the includeInvisible=True. I can't for some reason figure this out. I hope I have just overlooked something. So here are the details.

Windows 7 x64
eg version 0.3.7.r1462

This works:

Code: Select all

from eg.cFunctions import GetProcessDict
from threading import Thread, Event
from os.path import splitext


FindWin = eg.WindowMatcher(u'VirtualDub.exe', u'{*}% [{*}] - VirtualDub 1.9.10', None, None, None, 1, False, 0.0, 0)
hwnd = FindWin()
if len(hwnd) > 0:
    eg.TriggerEvent("VirtualDub.Running","Still Running"),
else:
    eg.TriggerEvent("VirtualDub.Off","Not Running"),
This does not:

Code: Select all

from eg.cFunctions import GetProcessDict
from threading import Thread, Event
from os.path import splitext


FindWin = eg.WindowMatcher(u'VirtualDub.exe', u'{*}% [{*}] - VirtualDub 1.9.10', None, None, None, 1, True, 0.0, 0)
hwnd = FindWin()
if len(hwnd) > 0:
    eg.TriggerEvent("VirtualDub.Running","Still Running"),
else:
    eg.TriggerEvent("VirtualDub.Off","Not Running"),

it generates this error message:

Traceback (most recent call last):
Python script "93", line 7, in <module>
hwnd = Findwin()
File "C:\Program Files (x86)\EventGhost\eg\Classes\WindowMatcher.py", line 192, in FindMatch
File "C:\Program Files (x86)\EventGhost\eg\Classes\WindowMatcher.py", line 167, in Find
OverflowError: long int too large to convert to int
Post Reply