mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
Update LunaTranslator.py
This commit is contained in:
parent
818a285a98
commit
4895550fcb
@ -778,10 +778,11 @@ class MAINUI:
|
|||||||
try:
|
try:
|
||||||
_hwnd = windows.GetForegroundWindow()
|
_hwnd = windows.GetForegroundWindow()
|
||||||
_pid = windows.GetWindowThreadProcessId(_hwnd)
|
_pid = windows.GetWindowThreadProcessId(_hwnd)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if (
|
if len(self.textsource.pids) == 0:
|
||||||
_pid in self.textsource.pids or _pid == os.getpid()
|
raise Exception()
|
||||||
): # or的顺序不可以修改
|
if _pid in self.textsource.pids or _pid == os.getpid():
|
||||||
isok(self.textsource.pname)
|
isok(self.textsource.pname)
|
||||||
else:
|
else:
|
||||||
isbad()
|
isbad()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user