You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Tools/Jupyter-notebooks/Untitled.ipynb

181 lines
4.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Box(left=550, top=244, width=29, height=29), Box(left=550, top=298, width=29, height=29), Box(left=550, top=352, width=29, height=29), Box(left=550, top=406, width=29, height=29), Box(left=550, top=460, width=29, height=29), Box(left=550, top=514, width=29, height=29), Box(left=550, top=568, width=29, height=29), Box(left=550, top=622, width=29, height=29), Box(left=550, top=676, width=29, height=29), Box(left=550, top=730, width=29, height=29), Box(left=550, top=784, width=29, height=29), Box(left=550, top=838, width=29, height=29)]\n"
]
}
],
"source": [
"import sys\n",
"import os\n",
"sys.path.insert(0, os.path.abspath(\"..\\\\..\\\\Sources\"))\n",
"import time\n",
"from pyOpenRPA.Robot import Keyboard\n",
"\n",
"# Screen: Взаимодействие с объектами экрана\n",
"from pyOpenRPA.Robot import Screen\n",
"lBoxList = Screen.ImageLocateAll(inImgPathStr=\"screencontact.PNG\",inConfidenceFloat=0.9)\n",
"print(lBoxList)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"Screen.BoxDraw(inBox = lBoxList)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Box(left=500, top=244, width=29, height=29), Box(left=500, top=298, width=29, height=29), Box(left=500, top=352, width=29, height=29), Box(left=500, top=406, width=29, height=29), Box(left=500, top=460, width=29, height=29), Box(left=500, top=514, width=29, height=29), Box(left=500, top=568, width=29, height=29), Box(left=500, top=622, width=29, height=29), Box(left=500, top=676, width=29, height=29), Box(left=500, top=730, width=29, height=29), Box(left=500, top=784, width=29, height=29), Box(left=500, top=838, width=29, height=29)]\n"
]
}
],
"source": [
"lBox2List = Screen.BoxMoveTo(inBox=lBoxList,inDXInt=-50)\n",
"print(lBox2List)\n",
"Screen.BoxDraw(inBox = lBox2List)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"lPoint = Screen.BoxGetPoint(lBox2List[0])"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"Screen.PointClick(lPoint)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Box(left=489, top=243, width=46, height=32)]\n"
]
}
],
"source": [
"lBoxList = Screen.ImageLocateAll(inImgPathStr=\"sendmessage.PNG\",inConfidenceFloat=0.9)\n",
"print(lBoxList)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"Screen.PointClick(Screen.BoxGetPoint(Screen.ImageLocateAll(inImgPathStr=\"sendmessage.PNG\",inConfidenceFloat=0.9)[0]))"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[Box(left=169, top=193, width=409, height=687)]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Screen.ImageLocateAll(inImgPathStr=\"emptytray.PNG\",inConfidenceFloat=0.9)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 4
}