Skip to content

Commit

Permalink
print exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Totsukawaii committed Apr 10, 2024
1 parent c3c44e8 commit 73d86e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Help me test my [dev branch](/~https://github.com/Totsukawaii/UndownUnlock/tree/de

## How to use

1. Download the zip file from the Releases [here](/~https://github.com/Totsukawaii/UndownUnlock/releases/download/v1.0.4/UndownUnlock-v1.0.4.zip) (contains the dll file)
1. Download the zip file from the Releases [here](/~https://github.com/Totsukawaii/UndownUnlock/releases/download/v1.0.5/UndownUnlock-v1.0.5.zip) (contains the dll file)

2. Double click `install_miniconda.bat` and wait for the installation to complete, make sure the file path doesn't have spaces or brackets

Expand Down
7 changes: 3 additions & 4 deletions controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def is_exe_window(hwnd):
process = psutil.Process(pid)
return process.exe().endswith('.exe')
except Exception as e:
print(e)
return False

def cycle_windows_and_set_top():
Expand All @@ -125,10 +126,8 @@ def cycle_windows_and_set_top():
try:
next_window.activate()
except Exception as e:
if e.__class__.__name__ == 'PyGetWindowException':
pass
else:
raise e
print(e)
cycle_windows_and_set_top()

print("Switching to", next_window.title)
set_window_on_top(hwnd)
Expand Down

0 comments on commit 73d86e6

Please sign in to comment.