Skip to content

Commit

Permalink
catch unexpected window error
Browse files Browse the repository at this point in the history
  • Loading branch information
lippielip committed Dec 29, 2021
1 parent a4e2cd0 commit 2b8bef1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/antiafk.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,21 @@ def get_game_window():
try:
gameWindow = window.getWindowsWithTitle('FINAL FANTASY XIV')[0]
if is_admin():
gameWindow.activate()
try:
gameWindow.activate()
except:
return
except IndexError:
return


def return_to_original_window():
global originalWindow
if is_admin():
originalWindow.activate()

try:
originalWindow.activate()
except:
return

def execute_human_movement():
global timer, rand_interval
Expand Down

0 comments on commit 2b8bef1

Please sign in to comment.