Commit 20e5c0a6 authored by Ivan Maslov's avatar Ivan Maslov

#Fix error object RECT is not serializable

#Add How to use (Usage.py)
Signed-off-by: default avatarIvan Maslov <Ivan.Maslov@UnicodeLabs.ru>
parent d9c491fa
......@@ -8,6 +8,7 @@ import os
import sys
import traceback
from . import RobotConnector
from . import JSONNormalize
import importlib
#Единый глобальный словарь (За основу взять из Settings.py)
global mGlobalDict
......@@ -101,6 +102,9 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
lRequestObject=lInputObject
#Отправить команду роботу
lResponseObject=RobotConnector.ActivityRun(lRequestObject)
#Normalize JSON before send in response
lResponseObject=JSONNormalize.JSONNormalizeDictList(lResponseObject)
#Dump DICT LIST in JSON
message = json.dumps(lResponseObject)
except Exception as e:
#Установить флаг ошибки
......
......@@ -52,8 +52,50 @@ driver.close()
###############################
#Technology Image & Mouse
###############################
...
#https://pypi.org/project/PyAutoGUI/
import pyautogui
lScreenPath = "Path\\to\\image.png"
#Search image on screen
buttonx, buttony = pyautogui.locateCenterOnScreen(lScreenPath) # returns (x, y) of matching region
#Moucse click on X:buttonx Y:buttony
pyautogui.click(buttonx, buttony)
###############################
#Technology Keyboard & Clipboard
###############################
...
\ No newline at end of file
#https://pypi.org/project/keyboard/
import keyboard
#Write a text (selected language dont affect)
keyboard.write('The quick brown fox jumps over the lazy dog.')
# Blocks until you press esc.
keyboard.wait('esc')
# Record events until 'esc' is pressed.
recorded = keyboard.record(until='esc')
# Then replay back at three times the speed.
keyboard.play(recorded, speed_factor=3)
#Add hotkey
keyboard.add_hotkey('ctrl+shift+a', print, args=('triggered', 'hotkey'))
###############################
#Technology Message boxes
###############################
#https://pypi.org/project/PyAutoGUI/
import pyautogui
#Show alert message box
pyautogui.alert('This is an alert box.')
#Ask a question (Yes/No)
pyautogui.confirm('Shall I proceed?')
#Ask a question with answer options
pyautogui.confirm('Enter option.', buttons=['A', 'B', 'C'])
#Ask a question with text answer
pyautogui.prompt('What is your name?')
#Ask a password (password will be hidden)
pyautogui.password('Enter password (text will be hidden)')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment