Skip to content

Commit

Permalink
Adde __main__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotso11 committed Feb 6, 2022
1 parent c0dc509 commit 18b6986
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
9 changes: 9 additions & 0 deletions __main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from macros import run_ui


def main():
run_ui()


if __name__ == '__main__':
main()
20 changes: 14 additions & 6 deletions fc-macros.py → macros.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# fc-macros.py
# macros.py
# Elite Dangerous Fleet Carrier Macros - autopilot/auto jumper
# Copyright (c) 2022 Seth Osher
#
Expand Down Expand Up @@ -545,9 +545,17 @@ def check_settings():
log = get_latest_log_file()
if DEBUG.get() == 1: print("Opening E:D log: ", log)
ed_log = open(log, 'r')
check_newer_log() # Start checking for log rotation

process_log() # start log processing
check_settings() # start monitoring settings
check_keys() # start key monitoring
root.mainloop() # run

# Run the UI
def run_ui():
check_newer_log() # Start checking for log rotation
process_log() # start log processing
check_settings() # start monitoring settings
check_keys() # start key monitoring
root.mainloop() # run


if __name__ == '__main__':
run_ui()

0 comments on commit 18b6986

Please sign in to comment.