50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
from src.adischeck import (
|
|
get_mednr_exempl,
|
|
enter_print_mode,
|
|
exit_print_mode,
|
|
)
|
|
from src.adischeck_online import run, work_on_page
|
|
import pyautogui
|
|
from src.database import Database
|
|
import time
|
|
|
|
|
|
catalogue_pid = None
|
|
print_pid = None
|
|
|
|
database = Database()
|
|
page = run()
|
|
|
|
|
|
def main():
|
|
print("Starting the script...")
|
|
while True:
|
|
mednr = get_mednr_exempl()
|
|
print("Mednr:", mednr)
|
|
|
|
pyautogui.hotkey("alt", "s")
|
|
work_on_page(page, mednr)
|
|
enter_print_mode()
|
|
pyautogui.press("space")
|
|
time.sleep(1)
|
|
exit_print_mode()
|
|
# keyboard.wait('space')
|
|
|
|
# time.sleep(5)
|
|
# text = adis_get_signature()
|
|
# new = database.insert_ma(text)
|
|
# clipboard.copy(new) # Copy the new signature to clipboard
|
|
# print(text, new)
|
|
# pyautogui.hotkey('ctrl', 'v') # Select all text
|
|
# mednr = adis_save_and_enter_exemplar(new) # Example usage with a new signature
|
|
# print("finished main work, printing new signature")
|
|
# time.sleep(1)
|
|
# print_new_signature(catalogue_pid, print_pid, mednr)
|
|
# new_search()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|
|
|
|
# time.sleep(5) # Wait for a few seconds before starting
|
|
# print_new_signature("3 - PHFR: Katalog - aDIS/Client", "4 - PHFR(42): Exemplare - aDIS/Client", "004862920129") |