diff --git a/main.py b/main.py index ec6e7ae..43dc705 100644 --- a/main.py +++ b/main.py @@ -1,12 +1,4 @@ -import keyboard from src.adischeck import ( - is_adis_running, - get_active_name, - print_new_signature, - adis_get_signature, - adis_save_and_enter_exemplar, - new_search, - taskswitcher_name, get_mednr_exempl, enter_print_mode, exit_print_mode, @@ -15,9 +7,6 @@ from src.adischeck_online import run, work_on_page import pyautogui from src.database import Database import time -import sys -import clipboard -from playwright.sync_api import Playwright, sync_playwright, expect catalogue_pid = None @@ -28,36 +17,6 @@ page = run() def main(): - # global catalogue_pid, print_pid - # if not is_adis_running(): - # print("aDISCl is not running. Please start all required aDIS instances and try again.") - # return - # print("aDISCl is running. Proceeding to capture PIDs...") - # print("Press 'c' to capture the PID of the Catalogue aDIS instance.") - # keyboard.wait('c') - # #press backspace to clear any previous input - # catalogue_pid = get_active_name() - # print("Captured Catalogue PID:", catalogue_pid) - # pyautogui.hotkey("ctrl", "a") # Switch to the next aDIS instance - # pyautogui.hotkey("delete") - # # pyautogui.press("backspace") - # print("Press 'p' to capture the PID of the Print aDIS instance.") - # keyboard.wait('p') - # print_pid = get_active_name() - # print("Captured Print PID:", print_pid) - # pyautogui.hotkey("ctrl", "a") # Switch to the next aDIS instance - # pyautogui.hotkey("delete") - - # if catalogue_pid and print_pid: - # print("Both Catalogue and Print PIDs captured successfully.") - # print("Switching back to Catalogue aDIS instance...") - # taskswitcher_name(catalogue_pid) # Switch to Catalogue aDIS instance - # pyautogui.press("up") - # # pyautogui.hotkey("alt", "s") # Open the search dialog in Catalogue aDIS - # else: - # print("Failed to capture one or both PIDs. Please ensure you have the correct aDIS instances open.") - # print("Exiting the program.") - # sys.exit(1) print("Starting the script...") while True: mednr = get_mednr_exempl()