import asyncio
import websockets
import os,glob
import time
import threading
import win32print
import win32api
import socket
import struct
import tempfile,time
printer_name = win32print.GetDefaultPrinter()
tcp_socket=socket.socket(socket.AF_INET,socket.SOCK_STREAM) #
try:
tcp_socket.json()
except:
tcp_socket.connect(("10.1.1.225",3000))
else:
raise ValueError
from pynput.keyboard import Key, Controller as c_keyboard
from pynput.mouse import Button, Controller as c_mouse
keyboard = c_keyboard()
from threading import Thread
def keyboardjing(num,tim,hek):
months = {1: "1",2: "2",3: "3", 4: "4",5: "5",6: "6",7: "7",8: "8",9: "9",0: "0"}
monthstext= months.get(num, "Invalid num")
keyboard.press(Key.alt)
keyboard.press(monthstext)
time.sleep(0.01)
keyboard.release(Key.alt)
keyboard.release(monthstext)
monthsB = {1: "a",2: "b",3: "c", 4: "d",5: "e",6: "f",6: "g",7: "h",8: "i",9: "j",0: "k"}
monthstB= monthsB.get(num, "Invalid num")
Thread(target=keyboardjingspeel(monthstB,tim),name=hek).start()
def keyboardjingspeel(monthstext,tim):
time.sleep(tim)
keyboard.press(Key.alt)