#DeleteRobot_Old #UpgradeHelp

dev-linux
Ivan Maslov 6 years ago
parent bbe84e1ef5
commit ecd23b59c3

@ -1,22 +0,0 @@
Runone bitness from another
Python 32 bit
p = subprocess.Popen(['python','C:\\Abs\\archive\\scopeSrcUL\\OpenRPA\\winGUI.py'],stdin=subprocess.PIPE,stdout=subprocess.PIPE)
Python 64 bit
p = subprocess.Popen(['C:\\Users\\Acer\\AppData\\Local\\Programs\\Python\\Python37\\python.exe','C:\\Abs\\archive\\scopeSrcUL\\OpenRPA\\winGUI.py'],stdin=subprocess.PIPE,stdout=subprocess.PIPE)
Parent process:
p.stdin.write(b'Hello\n'))
p.stdin.flush()
//p.stdin.write(bytes("Hello" % x,"utf-8"))
ChildProcess:
sys.stdin.readline() (Ждет конец строки \n)
sys.stdin.read() (Ждет конец строки EOF)
Нужно научиться конверить все строки в коды символов, чтобы небыло ложных срабатываний
.encode("zlib_codec")
.decode("zlib_codec")
Стандартизированный формат даты для JSON (от JS) - учет часового пояса производится отдельно тк JS хранит все даты в UTC
2012-04-23T18:25:43.511Z

@ -1,870 +0,0 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<title>OpenRPA</title>
<link rel="stylesheet" type="text/css" href="3rdParty/Semantic-UI-CSS-master/semantic.min.css">
<script
src="3rdParty/jQuery/jquery-3.1.1.min.js"
crossorigin="anonymous"></script>
<script src="3rdParty/Semantic-UI-CSS-master/semantic.min.js"></script>
<script>
var mGlobal={}
$(document)
.ready(function() {
mGlobal.GUIElement={}
mGlobal.GenerateUniqueID=function(inPrefix="ID") {
return inPrefix+Math.round(Math.random()*1000)+"-"+Math.round(Math.random()*10000)+"-"+Math.round(Math.random()*1000)
}
///Инициализация
mGlobal.ElementTree={}
mGlobal.Actions={}
mGlobal.ActionSpecificationList = []
mGlobal.CodeList={}
mGlobal.ClipboardSet=function(lText) {
const el = document.createElement('textarea');
el.value = lText;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
};
///Функция клонирования объекта
mGlobal.iSysClone=function(obj,lIsCloneSubProperty,lSubItemCallback) {
///Выполнить инициализацию переменной, если она не была передана
if (typeof(lIsCloneSubProperty)=="undefined") {
lIsCloneSubProperty=true;
}
///Вернуть значение, если передан простой тип данных
if (null == obj || "object" != typeof obj) return obj;
///Выполнить инициализацию новой переменной
var copy = obj.constructor();
///Циклический обход по всем свойствам объекта
for (var attr in obj) {
///Исключить присваивание тех свойств, которые унаследованы от прототипа
if (obj.hasOwnProperty(attr)) {
///Проверить, является ли вложенное свойство объектом
if (typeof(obj[attr])=="object" && lIsCloneSubProperty) {
///Рекурсивный вызов клонирования дочернего элемента
copy[attr] = mGlobal.iSysClone(obj[attr],lIsCloneSubProperty);
} else {
///Клонируемое свойство не является объектом - выполнить копирование
copy[attr] = obj[attr];
}
///Вызов callback функции в которую передается текущий атрибут
if (typeof(lSubItemCallback)!="undefined") {
lSubItemCallback(copy[attr]);
}
}
}
///Вернуть результат функции клонирования
return copy;
}
///Функция запуска поиска по окну
mGlobal.Actions.fAutomationSearchMouseElementHierarchyRun= function(inElementId)
{
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull;
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"AutomationSearchMouseElementHierarchy","argsArray":['+JSON.stringify(lSpecificationArray)+']}',
success:
function(lData,l2,l3)
{
var lResponseJSON=JSON.parse(lData);
///Подготовить структуру рендеринга, если у текущего объекта имееется родитель
var lStructureToRender=lResponseJSON.outputObject;
if (lSpecificationArray.length>1) {
var lStructureToRenderParent=[]
var lStructureToRenderLocal=lStructureToRenderParent;
for (var i=0;i<lSpecificationArray.length-1;i++) {
lStructureToRenderLocal.push(lSpecificationArray[i]);
///Добавить SpecificationChild, если итератор не заканчивается
if (i<lSpecificationArray.length-2) {
lStructureToRenderLocal[0]["SpecificationChild"]=[]
lStructureToRenderLocal=lStructureToRenderLocal[0]["SpecificationChild"]
}
///Если последнее звено - добавить структуру, которая поступила с сервера
if (i==lSpecificationArray.length-2) {
lStructureToRenderLocal[0]["SpecificationChild"]=lStructureToRender
lStructureToRender=lStructureToRenderParent
}
}
}
///Очистить дерево
mGlobal.ElementTree.fClear();
///Прогрузить новое дерево
mGlobal.ElementTree.fRender(lStructureToRender);
if (lResponseJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lResponseJSON.Error);
}
},
dataType: "text"
});
}
//Функция очистки объектов интерфейса
mGlobal.ElementTree.fClear=function()
{
///Очистить HTML код
$(".rpa-object-tree").html("");
}
///Функция визуализации дерева
mGlobal.ElementTree.fRender = function(inElementsTreeDataArray)
{
var lHTMLList='<div class="ui list" style="height:350px;overflow:scroll;">';
///Циклический обход списка
for (var i = 0; i< inElementsTreeDataArray.length;i++) {
///Добавить HTML код позиции
lHTMLList+=mGlobal.ElementTree.fItemGenerateHTML_JS(inElementsTreeDataArray[i])
}
///Закрывающая список HTML
lHTMLList+="</div>"
///Установить HTML код в родителя
$(".rpa-object-tree").html(lHTMLList);
}
///Функция визуализации дерева
///Вызов создания вложенного листа, если имеется атрибут SpecificationChild
mGlobal.ElementTree.fItemGenerateHTML_JS = function(inItem,inParentSpecification=[]){
///Генерация уникального кода для элемента
var lElementId = mGlobal.GenerateUniqueID()
//Добавить информацию об элементе в словарь JS
///Урезанная часть селектора (сделать, чтобы была без SpecificationChild)
var lSelectorLocal={};
Object.assign(lSelectorLocal,inItem);
delete lSelectorLocal.SpecificationChild;
///Установка данных JS
mGlobal.GUIElement[lElementId]={};
mGlobal.GUIElement[lElementId]['GUISelectorLocal']=lSelectorLocal
mGlobal.GUIElement[lElementId]['GUISelectorFull']=Array.from(inParentSpecification);
mGlobal.GUIElement[lElementId]['GUISelectorFull'].push(lSelectorLocal)
///Генерация кода HTML
var lResultString="";
var lSubItemActionOnClick=' onclick="mGlobal.TreeLoadSubTree(\''+lElementId+'\');" '
var lSubItemActionOnRightClick=' oncontextmenu="mGlobal.ElementHighlightNew(\''+lElementId+'\');" '
var lIconSelectOnClick=' onclick="mGlobal.TreeObjectInfoLoad(\''+lElementId+'\');" '
var lIconTestOnClick=' onclick="mGlobal.Test(\''+lElementId+'\');" '
var lIconUpOnClick=' onclick="mGlobal.Actions.fAutomationSearchMouseElementHierarchyRun(\''+lElementId+'\');" '
var lSubListHTML="";
///Проверка вложенных объектов SpecificationChild
if (Array.isArray(inItem.SpecificationChild)) {
if (inItem.SpecificationChild.length>0) {
var lSubListHTML='<div class="ui list">';
for (var i=0;i<inItem.SpecificationChild.length;i++) {
if (inItem.SpecificationChild[i] != null) {
///Генерация кода
lSubListHTML+=mGlobal.ElementTree.fItemGenerateHTML_JS(inItem.SpecificationChild[i],mGlobal.GUIElement[lElementId]['GUISelectorFull'])
}
}
lSubListHTML+="</div>"
}
}
///Генерация кода текущего элемента
lResultString+='\
<div class="item" id="'+lElementId+'">\
<i class="folder icon"></i>\
<i class="angle double right icon" '+lIconSelectOnClick+'></i>\
<i class="angle double right icon" '+lIconTestOnClick+'></i>\
<i class="angle double up icon" '+lIconUpOnClick+'></i>\
<div class="content">\
<div class="header" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>'+inItem.title+'</div>\
<div class="description" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>process_id:'+inItem.process_id+'; handle:'+inItem.handle+'; class_name: '+inItem.class_name+'; RECT:L'+inItem.rectangle.left+' T'+inItem.rectangle.top+' R'+inItem.rectangle.right+' B'+inItem.rectangle.bottom+'</div>\
'+lSubListHTML+'\
</div>\
</div>'
return lResultString;
}
mGlobal.TreeLoadSubTree =function (inElementId) {
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementGetChildElementList","argsArray":['+JSON.stringify(lSpecificationArray)+']}',
success:
function(lData,l2,l3)
{
var lHTMLTree='<div class="ui list">'
var lResponseJSON=JSON.parse(lData)
for (i=0;i<lResponseJSON.outputObject.length;i++) {
var lElementId = mGlobal.GenerateUniqueID()
var lSubItemHandleId=lResponseJSON.outputObject[i].handle;
var lSubItemActionOnClick=' onclick="mGlobal.TreeLoadSubTree(\''+lElementId+'\');" '
var lSubItemActionOnRightClick=' oncontextmenu="mGlobal.ElementHighlightNew(\''+lElementId+'\');" '
var lIconSelectOnClick=' onclick="mGlobal.TreeObjectInfoLoad(\''+lElementId+'\');" '
var lIconTestOnClick=' onclick="mGlobal.Test(\''+lElementId+'\');" '
var lIconUpOnClick=' onclick="mGlobal.Actions.fAutomationSearchMouseElementHierarchyRun(\''+lElementId+'\');" '
lHTMLTree+='\
<div class="item handle_'+lSubItemHandleId+'" handle_id="'+lSubItemHandleId+'" id="'+lElementId+'">\
<i class="folder icon"></i>\
<i class="angle double right icon" '+lIconSelectOnClick+'></i>\
<i class="angle double right icon" '+lIconTestOnClick+'></i>\
<i class="angle double up icon" '+lIconUpOnClick+'></i>\
<div class="content">\
<div class="header" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>'+lResponseJSON.outputObject[i].title+'</div>\
<div class="description" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>process_id:'+lResponseJSON.outputObject[i].process_id+'; handle:'+lSubItemHandleId+'; class_name: '+lResponseJSON.outputObject[i].class_name+'; RECT:L'+lResponseJSON.outputObject[i].rectangle.left+' T'+lResponseJSON.outputObject[i].rectangle.top+' R'+lResponseJSON.outputObject[i].rectangle.right+' B'+lResponseJSON.outputObject[i].rectangle.bottom+'</div>\
</div>\
</div>'
//Добавить информацию об элементе в словарь JS
mGlobal.GUIElement[lElementId]={};
mGlobal.GUIElement[lElementId]['GUISelectorLocal']=lResponseJSON.outputObject[i]
mGlobal.GUIElement[lElementId]['GUISelectorFull']=Array.from(lSpecificationArray);
mGlobal.GUIElement[lElementId]['GUISelectorFull'].push(lResponseJSON.outputObject[i])
}
lHTMLTree+='</div>'
$("#"+inElementId+" .content").append(lHTMLTree)
///Отображение ошибки
if (lResponseJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lResponseJSON.Error);
}
},
dataType: "text"
});
}
mGlobal.TreeObjectInfoLoad =function (inElementId) {
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull
var lHTMLList='<div class="ui relaxed divided list" style="height:350px;overflow:scroll;">'
var lSpecificationArrayNew=[]
for (i=0;i<lSpecificationArray.length;i++) {
lSpecificationArrayNew.push(lSpecificationArray[i])
var lElementId = mGlobal.GenerateUniqueID()
var lOnClickSelect= ' onclick="mGlobal.ElementPropertyListLoad(\''+lElementId+'\');" '
lHTMLList+='\
<div class="item" id="'+lElementId+'" '+lOnClickSelect+'>\
<div class="content">\
<div class="description"><p style="word-wrap: break-word;"><b>Level '+i+': </b> '+JSON.stringify(lSpecificationArray[i])+'</p></div>\
</div>\
</div>'
mGlobal.GUIElement[lElementId]={};
mGlobal.GUIElement[lElementId]['GUISelectorLocal']=lSpecificationArray[i]
mGlobal.GUIElement[lElementId]['GUISelectorFull']=Array.from(lSpecificationArrayNew);
}
lHTMLList+='</div>'
$(".rpa-hierarchy").html(lHTMLList)
$(".rpa-object-tree .item").css("background-color","");
$("#"+inElementId).css("background-color","RGB(128,128,128)");
///Создать урезанную версию селектора
lTextAreaSpecificationArray=mGlobal.iSysClone(lSpecificationArray,true);
for (var i = 0; i< lTextAreaSpecificationArray.length; i++) {
//lTextAreaSpecificationArray[i]=mGlobal.iSysClone(lTextAreaSpecificationArray[i],true)
//Object.assign(lTextAreaSpecificationArray[i],lTextAreaSpecificationArray[i]);
///Очистить ненужные ключи для выборки
delete lTextAreaSpecificationArray[i]['rich_text']
delete lTextAreaSpecificationArray[i]['process_id']
delete lTextAreaSpecificationArray[i]['rectangle']
delete lTextAreaSpecificationArray[i]['control_id']
delete lTextAreaSpecificationArray[i]['process']
delete lTextAreaSpecificationArray[i]['name']
delete lTextAreaSpecificationArray[i]['handle']
delete lTextAreaSpecificationArray[i]['control_type']
delete lTextAreaSpecificationArray[i]['runtime_id']
if (i!=0) {
delete lTextAreaSpecificationArray[i]['title']
delete lTextAreaSpecificationArray[i]['class_name']
}
}
$(".rpa-gui-selector")[0].value=(JSON.stringify(lTextAreaSpecificationArray))
}
mGlobal.ElementPropertyListLoad=function(inElementId) {
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementRunAction","argsArray":['+JSON.stringify(lSpecificationArray)+',"get_properties"]}',
success:
function(lData,l2,l3)
{
var lHTMLList='<div class="ui relaxed divided list">'
var lResponseJSON = JSON.parse(lData)
///Ошибка
if (lResponseJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lResponseJSON.Error);
} else {
var lJSONData = JSON.parse(lData).outputObject
var lSpecificationArray=Object.keys(lJSONData)
for (i=0;i<lSpecificationArray.length;i++) {
var lItemKey = lSpecificationArray[i]
var lItemValue = lJSONData[lItemKey]
lHTMLList+='\
<div class="item">\
<div class="content">\
<div class="description"><p style="word-wrap: break-word;"><b> '+lItemKey+':</b> '+JSON.stringify(lItemValue)+'</p></div>\
</div>\
</div>'
}
lHTMLList+='</div>'
$(".rpa-property-list").html(lHTMLList)
}
},
dataType: "text"
});
}
mGlobal.ElementHighlight =function (inHandleId) {
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementRunAction","argsArray":[[{"handle":'+inHandleId+'}],"draw_outline"]}',
success:
function(lData,l2,l3)
{
console.log('Success handle:'+inHandleId)
var lResponseJSON = JSON.parse(lData)
///Ошибка
if (lResponseJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lResponseJSON.Error);
}
},
dataType: "text"
});
}
mGlobal.ElementHighlightNew =function (inElementId) {
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementDrawOutlineNew","argsArray":['+JSON.stringify(lSpecificationArray)+']}',
success:
function(lData,l2,l3)
{
lDataJSON=JSON.parse(lData);
///Показать ошибку, если таковая возникла
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
mGlobal.ElementHighlightNewGUISelectorString =function (inGUISelector) {
//Подгрузка массива спецификаций
lSpecificationArray = inGUISelector
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementDrawOutlineNewFocus","argsArray":['+lSpecificationArray+']}',
success:
function(lData,l2,l3)
{
lDataJSON=JSON.parse(lData);
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
mGlobal.ElementValidateGUISelectorString =function (inGUISelector) {
//Подгрузка массива спецификаций
lSpecificationArray = inGUISelector
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"PywinautoExtElementsGetInfo","argsArray":['+lSpecificationArray+']}',
success:
function(lData,l2,l3)
{
lDataJSON=JSON.parse(lData);
if (Array.isArray(lDataJSON.outputObject)) {
lHTMLData=""
for (i=0;i<lDataJSON.outputObject.length;i++) {
lHTMLData+='<p>'+
JSON.stringify(lDataJSON.outputObject[i])+
'</p>'
}
$(".openrpa-validate-result").html(lHTMLData)
}
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
mGlobal.Test = function (inElementId) {
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementActionGetList","argsArray":['+JSON.stringify(lSpecificationArray)+']}',
success:
function(lData,l2,l3)
{
//lDataJSON=JSON.parse(lData.outputObject);
var lDataJSON=JSON.parse(lData)
var lDataKeyList=lDataJSON.outputObject
var lValueList=[]
for (var i = 0; i< lDataKeyList.length;i++) {
if (lDataKeyList[i].length>0)
if (lDataKeyList[i][0]!="_")
lValueList.push({'name':lDataKeyList[i],'value':lDataKeyList[i]})
}
///Установка значений в dropdown
$('.ui.dropdown.gui-action')
.dropdown({
values: lValueList
})
;
///Показать ошибку, если таковая возникла
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
///Выполнить действие
mGlobal.GUIActionLoadList = function () {
var lActionElementSpecification = $('.rpa-gui-selector')[0].value
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementActionGetList","argsArray":['+lActionElementSpecification+']}',
success:
function(lData,l2,l3)
{
//lDataJSON=JSON.parse(lData.outputObject);
lDataJSON=JSON.parse(lData)
var lDataKeyList=lDataJSON.outputObject
var lValueList=[]
for (var i = 0; i< lDataKeyList.length;i++) {
if (lDataKeyList[i].length>0)
if (lDataKeyList[i][0]!="_")
lValueList.push({'name':lDataKeyList[i],'value':lDataKeyList[i]})
}
///Установка значений в dropdown
$('.ui.dropdown.gui-action')
.dropdown({
values: lValueList
})
;
///Показать ошибку, если таковая возникла
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
///Добавить действие в список на исполнение
mGlobal.GUIActionAddToList= function() {
var lActionName =$('.dropdown.gui-action .selected')[0].attributes['data-value'].value
var lActionElementSpecification = $('.rpa-gui-selector')[0].value
var lActionArgumentList = $('.rpa-argument-list')[0].value
if (lActionArgumentList=="") lActionArgumentList="[]"
///Сформировать строку спецификации действия
lActionSpecificationObject = {"functionName":"ElementRunAction","argsArray":[JSON.parse(lActionElementSpecification),lActionName,JSON.parse(lActionArgumentList)]}
lActionSpecificationString = '{"functionName":"ElementRunAction","argsArray":['+lActionElementSpecification+',"'+lActionName+'",'+lActionArgumentList+']}'
///Добавить в массив действий
mGlobal.ActionSpecificationList.push(lActionSpecificationObject)
///Обновить визуализацию
mGlobal.CodeList.fRender()
}
///Добавить действие ожидания в список на исполнение
mGlobal.GUIActionWaitAddToList = function() {
var lActionElementSpecification = $('.rpa-gui-selector')[0].value
var lActionArgumentList = $('.rpa-argument-list')[0].value
if (lActionArgumentList=="") lActionArgumentList="[]"
///Сформировать строку спецификации действия
lActionSpecificationObject = {"functionName":"PywinautoExtElementWaitAppear","argsArray":[JSON.parse(lActionElementSpecification)]}
lActionSpecificationString = '{"functionName":"PywinautoExtElementWaitAppear","argsArray":['+lActionElementSpecification+']}'
///Добавить в массив действий
mGlobal.ActionSpecificationList.push(lActionSpecificationObject)
///Обновить визуализацию
mGlobal.CodeList.fRender()
}
///Добавить действие сон 2 секунды в список на исполнение
mGlobal.GUIActionSleep2sAddToList = function() {
///Сформировать строку спецификации действия
lActionSpecificationObject = {"functionName":"GeneralSleep2s","argsArray":[]}
lActionSpecificationString = '{"functionName":"GeneralSleep2s","argsArray":[]}'
///Добавить в массив действий
mGlobal.ActionSpecificationList.push(lActionSpecificationObject)
///Обновить визуализацию
mGlobal.CodeList.fRender()
}
///Выполнить список действий
mGlobal.GUICodeListRun = function () {
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIActionList',
data: JSON.stringify(mGlobal.ActionSpecificationList),
success:
function(lData,l2,l3)
{
var lDataJSON=JSON.parse(lData)
$(".gui-code-list-run-result").html(lDataJSON.outputObject)
///Показать ошибку, если таковая возникла
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
///////////////////
///CodeList
///////////////////
///Визуализация текущего списка
mGlobal.CodeList.fRender=function() {
///Сформировать текстовые данные для вывода
var lHTMLData = ""
for (var i = 0; i< mGlobal.ActionSpecificationList.length;i++) {
lHTMLData+='<p>'+
JSON.stringify(mGlobal.ActionSpecificationList[i])+
'</p>'
}
$(".gui-code-result").html(lHTMLData)
}
///Выполнить импорт спецификации из JSON
mGlobal.CodeList.fActionSpecificationImportFromJSON=function() {
mGlobal.ActionSpecificationList=JSON.parse($(".ui.modal.openrpa-code-list-gui-import-modal textarea")[0].value)
///Обновить список на странице
mGlobal.CodeList.fRender()
}
///Выполнить действие
mGlobal.GUIActionRun = function () {
var lActionName =$('.dropdown.gui-action .selected')[0].attributes['data-value'].value
var lActionElementSpecification = $('.rpa-gui-selector')[0].value
var lActionArgumentList = $('.rpa-argument-list')[0].value
if (lActionArgumentList=="") lActionArgumentList="[]"
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementRunAction","argsArray":['+lActionElementSpecification+',"'+lActionName+'",'+lActionArgumentList+']}',
success:
function(lData,l2,l3)
{
var lDataJSON=JSON.parse(lData)
$(".gui-result").html(lDataJSON.outputObject)
///Показать ошибку, если таковая возникла
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
// fix main menu to page on passing
$('.main.menu').visibility({
type: 'fixed'
});
$('.overlay').visibility({
type: 'fixed',
offset: 80
});
// lazy load images
$('.image').visibility({
type: 'image',
transition: 'vertical flip in',
duration: 500
});
// show dropdown on hover
$('.main.menu .ui.dropdown').dropdown({
on: 'hover'
});
mGlobal.GUIRefreshTree=function()
{
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementGetChildElementList","argsArray":[[]]}',
success:
function(lData,l2,l3)
{
var lResponseJSON=JSON.parse(lData)
///Очистить дерево
mGlobal.ElementTree.fClear();
///Прогрузить новое дерево
mGlobal.ElementTree.fRender(lResponseJSON.outputObject);
///Показать ошибку, если таковая возникла
if (lResponseJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lResponseJSON.Error);
}
},
dataType: "text"
});
}
mGlobal.GUIRefreshTree();
mGlobal.ShowModal=function(inHeaderText,inMessageText)
{
//Установка заголовка
$('.ui.basic.modal div.header').html(inHeaderText);
//Установка текста
$('.ui.basic.modal div.content p').html(inMessageText);
//Активация модального окна
$('.ui.basic.modal').modal('show');
}
})
;
</script>
<style type="text/css">
body {
background-color: #FFFFFF;
}
.main.container {
margin-top: 2em;
}
.overlay {
float: left;
margin: 0em 3em 1em 0em;
}
.overlay .menu {
position: relative;
left: 0;
transition: left 0.5s ease;
}
.main.menu.fixed {
background-color: #FFFFFF;
border: 1px solid #DDD;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}
.overlay.fixed .menu {
left: 800px;
}
.text.container .left.floated.image {
margin: 2em 2em 2em -4em;
}
.text.container .right.floated.image {
margin: 2em -4em 2em 2em;
}
.ui.footer.segment {
margin: 5em 0em 0em;
padding: 5em 0em;
}
</style>
</head>
<body>
<div class="ui internally celled grid">
<div class="row black">
<div class="two wide column">
<h1 class="ui header inverted">OpenRPA</h1>
</div>
<div class="twelve wide column">
</div>
<div class="two wide column">
<h5>by UnicodeLabs</h5>
</div>
</div>
<div class="row">
<div class="six wide column rpa-object-tree" >
</div>
<div class="six wide column rpa-hierarchy" >
<p>This example shows how to use lazy loaded images, a sticky menu, and a simple text container</p>
</div>
<div class="four wide column rpa-property-list" >
</div>
</div>
<div class="row black">
<div class="two wide column">
<button class="ui button grey labeled icon mini" onclick="mGlobal.GUIRefreshTree()">
<i class="up refresh icon"></i>
Refresh tree
</button>
</div>
<div class="two wide column">
<button class="ui button grey labeled icon mini">
<i class="up arrow icon"></i>
From
</button>
</div>
<div class="two wide column">
<button class="ui button grey labeled icon mini">
<i class="down arrow icon"></i>
To
</button>
</div>
<div class="ten wide column">
</div>
</div>
<div class="row">
<div class="eight wide column">
<div class="ui tiny header">Edit GUI selector</div>
<textarea style="width:100%; font-size:12pt" class="rpa-gui-selector" rows="6" cols="60"></textarea>
<button class="large ui blue button rpa-action-highlight" onclick="mGlobal.ElementHighlightNewGUISelectorString($('.rpa-gui-selector')[0].value);">Highlight element</button>
<button class="large ui grey button rpa-action-validate" onclick="mGlobal.ElementValidateGUISelectorString($('.rpa-gui-selector')[0].value);">Validate element</button>
<div class="ui tiny header">Validate Result</div>
<div class="content openrpa-validate-result divided list" style="overflow:scroll; height: 100px;"></div>
</div>
<div class="eight wide column">
<div class="ui tiny header">Select action</div>
<button class="ui button blue labeled icon" onclick="mGlobal.GUIActionLoadList();">
<i class="right arrow icon"></i>
Load actions
</button>
<div class="ui search selection dropdown gui-action" style="width:410px;">
<input type="hidden" name="country">
<i class="dropdown icon"></i>
<div class="default text">Select action</div>
<div class="menu">
</div>
</div>
<div class="ui tiny header">Set arguments</div>
<div class="ui input" style="width:500px;">
<input type="text" placeholder="[GUAActionArg1, GUAActionArg2...]" class="rpa-argument-list">
</div>
<p></p>
<button class="large ui green button" onclick="mGlobal.GUIActionRun();">Run action</button>
<button class="large ui grey button" onclick="mGlobal.GUIActionAddToList();">+ Code list</button>
<div class="ui tiny header">Result</div>
<div class="content gui-result"></div>
</div>
</div>
<div class="row black">
<div class="sixteen wide column">
</div>
</div>
<div class="row">
<div class="eight wide column">
<div class="ui tiny header">Additional actions</div>
<div class="content gui-code-list-run-result"></div>
<button class="large ui pink button" onclick="mGlobal.GUIActionWaitAddToList();">Wait element 60s: add to list</button>
<button class="large ui pink button" onclick="mGlobal.GUIActionSleep2sAddToList();">Sleep 2s: add to list</button>
</div>
<div class="eight wide column">
<div class="ui tiny header">Code list</div>
<div class="content gui-code-result"></div>
<button class="large ui green button" onclick="mGlobal.GUICodeListRun();">Run code list</button>
<button class="large ui pink button" onclick="$('.ui.modal.openrpa-code-list-gui-import-modal textarea')[0].value=''; $('.ui.modal.openrpa-code-list-gui-import-modal').modal('show');">Import from JSON</button>
<button class="large ui blue button openrpa-save-to-clipboard" onclick="mGlobal.ClipboardSet(JSON.stringify(mGlobal.ActionSpecificationList)); alert('Saved to clipboard!')">Export JSON to clipboard</button>
</div>
</div>
</div>
<div class="ui inverted vertical footer segment">
<div class="ui center aligned container">
<div class="ui stackable inverted divided grid">
<div class="three wide column">
<h4 class="ui inverted header">Pywinauto</h4>
<div class="ui inverted link list">
<a href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.findwindows.html" class="item" target="_blank">Specification manual</a>
<a href="https://pywinauto.readthedocs.io/en/latest/code/code.html#main-user-modules" class="item" target="_blank">Classes manual</a>
<a href="https://pywinauto.readthedocs.io/en/latest/code/code.html#main-user-modules" class="item" target="_blank">How to use manual</a>
<a href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html" class="item" target="_blank">Base wrapper manual</a>
</div>
</div>
<div class="three wide column">
<h4 class="ui inverted header">Semantic UI</h4>
<div class="ui inverted link list">
<a href="https://semantic-ui.com/usage/theming.html" class="item" target="_blank">Color manual</a>
<a href="https://semantic-ui.com/elements/input.html" class="item" target="_blank">Input manual</a>
<a href="https://semantic-ui.com/elements/icon.html" class="item" target="_blank">Icon list</a>
<a href="https://semantic-ui.com/elements/button.html" class="item" target="_blank">Button manual</a>
</div>
</div>
<div class="three wide column">
<h4 class="ui inverted header">GitLab</h4>
<div class="ui inverted link list">
<a href="https://gitlab.com/UnicodeLabs/OpenRPA" class="item" target="_blank">OpenRPA repository</a>
<a href="https://gitlab.com/UnicodeLabs" class="item" target="_blank">UnicodeLabs</a>
<a href="#" class="item">Link -</a>
<a href="#" class="item">Link -</a>
</div>
</div>
<div class="seven wide column">
<h4 class="ui inverted header">OpenRPA</h4>
<p>Open source Robotic Process Automation software by the Unicode Labs (Created by Ivan Maslov). Under the MIT license.</p>
</div>
</div>
<div class="ui inverted section divider"></div>
<div class="ui horizontal inverted small divided link list">
<a class="item" href="#">Site Map</a>
<a class="item" href="#">Contact Us</a>
<a class="item" href="#">Terms and Conditions</a>
<a class="item" href="#">Privacy Policy</a>
</div>
</div>
</div>
<div class="ui basic modal">
<div class="ui icon header">
</div>
<div class="content">
<p>Here is the message text!</p>
</div>
<div class="actions">
<div class="ui red basic cancel inverted button">
<i class="remove icon"></i>
No
</div>
<div class="ui green ok inverted button">
<i class="checkmark icon"></i>
Yes
</div>
</div>
</div>
<div class="ui modal openrpa-code-list-gui-import-modal">
<i class="close icon"></i>
<div class="header">
Code list import
</div>
<div class="content">
<div class="description">
<div class="ui header">Insert your JSON specification here.</div>
<p><textarea style="width:100%" rows="6" cols="60"></textarea></p>
</div>
</div>
<div class="actions">
<div class="ui black deny button">
Cancel
</div>
<div class="ui positive right labeled icon button" onclick="mGlobal.CodeList.fActionSpecificationImportFromJSON();">
Parse
<i class="checkmark icon"></i>
</div>
</div>
</div>
</body>
</html>

@ -1,326 +0,0 @@
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<title>OpenRPA</title>
<link rel="stylesheet" type="text/css" href="3rdParty/Semantic-UI-CSS-master/semantic.min.css">
<script
src="3rdParty/jQuery/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="3rdParty/Semantic-UI-CSS-master/semantic.min.js"></script>
<script>
var mGlobal={}
$(document)
.ready(function() {
mGlobal.GUIElement={}
mGlobal.GenerateUniqueID=function(inPrefix="ID") {
return inPrefix+Math.round(Math.random()*1000)+"-"+Math.round(Math.random()*10000)+"-"+Math.round(Math.random()*1000)
}
mGlobal.TreeLoadSubTree =function (inElementId) {
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementGetChildElementList","argsArray":['+JSON.stringify(lSpecificationArray)+']}',
success:
function(lData,l2,l3)
{
var lHTMLTree='<div class="ui list">'
var lResponseJSON=JSON.parse(lData)
for (i=0;i<lResponseJSON.outputObject.length;i++) {
var lElementId = mGlobal.GenerateUniqueID()
var lSubItemHandleId=lResponseJSON.outputObject[i].handle;
var lSubItemActionOnClick=' onclick="mGlobal.TreeLoadSubTree(\''+lElementId+'\');" '
var lSubItemActionOnRightClick=' oncontextmenu="mGlobal.ElementHighlightNew(\''+lElementId+'\');" '
lHTMLTree+='\
<div class="item handle_'+lSubItemHandleId+'" handle_id="'+lSubItemHandleId+'" id="'+lElementId+'">\
<i class="folder icon"></i>\
<div class="content">\
<div class="header" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>'+lResponseJSON.outputObject[i].name+'</div>\
<div class="description" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>process_id:'+lResponseJSON.outputObject[i].process_id+'; handle:'+lSubItemHandleId+'; class_name: '+lResponseJSON.outputObject[i].class_name+'; RECT:L'+lResponseJSON.outputObject[i].rectangle.left+' T'+lResponseJSON.outputObject[i].rectangle.top+' R'+lResponseJSON.outputObject[i].rectangle.right+' B'+lResponseJSON.outputObject[i].rectangle.bottom+'</div>\
</div>\
</div>'
//Добавить информацию об элементе в словарь JS
mGlobal.GUIElement[lElementId]={};
mGlobal.GUIElement[lElementId]['GUISelectorLocal']=lResponseJSON.outputObject[i]
mGlobal.GUIElement[lElementId]['GUISelectorFull']=Array.from(lSpecificationArray);
mGlobal.GUIElement[lElementId]['GUISelectorFull'].push(lResponseJSON.outputObject[i])
}
lHTMLTree+='</div>'
$(".ui.main.text.container #"+inElementId+" .content").append(lHTMLTree)
},
dataType: "text"
});
}
mGlobal.ElementHighlight =function (inHandleId) {
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementRunAction","argsArray":[[{"handle":'+inHandleId+'}],"draw_outline"]}',
success:
function(lData,l2,l3)
{
console.log('Success handle:'+inHandleId)
},
dataType: "text"
});
}
mGlobal.ElementHighlightNew =function (inElementId) {
//Подгрузка массива спецификаций
lSpecificationArray = mGlobal.GUIElement[inElementId].GUISelectorFull
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementDrawOutlineNew","argsArray":['+JSON.stringify(lSpecificationArray)+']}',
success:
function(lData,l2,l3)
{
lDataJSON=JSON.parse(lData);
if (lDataJSON.hasOwnProperty("Error")) {
mGlobal.ShowModal("GUI Error",lDataJSON.Error);
}
},
dataType: "text"
});
}
// fix main menu to page on passing
$('.main.menu').visibility({
type: 'fixed'
});
$('.overlay').visibility({
type: 'fixed',
offset: 80
});
// lazy load images
$('.image').visibility({
type: 'image',
transition: 'vertical flip in',
duration: 500
});
// show dropdown on hover
$('.main.menu .ui.dropdown').dropdown({
on: 'hover'
});
///Загрузка данных
$.ajax({
type: "POST",
url: 'GUIAction',
data: '{"functionName":"ElementGetChildElementList","argsArray":[[]]}',
success:
function(lData,l2,l3)
{
var lHTMLTree='<div class="ui list">'
var lResponseJSON=JSON.parse(lData)
for (i=0;i<lResponseJSON.outputObject.length;i++) {
var lElementId = mGlobal.GenerateUniqueID()
var lSubItemHandleId=lResponseJSON.outputObject[i].handle;
var lSubItemActionOnClick=' onclick="mGlobal.TreeLoadSubTree(\''+lElementId+'\');" '
var lSubItemActionOnRightClick=' oncontextmenu="mGlobal.ElementHighlightNew(\''+lElementId+'\');" '
lHTMLTree+='\
<div class="item handle_'+lSubItemHandleId+'" handle_id="'+lSubItemHandleId+'" id="'+lElementId+'">\
<i class="folder icon"></i>\
<div class="content">\
<div class="header" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>'+lResponseJSON.outputObject[i].name+'</div>\
<div class="description" '+lSubItemActionOnClick+lSubItemActionOnRightClick+'>process_id:'+lResponseJSON.outputObject[i].process_id+'; handle:'+lSubItemHandleId+'; class_name: '+lResponseJSON.outputObject[i].class_name+'; RECT:L'+lResponseJSON.outputObject[i].rectangle.left+' T'+lResponseJSON.outputObject[i].rectangle.top+' R'+lResponseJSON.outputObject[i].rectangle.right+' B'+lResponseJSON.outputObject[i].rectangle.bottom+'</div>\
</div>\
</div>'
//Добавить информацию об элементе в словарь JS
mGlobal.GUIElement[lElementId]={};
mGlobal.GUIElement[lElementId]['GUISelectorLocal']=lResponseJSON.outputObject[i]
mGlobal.GUIElement[lElementId]['GUISelectorFull']=[lResponseJSON.outputObject[i]]
}
lHTMLTree+='</div>'
$(".ui.main.text.container").append(lHTMLTree);
},
dataType: "text"
});
mGlobal.ShowModal=function(inHeaderText,inMessageText)
{
//Установка заголовка
$('.ui.basic.modal div.header').html(inHeaderText);
//Установка текста
$('.ui.basic.modal div.content p').html(inMessageText);
//Активация модального окна
$('.ui.basic.modal').modal('show');
}
})
;
</script>
<style type="text/css">
body {
background-color: #FFFFFF;
}
.main.container {
margin-top: 2em;
}
.main.menu {
margin-top: 4em;
border-radius: 0;
border: none;
box-shadow: none;
transition:
box-shadow 0.5s ease,
padding 0.5s ease
;
}
.main.menu .item img.logo {
margin-right: 1.5em;
}
.overlay {
float: left;
margin: 0em 3em 1em 0em;
}
.overlay .menu {
position: relative;
left: 0;
transition: left 0.5s ease;
}
.main.menu.fixed {
background-color: #FFFFFF;
border: 1px solid #DDD;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}
.overlay.fixed .menu {
left: 800px;
}
.text.container .left.floated.image {
margin: 2em 2em 2em -4em;
}
.text.container .right.floated.image {
margin: 2em -4em 2em 2em;
}
.ui.footer.segment {
margin: 5em 0em 0em;
padding: 5em 0em;
}
</style>
</head>
<body>
<body>
<div class="ui main text container">
<h1 class="ui header">Sticky Example</h1>
<div class="ui three wide column">
<h4 class="ui inverted header">Group 1</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
<a href="#" class="item">Link Three</a>
<a href="#" class="item">Link Four</a>
</div>
</div>
<p>This example shows how to use lazy loaded images, a sticky menu, and a simple text container</p>
</div>
<div class="ui borderless main menu">
<div class="ui text container">
<div class="header item">
Project Name
</div>
<a href="#" class="item">Blog</a>
<a href="#" class="item">Articles</a>
<a href="#" class="ui right floated dropdown item">
Dropdown <i class="dropdown icon"></i>
<div class="menu">
<div class="item">Link Item</div>
<div class="item">Link Item</div>
<div class="divider"></div>
<div class="header">Header Item</div>
<div class="item">
<i class="dropdown icon"></i>
Sub Menu
<div class="menu">
<div class="item">Link Item</div>
<div class="item">Link Item</div>
</div>
</div>
<div class="item">Link Item</div>
</div>
</a>
</div>
</div>
<div class="ui inverted vertical footer segment">
<div class="ui center aligned container">
<div class="ui stackable inverted divided grid">
<div class="three wide column">
<h4 class="ui inverted header">Group 1</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
<a href="#" class="item">Link Three</a>
<a href="#" class="item">Link Four</a>
</div>
</div>
<div class="three wide column">
<h4 class="ui inverted header">Group 2</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
<a href="#" class="item">Link Three</a>
<a href="#" class="item">Link Four</a>
</div>
</div>
<div class="three wide column">
<h4 class="ui inverted header">Group 3</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
<a href="#" class="item">Link Three</a>
<a href="#" class="item">Link Four</a>
</div>
</div>
<div class="seven wide column">
<h4 class="ui inverted header">Footer Header</h4>
<p>Extra space for a call to action inside the footer that could help re-engage users.</p>
</div>
</div>
<div class="ui inverted section divider"></div>
<div class="ui horizontal inverted small divided link list">
<a class="item" href="#">Site Map</a>
<a class="item" href="#">Contact Us</a>
<a class="item" href="#">Terms and Conditions</a>
<a class="item" href="#">Privacy Policy</a>
</div>
</div>
</div>
<div class="ui basic modal">
<div class="ui icon header">
</div>
<div class="content">
<p>Here is the message text!</p>
</div>
<div class="actions">
<div class="ui red basic cancel inverted button">
<i class="remove icon"></i>
No
</div>
<div class="ui green ok inverted button">
<i class="checkmark icon"></i>
Yes
</div>
</div>
</div>
</body>
</html>

@ -1,3 +0,0 @@
cd %~dp0
.\..\Resources\WPy32-3720\python-3.7.2\python.exe daemon.py
pause >nul

@ -1,3 +0,0 @@
cd %~dp0
.\..\Resources\WPy32-3720\python-3.7.2\python.exe
pause >nul

@ -1,230 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<!-- Standard Meta -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!-- Site Properties -->
<title>Sticky Example - Semantic</title>
<link rel="stylesheet" type="text/css" href="../dist/components/reset.css">
<link rel="stylesheet" type="text/css" href="../dist/components/site.css">
<link rel="stylesheet" type="text/css" href="../dist/components/container.css">
<link rel="stylesheet" type="text/css" href="../dist/components/grid.css">
<link rel="stylesheet" type="text/css" href="../dist/components/header.css">
<link rel="stylesheet" type="text/css" href="../dist/components/image.css">
<link rel="stylesheet" type="text/css" href="../dist/components/menu.css">
<link rel="stylesheet" type="text/css" href="../dist/components/divider.css">
<link rel="stylesheet" type="text/css" href="../dist/components/list.css">
<link rel="stylesheet" type="text/css" href="../dist/components/segment.css">
<link rel="stylesheet" type="text/css" href="../dist/components/dropdown.css">
<link rel="stylesheet" type="text/css" href="../dist/components/icon.css">
<link rel="stylesheet" type="text/css" href="../dist/components/transition.css">
<script src="assets/library/jquery.min.js"></script>
<script src="../dist/components/transition.js"></script>
<script src="../dist/components/dropdown.js"></script>
<script src="../dist/components/visibility.js"></script>
<script>
$(document)
.ready(function() {
// fix main menu to page on passing
$('.main.menu').visibility({
type: 'fixed'
});
$('.overlay').visibility({
type: 'fixed',
offset: 80
});
// lazy load images
$('.image').visibility({
type: 'image',
transition: 'vertical flip in',
duration: 500
});
// show dropdown on hover
$('.main.menu .ui.dropdown').dropdown({
on: 'hover'
});
})
;
</script>
<style type="text/css">
body {
background-color: #FFFFFF;
}
.main.container {
margin-top: 2em;
}
.main.menu {
margin-top: 4em;
border-radius: 0;
border: none;
box-shadow: none;
transition:
box-shadow 0.5s ease,
padding 0.5s ease
;
}
.main.menu .item img.logo {
margin-right: 1.5em;
}
.overlay {
float: left;
margin: 0em 3em 1em 0em;
}
.overlay .menu {
position: relative;
left: 0;
transition: left 0.5s ease;
}
.main.menu.fixed {
background-color: #FFFFFF;
border: 1px solid #DDD;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}
.overlay.fixed .menu {
left: 800px;
}
.text.container .left.floated.image {
margin: 2em 2em 2em -4em;
}
.text.container .right.floated.image {
margin: 2em -4em 2em 2em;
}
.ui.footer.segment {
margin: 5em 0em 0em;
padding: 5em 0em;
}
</style>
</head>
<body>
<div class="ui main text container">
<h1 class="ui header">Sticky Example</h1>
<p>This example shows how to use lazy loaded images, a sticky menu, and a simple text container</p>
</div>
<div class="ui borderless main menu">
<div class="ui text container">
<div class="header item">
<img class="logo" src="assets/images/logo.png">
Project Name
</div>
<a href="#" class="item">Blog</a>
<a href="#" class="item">Articles</a>
<a href="#" class="ui right floated dropdown item">
Dropdown <i class="dropdown icon"></i>
<div class="menu">
<div class="item">Link Item</div>
<div class="item">Link Item</div>
<div class="divider"></div>
<div class="header">Header Item</div>
<div class="item">
<i class="dropdown icon"></i>
Sub Menu
<div class="menu">
<div class="item">Link Item</div>
<div class="item">Link Item</div>
</div>
</div>
<div class="item">Link Item</div>
</div>
</a>
</div>
</div>
<div class="ui text container">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<div class="overlay">
<div class="ui labeled icon vertical menu">
<a class="item"><i class="twitter icon"></i> Tweet</a>
<a class="item"><i class="facebook icon"></i> Share</a>
<a class="item"><i class="mail icon"></i> E-mail</a>
</div>
</div>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<img class="ui medium left floated image" data-src="assets/images/wireframe/square-image.png">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
<img class="ui medium right floated image" data-src="assets/images/wireframe/square-image.png">
Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<img class="ui medium left floated image" data-src="assets/images/wireframe/square-image.png">
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
<img class="ui medium right floated image" data-src="assets/images/wireframe/square-image.png">
Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
</div>
<div class="ui inverted vertical footer segment">
<div class="ui center aligned container">
<div class="ui stackable inverted divided grid">
<div class="three wide column">
<h4 class="ui inverted header">Group 1</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
<a href="#" class="item">Link Three</a>
<a href="#" class="item">Link Four</a>
</div>
</div>
<div class="three wide column">
<h4 class="ui inverted header">Group 2</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
<a href="#" class="item">Link Three</a>
<a href="#" class="item">Link Four</a>
</div>
</div>
<div class="three wide column">
<h4 class="ui inverted header">Group 3</h4>
<div class="ui inverted link list">
<a href="#" class="item">Link One</a>
<a href="#" class="item">Link Two</a>
<a href="#" class="item">Link Three</a>
<a href="#" class="item">Link Four</a>
</div>
</div>
<div class="seven wide column">
<h4 class="ui inverted header">Footer Header</h4>
<p>Extra space for a call to action inside the footer that could help re-engage users.</p>
</div>
</div>
<div class="ui inverted section divider"></div>
<img src="assets/images/logo.png" class="ui centered mini image">
<div class="ui horizontal inverted small divided link list">
<a class="item" href="#">Site Map</a>
<a class="item" href="#">Contact Us</a>
<a class="item" href="#">Terms and Conditions</a>
<a class="item" href="#">Privacy Policy</a>
</div>
</div>
</div>
</body>
</html>

@ -1,6 +0,0 @@
Winpython 320 portable module dependencies
pip install pypiwin32
pip install pywinauto
run from root folder
.\WPy32-3720\python-3.7.2\python.exe daemon.py

@ -1,295 +0,0 @@
from http.server import BaseHTTPRequestHandler, HTTPServer
import pdb
import pywinauto
import json
import subprocess
import zlib
import os
#ProcessChildSendString
def ProcessChildSendString(lProcess,lString):
lByteString = zlib.compress(lString.encode("utf-8"))
#Вернуть потенциальные \n
lByteString = lByteString.replace(b'\n',b'{{n}}')
#Отправить сообщение в дочерний процесс
lProcess.stdin.write(lByteString+bytes('\n',"utf-8"))
#print(str(lByteString+bytes('\n',"utf-8")))
lProcess.stdin.flush()
#Вернуть результат
return
#ProcessChildReadWaitString
def ProcessChildReadWaitString(lProcess):
#Ожидаем ответ от процесса
lResult = lProcess.stdout.readline()
#Обработка спец символов
#print(b'NewLine: '+lResult)
#Вернуть потенциальные \n
lResult = lResult.replace(b'{{{n}}}',b'\n')
#Вернуть \r
lResult = lResult.replace(b'{{{r}}}',b'\r')
#Вернуть \0
lResult = lResult.replace(b'{{{0}}}',b'\0')
#Вернуть \a
lResult = lResult.replace(b'{{{a}}}',b'\a')
#Вернуть \b
lResult = lResult.replace(b'{{{b}}}',b'\b')
#Вернуть \t
lResult = lResult.replace(b'{{{t}}}',b'\t')
#Вернуть \v
lResult = lResult.replace(b'{{{v}}}',b'\v')
#Вернуть \f
lResult = lResult.replace(b'{{{f}}}',b'\f')
#print("check")
#print(str(lResult))
lResult = zlib.decompress(lResult[0:-1])
lResult = lResult.decode("utf-8")
#Вернуть результат
return lResult
#ProcessChildSendObject
def ProcessChildSendObject(inProcess,inObject):
#Выполнить отправку сконвертированного объекта в JSON
ProcessChildSendString(inProcess,json.dumps(inObject))
return
#ProcessChildReadWaitObject
def ProcessChildReadWaitObject(inProcess):
#Выполнить получение и разбор объекта
lResult=json.loads(ProcessChildReadWaitString(inProcess));
return lResult;
#ProcessChildSendReadWaitString
def ProcessChildSendReadWaitString(lProcess,lString):
ProcessChildSendString(lProcess,lString)
#Вернуть результат
return ProcessChildReadWaitString(lProcess)
#ProcessChildSendReadWaitObject
def ProcessChildSendReadWaitObject(inProcess,inObject):
ProcessChildSendObject(inProcess,inObject)
#Вернуть результат
return ProcessChildReadWaitString(inProcess)
#pywinauto
def checkBitnessIs64():
lResult=True
return lResult;
def GetControl(inControlSpecificationArray):
#Выполнить идентификацию объектов, если передан массив
lResultList=[];
if len(inControlSpecificationArray) > 0:
#Выполнить подключение к объекту
lRPAApplication = pywinauto.Application()
#Проверка разрядности
lRPAApplication.connect(**inControlSpecificationArray[0])
lTempObject=lRPAApplication.window(**inControlSpecificationArray[0])
#Циклическое прохождение к недрам объекта
for lWindowSpecification in inControlSpecificationArray[1:]:
lTempObject=lTempObject.window(**lWindowSpecification)
#Получить инфо объект
lTempObjectInfo = lTempObject.wrapper_object().element_info
#Добавить информацию об обнаруженом объекте
lResultList.append({"name":lTempObjectInfo.name, "rich_text":lTempObjectInfo.rich_text, "process_id":lTempObjectInfo.process_id,"handle":lTempObjectInfo.handle});
return lResultList
def GetChildControls(inControlSpecificationArray):
#Выполнить идентификацию объектов, если передан массив
lResultList=[];
if len(inControlSpecificationArray) > 0:
#Выполнить подключение к объекту
lRPAApplication = pywinauto.Application()
lRPAApplication.connect(**inControlSpecificationArray[0])
lTempObject=lRPAApplication.window(**inControlSpecificationArray[0])
#Циклическое прохождение к недрам объекта
for lWindowSpecification in inControlSpecificationArray[1:]:
lTempObject=lTempObject.window(**lWindowSpecification)
#Получить инфо объект
lTempObjectInfo = lTempObject.wrapper_object().element_info
#Добавить информацию об обнаруженом объекте
lResultList.append({"name":lTempObjectInfo.name, "rich_text":lTempObjectInfo.rich_text, "process_id":lTempObjectInfo.process_id,"handle":lTempObjectInfo.handle});
return lResultList
def GetWindowList(inWindowSpecificationArray = []):
#Выполнить идентификацию объектов, если передан массив
lResultList={};
if len(inWindowSpecificationArray) > 0:
#Выполнить подключение к объекту
lRPAApplication = pywinauto.Application()
lTempObject=lRPAApplication.connect(**inWindowSpecificationArray[0])
#Циклическое прохождение к недрам объекта
for lWindowSpecification in inWindowSpecificationArray[1:]:
lTempObject=lTempObject.window(**lWindowSpecification)
lTempObjectInfo = lTempObject.wrapper_object().element_info
lResultList2.append({"name":lTempObjectInfo.name, "rich_text":lTempObjectInfo.rich_text, "process_id":lTempObjectInfo.process_id,"handle":lTempObjectInfo.handle});
#Получить список объектов
lResultList=pywinauto.findwindows.find_elements()
else:
#Получить список объектов
lResultList=pywinauto.findwindows.find_elements()
lResultList2=[]
for lI in lResultList:
lResultList2.append({"name":lI.name, "rich_text":lI.rich_text, "process_id":lI.process_id,"handle":lI.handle});
return lResultList2
# HTTPRequestHandler class
class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
#ResponseContentTypeFile
def SendResponseContentTypeFile(self,inContentType,inFilePath):
# Send response status code
self.send_response(200)
# Send headers
self.send_header('Content-type',inContentType)
self.end_headers()
lFileObject = open(inFilePath, "rb")
# Write content as utf-8 data
self.wfile.write(lFileObject.read())
#Закрыть файловый объект
lFileObject.close()
# GET
def do_GET(self):
#Мост между файлом и http запросом (новый формат)
if self.path == "/":
self.SendResponseContentTypeFile('text/html',"Index.xhtml")
#Мост между файлом и http запросом (новый формат)
if self.path == '/3rdParty/Semantic-UI-CSS-master/semantic.min.css':
self.SendResponseContentTypeFile('text/css',"..\\Resources\\Web\\Semantic-UI-CSS-master\\semantic.min.css")
#Мост между файлом и http запросом (новый формат)
if self.path == '/3rdParty/Semantic-UI-CSS-master/semantic.min.js':
self.SendResponseContentTypeFile('application/javascript',"..\\Resources\\Web\\Semantic-UI-CSS-master\\semantic.min.js")
#Мост между файлом и http запросом (новый формат)
if self.path == '/3rdParty/jQuery/jquery-3.1.1.min.js':
self.SendResponseContentTypeFile('application/javascript',"..\\Resources\\Web\\jQuery\\jquery-3.1.1.min.js")
#Мост между файлом и http запросом (новый формат)
if self.path == '/3rdParty/Google/LatoItalic.css':
self.SendResponseContentTypeFile('font/css',"..\\Resources\\Web\\Google\\LatoItalic.css")
#Мост между файлом и http запросом (новый формат)
if self.path == '/3rdParty/Semantic-UI-CSS-master/themes/default/assets/fonts/icons.woff2':
self.SendResponseContentTypeFile('font/woff2',"..\\Resources\\Web\\Semantic-UI-CSS-master\\themes\\default\\assets\\fonts\\icons.woff2")
#Мост между файлом и http запросом (новый формат)
if self.path == '/favicon.ico':
self.SendResponseContentTypeFile('image/x-icon',"favicon.ico")
#Action ObjectInspector GetObjectList
if self.path == '/ObjectDetector/JSONGetWindowList':
#ReadRequest
#lInputByteArray=self.rfile.read()
#print(str(len(os.stat(self.rfile).st_size)))
# Send response status code
self.send_response(200)
# Send headers
self.send_header('Content-type','application/json')
self.end_headers()
# Send message back to client
#{'functionName':'', 'argsArray':[]}
lRequestObject={'functionName':'ElementGetChildElementList','argsArray':[]}
#Отправить запрос в дочерний процесс, который отвечает за работу с Windows окнами
ProcessChildSendObject(p,lRequestObject)
#Получить ответ от дочернего процесса
lResponseObject=ProcessChildReadWaitObject(p)
message = json.dumps(lResponseObject)
# Write content as utf-8 data
self.wfile.write(bytes(message, "utf8"))
# POST
def do_POST(self):
#Action ObjectInspector GetObjectList
if self.path == '/ObjectDetector/JSONGetWindowListArgs':
#ReadRequest
lInputByteArrayLength = int(self.headers.get('Content-Length'))
lInputByteArray=self.rfile.read(lInputByteArrayLength)
#Превращение массива байт в объект
print(lInputByteArray.decode('utf8'))
lInputObject=json.loads(lInputByteArray.decode('utf8'))
# Send response status code
self.send_response(200)
# Send headers
self.send_header('Content-type','application/json')
self.end_headers()
# Send message back to client
#{'functionName':'', 'argsArray':[]}
lRequestObject={'functionName':'ElementGetChildElementList','argsArray':lInputObject}
#Отправить запрос в дочерний процесс, который отвечает за работу с Windows окнами
ProcessChildSendObject(p,lRequestObject)
#Получить ответ от дочернего процесса
lResponseObject=ProcessChildReadWaitObject(p)
print(str(lResponseObject))
message = json.dumps(lResponseObject)
# Write content as utf-8 data
self.wfile.write(bytes(message, "utf8"))
if self.path == '/GUIAction':
#ReadRequest
lInputByteArrayLength = int(self.headers.get('Content-Length'))
lInputByteArray=self.rfile.read(lInputByteArrayLength)
#Превращение массива байт в объект
lInputObject=json.loads(lInputByteArray.decode('utf8'))
# Send response status code
self.send_response(200)
# Send headers
self.send_header('Content-type','application/json')
self.end_headers()
# Send message back to client
#{'functionName':'', 'argsArray':[]}
#pdb.set_trace()
lRequestObject=lInputObject
#Отправить запрос в дочерний процесс, который отвечает за работу с Windows окнами
ProcessChildSendObject(p,lRequestObject)
#Получить ответ от дочернего процесса
lResponseObject=ProcessChildReadWaitObject(p)
message = json.dumps(lResponseObject)
# Write content as utf-8 data
self.wfile.write(bytes(message, "utf8"))
if self.path == '/GUIActionList':
#ReadRequest
lInputByteArrayLength = int(self.headers.get('Content-Length'))
lInputByteArray=self.rfile.read(lInputByteArrayLength)
#Превращение массива байт в объект
lInputObject=json.loads(lInputByteArray.decode('utf8'))
# Send response status code
self.send_response(200)
# Send headers
self.send_header('Content-type','application/json')
self.end_headers()
# Send message back to client
#{'functionName':'', 'argsArray':[]}
lRequestObject=lInputObject
lOutputObject=[]
#pdb.set_trace()
#Циклическая отправка запросов в дочерний объект
for lItem in lRequestObject:
#Отправить запрос в дочерний процесс, который отвечает за работу с Windows окнами
ProcessChildSendObject(p,lItem)
#Получить ответ от дочернего процесса
lResponseObject=ProcessChildReadWaitObject(p)
#Добавить в выходной массив
lOutputObject.append(lResponseObject)
#Сформировать текстовый ответ
message = json.dumps(lOutputObject)
# Write content as utf-8 data
self.wfile.write(bytes(message, "utf8"))
return
def run():
print('starting server...')
# Server settings
# Choose port 8080, for port 80, which is normally used for a http server, you need root access
server_address = ('127.0.0.1', 8081)
httpd = HTTPServer(server_address, testHTTPServer_RequestHandler)
print('running server...')
httpd.serve_forever()
#Start childprocess 32 bit
p = subprocess.Popen(['..\\Resources\\WPy32-3720\\python-3.7.2\\python.exe','winGUI.py'],stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
#print(ChildProcessReadWaitString(p))
run()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

@ -1,21 +0,0 @@
#valueVerify
#inTypeClass int, str, dict, list, NoneType
def valueVerify(inValue,inTypeClass,inNotValidValue):
lResult = inNotValidValue
if inValue is not None:
if type(inValue) == inTypeClass:
lResult = inValue
#Вернуть результат
return lResult
#valueVerifyDict
def valueVerifyDict(inDict,inKey,inTypeClass,inNotValidValue):
lResult = inNotValidValue
if inKey in inDict:
lResult = valueVerify(inDict[inKey],inTypeClass,inNotValidValue)
return lResult
#valueVerifyList
def valueVerifyList(inList,inIndex,inTypeClass,inNotValidValue):
lResult = inNotValidValue
if inIndex in inList:
lResult = valueVerify(inList[inIndex],inTypeClass,inNotValidValue)
return lResult

@ -1,137 +0,0 @@
import json
import subprocess
import zlib
import os
############################################
####Межпроцессное взаимодействие
############################################
#ProcessParentReadWaitString
def ProcessParentReadWaitString():
#Выполнить чтение строки
#ctypes.windll.user32.MessageBoxW(0, "Hello", "Your title", 1)
lResult = sys.stdin.buffer.readline()
#Вернуть потенциальные \n
lResult = lResult.replace(b'{{n}}',b'\n')
lResult = zlib.decompress(lResult[0:-1])
lResult = lResult.decode("utf-8")
#Вернуть результат
return lResult
#ParentProcessWriteString
def ProcessParentWriteString(lString):
lByteString = zlib.compress(lString.encode("utf-8"))
#Выполнить отправку строки в родительский процесс
#Вернуть потенциальные \n
lByteString = lByteString.replace(b'\n',b'{{{n}}}')
#Вернуть \r
lByteString = lByteString.replace(b'\r',b'{{{r}}}')
#Вернуть \0
lByteString = lByteString.replace(b'\0',b'{{{0}}}')
#Вернуть \a
lByteString = lByteString.replace(b'\a',b'{{{a}}}')
#Вернуть \b
lByteString = lByteString.replace(b'\b',b'{{{b}}}')
#Вернуть \t
lByteString = lByteString.replace(b'\t',b'{{{t}}}')
#Вернуть \v
lByteString = lByteString.replace(b'\v',b'{{{v}}}')
#Вернуть \f
lByteString = lByteString.replace(b'\f',b'{{{f}}}')
############################
#print(b"Result: "+lByteString)
#lByteString= b'x\x9c\xdd\x95]O\xc20\x14\x86\xffJ\xb3[5\xa1Cqz\x07\xc4\xe8\x8d\x1fQ\x13.\x0cYJw\xb6U\xbav\xe9\xce"\x84\xf0\xdfm\'"\xb8\xa0L%Q\xb3\x9b\xf6=\xdfO\x9a\xb3\x99\x17\x97\x8a\xa3\xd0\xea\x8ae\xe0\x9d\x12\xaf[\xa2\xce\x98S\xee\x80\x19\x9e^\xea\xb2\x803\t\x19(\xbc\x10`\x9c6\xf5\xf6\x89\xc7LRt\x8daS\x1b\xf5\xf00\xf3\xd4"\xc1u\x0e\xea\xf6\xa6K\x0e\xc8\xb9\xd6\x89\x04\xd2O\x8d\xb6&\x1bb\x04OC\x84\t~\xe2\x97\x1b\xcd\xa1(B\x11YG\xdaj\xfb\xc1\x9b\xb8\xa2\xa4LE\xd2\xd5\xa4\xf6\xdenY\x85Kf\xc3^;yI\x18\x0eD\x94\x00\x0e\x84{{n}}\xa9K\xce\xb5B\xa3e\x88\xd3\xbc\xf2Z\xd5\xaa\x82\xaa\x94\xd25\x0b\x1c\x99J\xaa\x023OB\xec\xbavEP\xe7\x8b\x93\x11I\xeaTz\xe2\xbb\xebH\xa3eW5\xe8\xb7\xe6\xce^*\x14\xb6\x83e\xda\xf9phe]b^\xe2\xf5\xe8\xd1Vp\xf0\xfe.\xbb\x1b\xa6`\x87\xfc8\x1a\x9bSE0q\xa2\x15\xeer\xe0"\x16\xbcz\x9f\xfdT\xc8h\x9d\xdf\xc7\xd4\xbe\xcdj1\xd9:\xa9\x1f\xe1B7\x81\xa1\xef\xc0\xd0:\x98\xc3-\xc0\xd4X\xfc\xda\xf1i\xbb\xe9\xfc\xdb<\x8c\xff2\x7f\'\xa8\x8d\xdf\xdab\xfc\x9e\xd6\xe3\x8c\x99qQ\xe3\xb0f\xd9\x19\x90{\xade\x8f\x99/3\xa1AC(\xfe\x16P\x06F \x90\xb3\t\x07Iba\x17\x83P\xa4\xbf\xb7G\x9e\x04\xa6vE\x13\xb6\xfc\x13\xd6\xa85\x0b\xdd\x19\xd6^i\x11\xa8FT;G\xfe\x06\xac\xc1q\xb0N\x956\xd84\xae\xe4p\xbe\xfa=\x03\x01\xce\x95\x9a'
#lByteString = b"x\x9c\xb5\x91\xcfO\xc3 \x14\xc7\xff\x95\xa6\xd7uI\xf9Q\x8a\xde\xd4\x93\x07\xbdx\xf00\x97\x05)[I(\x90\x8ef3\xcb\xfew\x81M\xbb\xd9M]\x8c!y\xd0\xf7}\xbc\xef\xe3\xd3\xc9&\xd5\xac\x11\xe9u\x92j\xb1J@2N\x1e\x8d\x13\x96U\xa3Q\x9a%i+y=sb\xed\xceV\xd8\xd6p\xb1\\\xced\xe5K{{n}}\x80`\x9f\xeb\x135\xd3\x95{{n}}.\x08RR\xe4>\xc3\x15\xf3\x97>\xbc\x8f:r\xa3]k\xd4\xcc\xbd\xd9(>K]\x99\xd5\xa1\x12\xbd\x00\xc6\xb0\xcc\xcb0\xa4\xe0\x8e\xe9E4\xd8\xa4J\xcc\xc3\xb44\x07^r\xc6\xfa3\x04(\xbeeQ\x07\x05P\x1a\xa4W\xe3\x9ci\xfc\xf7\x15(\xb6A\xee\xb4\x93\x8d\xd85\x9f`?\xf6n\xd8i0v\xadw\xd5\x95X\x87n>\xf1d\x05\x97s\xc9\x99\x93F\xdf\xd5R\xc5K=\xcc\x1bk\xd5^\x1d`\xfc\xa2]\x06PwJ\r\xf0\x9d\xa2\xf6 tw\xcb\xda\x01\xb6}\x83\xd3\xcc\x00\xec\x99\x15\xf4\x88Y\x99\x1f2\x83\xb4\xfc\x8e\x99\xdf\xb3d\x0c\x01.1E\x04\x93l\xff\x8e\xcf\x7f6\xa4Z\xfc\x82\xeaK\x97c BD\xf3\x101\x89g\xba\x8b\x03\xd0?\x97\xff#\xfb{'\x9a\x8b\xe0\x03H\xc89\xfa\x08\x15\x7f\xa2\x0f >\x80_\x0e\xe0\x93\xb3\xf0\xc3\xc4\xd3m\\\xef\xf8\x958\xa0"
#lt=open("logSendByteStringWithoutN.log","wb")
#lt.write(lByteString)
#lt.close()
############################
sys.stdout.buffer.write(lByteString+bytes("\n","utf-8"))
sys.stdout.flush();
return
#ProcessParentWriteObject
def ProcessParentWriteObject(inObject):
#Выполнить отправку сконвертированного объекта в JSON
ProcessParentWriteString(json.dumps(inObject))
return
#ProcessParentReadWaitObject
def ProcessParentReadWaitObject():
#Выполнить получение и разбор объекта
lResult=json.loads(ProcessParentReadWaitString());
return lResult;
#ProcessChildSendString
def ProcessChildSendString(lProcess,lString):
lByteString = zlib.compress(lString.encode("utf-8"))
#Вернуть потенциальные \n
lByteString = lByteString.replace(b'\n',b'{{n}}')
#Отправить сообщение в дочерний процесс
lProcess.stdin.write(lByteString+bytes('\n',"utf-8"))
#print(str(lByteString+bytes('\n',"utf-8")))
lProcess.stdin.flush()
#Вернуть результат
return
#ProcessChildReadWaitString
def ProcessChildReadWaitString(lProcess):
#Ожидаем ответ от процесса
lResult = lProcess.stdout.readline()
#Обработка спец символов
#print(b'NewLine: '+lResult)
#Вернуть потенциальные \n
lResult = lResult.replace(b'{{{n}}}',b'\n')
#Вернуть \r
lResult = lResult.replace(b'{{{r}}}',b'\r')
#Вернуть \0
lResult = lResult.replace(b'{{{0}}}',b'\0')
#Вернуть \a
lResult = lResult.replace(b'{{{a}}}',b'\a')
#Вернуть \b
lResult = lResult.replace(b'{{{b}}}',b'\b')
#Вернуть \t
lResult = lResult.replace(b'{{{t}}}',b'\t')
#Вернуть \v
lResult = lResult.replace(b'{{{v}}}',b'\v')
#Вернуть \f
lResult = lResult.replace(b'{{{f}}}',b'\f')
#print("check")
#print(str(lResult))
lResult = zlib.decompress(lResult[0:-1])
lResult = lResult.decode("utf-8")
#Вернуть результат
return lResult
#ProcessChildSendObject
def ProcessChildSendObject(inProcess,inObject):
#Выполнить отправку сконвертированного объекта в JSON
ProcessChildSendString(inProcess,json.dumps(inObject))
return
#ProcessChildReadWaitObject
def ProcessChildReadWaitObject(inProcess):
#Выполнить получение и разбор объекта
lResult=json.loads(ProcessChildReadWaitString(inProcess));
return lResult;
#ProcessChildSendReadWaitString
def ProcessChildSendReadWaitString(lProcess,lString):
ProcessChildSendString(lProcess,lString)
#Вернуть результат
return ProcessChildReadWaitString(lProcess)
#ProcessChildSendReadWaitObject
def ProcessChildSendReadWaitObject(inProcess,inObject):
ProcessChildSendObject(inProcess,inObject)
#Вернуть результат
return ProcessChildReadWaitString(inProcess)
#ProcessChildSendReadWaitQueue
#QueueObject - [Object,Object,...]
def ProcessChildSendReadWaitQueueObject(inProcess,inQueueObject):
lOutputObject=[]
#Циклическая отправка запросов в дочерний объект
for lItem in inQueueObject:
#Отправить запрос в дочерний процесс, который отвечает за работу с Windows окнами
ProcessChildSendObject(inProcess,lItem)
#Получить ответ от дочернего процесса
lResponseObject=ProcessChildReadWaitObject(inProcess)
#Добавить в выходной массив
lOutputObject.append(lResponseObject)
#Сформировать ответ
return lOutputObject

@ -1 +0,0 @@
xœ•<EFBFBD>ÁnÂ0DÅò¹H{{{t}}}<7D>zC¥*‡{{{n}}}*.ŠŒ³$®Œ9Bù÷®C)HmÔöfÏÎîŒÞ™ïj#QY3<>Œ?k؃Á©‡E<E280A1>Z˜Ã<CB9C>?0.\^Mœ'r­×gn>%˜åÛ„õØ‹µ¹öT8K#ZqJñ•ÎJ¨ªTed£ø¦Ý„B˜LûÄ8Ä{{{t}}}{{{t}}}R{{{v}}}Ú¹Ö¸\KW*ËWʤ¡¿,­AguŠ§²uÝkmš©µöMA¢0y{ÿÌ5ì|åžOA[^ŸNå…×Ã8ñß­E´{ÿ¤ñóÚ ¢_‡I¼qº<64>{{{v}}}ybÔ0³‡o<E280A1>ºLÿ#t!ZÉÀ]@Íl…³Õ|ú'V½a4<18>ÆQØï"t{{{v}}}î<>%ãÑ<C3A3>¼| :J£G®ÙlH³55.¶ïéÓšæ[…Ø¿

@ -1,410 +0,0 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pywinauto.findwindows &mdash; pywinauto 0.6.6 documentation</title>
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
VERSION:'0.6.6',
LANGUAGE:'en',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: ''
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="https://assets.readthedocs.org/static/javascript/readthedocs-doc-embed.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="next" title="pywinauto.timings" href="pywinauto.timings.html" />
<link rel="prev" title="pywinauto.findbestmatch" href="pywinauto.findbestmatch.html" />
<!-- RTD Extra Head -->
<!--
Always link to the latest version, as canonical.
http://docs.readthedocs.org/en/latest/canonical.html
-->
<link rel="canonical" href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.findwindows.html" />
<link rel="stylesheet" href="https://assets.readthedocs.org/static/css/readthedocs-doc-embed.css" type="text/css" />
<script type="text/javascript" src="../_static/readthedocs-data.js"></script>
<!-- Add page-specific data, which must exist in the page js, not global -->
<script type="text/javascript">
READTHEDOCS_DATA['page'] = 'code/pywinauto.findwindows'
READTHEDOCS_DATA['source_suffix'] = '.txt'
</script>
<script type="text/javascript" src="https://assets.readthedocs.org/static/javascript/readthedocs-analytics.js"></script>
<!-- end RTD <extrahead> -->
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../contents.html" class="icon icon-home"> pywinauto
</a>
<div class="version">
latest
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">What is pywinauto</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../HowTo.html">How To&#8217;s</a></li>
<li class="toctree-l1"><a class="reference internal" href="../wait_long_operations.html">Waiting for Long Operations</a></li>
<li class="toctree-l1"><a class="reference internal" href="../remote_execution.html">Remote Execution Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../controls_overview.html">Methods available to each different control type</a></li>
<li class="toctree-l1"><a class="reference internal" href="../credits.html">Credits</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev_notes.html">Dev Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../TODO.html">PYWINAUTO TODO&#8217;s</a></li>
<li class="toctree-l1"><a class="reference internal" href="../HISTORY.html">Change Log</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="code.html">Basic User Input Modules</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="code.html#main-user-modules">Main User Modules</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="pywinauto.application.html">pywinauto.application module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pywinauto.findbestmatch.html">pywinauto.findbestmatch</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">pywinauto.findwindows</a></li>
<li class="toctree-l2"><a class="reference internal" href="pywinauto.timings.html">pywinauto.timings</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="code.html#specific-functionality">Specific Functionality</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#controls-reference">Controls Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#pre-supplied-tests">Pre-supplied Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#backend-internal-implementation-modules">Backend Internal Implementation modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html#internal-modules">Internal Modules</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../contents.html">pywinauto</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../contents.html">Docs</a> &raquo;</li>
<li><a href="code.html">Basic User Input Modules</a> &raquo;</li>
<li>pywinauto.findwindows</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/pywinauto/pywinauto/blob/master/docs/code/pywinauto.findwindows.txt" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="pywinauto-findwindows">
<h1>pywinauto.findwindows<a class="headerlink" href="#pywinauto-findwindows" title="Permalink to this headline"></a></h1>
<blockquote>
<div><span class="target" id="module-pywinauto.findwindows"></span><p>Provides functions for iterating and finding windows/elements</p>
<dl class="exception">
<dt id="pywinauto.findwindows.ElementAmbiguousError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">ElementAmbiguousError</code><a class="headerlink" href="#pywinauto.findwindows.ElementAmbiguousError" title="Permalink to this definition"></a></dt>
<dd><p>There was more then one element that matched</p>
</dd></dl>
<dl class="exception">
<dt id="pywinauto.findwindows.ElementNotFoundError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">ElementNotFoundError</code><a class="headerlink" href="#pywinauto.findwindows.ElementNotFoundError" title="Permalink to this definition"></a></dt>
<dd><p>No element could be found</p>
</dd></dl>
<dl class="exception">
<dt id="pywinauto.findwindows.WindowAmbiguousError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">WindowAmbiguousError</code><a class="headerlink" href="#pywinauto.findwindows.WindowAmbiguousError" title="Permalink to this definition"></a></dt>
<dd><p>There was more then one window that matched</p>
</dd></dl>
<dl class="exception">
<dt id="pywinauto.findwindows.WindowNotFoundError">
<em class="property">exception </em><code class="descclassname">pywinauto.findwindows.</code><code class="descname">WindowNotFoundError</code><a class="headerlink" href="#pywinauto.findwindows.WindowNotFoundError" title="Permalink to this definition"></a></dt>
<dd><p>No window could be found</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.enum_windows">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">enum_windows</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.enum_windows" title="Permalink to this definition"></a></dt>
<dd><p>Return a list of handles of all the top level windows</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_element">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_element</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_element" title="Permalink to this definition"></a></dt>
<dd><p>Call find_elements and ensure that only one element is returned</p>
<p>Calls find_elements with exactly the same arguments as it is called with
so please see <a class="reference internal" href="#pywinauto.findwindows.find_elements" title="pywinauto.findwindows.find_elements"><code class="xref py py-func docutils literal"><span class="pre">find_elements()</span></code></a> for the full parameters description.</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_elements">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_elements</code><span class="sig-paren">(</span><em>class_name=None</em>, <em>class_name_re=None</em>, <em>parent=None</em>, <em>process=None</em>, <em>title=None</em>, <em>title_re=None</em>, <em>top_level_only=True</em>, <em>visible_only=True</em>, <em>enabled_only=False</em>, <em>best_match=None</em>, <em>handle=None</em>, <em>ctrl_index=None</em>, <em>found_index=None</em>, <em>predicate_func=None</em>, <em>active_only=False</em>, <em>control_id=None</em>, <em>control_type=None</em>, <em>auto_id=None</em>, <em>framework_id=None</em>, <em>backend=None</em>, <em>depth=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_elements" title="Permalink to this definition"></a></dt>
<dd><p>Find elements based on criteria passed in</p>
<p>WARNING! Direct usage of this function is not recommended! It&#8217;s a very low level API.
Better use Application and WindowSpecification objects described in the
Getting Started Guide.</p>
<p>Possible values are:</p>
<ul class="simple">
<li><strong>class_name</strong> Elements with this window class</li>
<li><strong>class_name_re</strong> Elements whose class matches this regular expression</li>
<li><strong>parent</strong> Elements that are children of this</li>
<li><strong>process</strong> Elements running in this process</li>
<li><strong>title</strong> Elements with this text</li>
<li><strong>title_re</strong> Elements whose text matches this regular expression</li>
<li><strong>top_level_only</strong> Top level elements only (default=**True**)</li>
<li><strong>visible_only</strong> Visible elements only (default=**True**)</li>
<li><strong>enabled_only</strong> Enabled elements only (default=False)</li>
<li><strong>best_match</strong> Elements with a title similar to this</li>
<li><strong>handle</strong> The handle of the element to return</li>
<li><strong>ctrl_index</strong> The index of the child element to return</li>
<li><strong>found_index</strong> The index of the filtered out child element to return</li>
<li><strong>predicate_func</strong> A user provided hook for a custom element validation</li>
<li><strong>active_only</strong> Active elements only (default=False)</li>
<li><strong>control_id</strong> Elements with this control id</li>
<li><strong>control_type</strong> Elements with this control type (string; for UIAutomation elements)</li>
<li><strong>auto_id</strong> Elements with this automation id (for UIAutomation elements)</li>
<li><strong>framework_id</strong> Elements with this framework id (for UIAutomation elements)</li>
<li><strong>backend</strong> Back-end name to use while searching (default=None means current active backend)</li>
</ul>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_window">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_window</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_window" title="Permalink to this definition"></a></dt>
<dd><p>Call find_elements and ensure that only handle of one element is returned</p>
<p>Calls find_elements with exactly the same arguments as it is called with
so please see <a class="reference internal" href="#pywinauto.findwindows.find_elements" title="pywinauto.findwindows.find_elements"><code class="xref py py-func docutils literal"><span class="pre">find_elements()</span></code></a> for the full parameters description.</p>
</dd></dl>
<dl class="function">
<dt id="pywinauto.findwindows.find_windows">
<code class="descclassname">pywinauto.findwindows.</code><code class="descname">find_windows</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pywinauto.findwindows.find_windows" title="Permalink to this definition"></a></dt>
<dd><p>Find elements based on criteria passed in and return list of their handles</p>
<p>Calls find_elements with exactly the same arguments as it is called with
so please see <a class="reference internal" href="#pywinauto.findwindows.find_elements" title="pywinauto.findwindows.find_elements"><code class="xref py py-func docutils literal"><span class="pre">find_elements()</span></code></a> for the full parameters description.</p>
</dd></dl>
</div></blockquote>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="pywinauto.timings.html" class="btn btn-neutral float-right" title="pywinauto.timings" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="pywinauto.findbestmatch.html" class="btn btn-neutral float-left" title="pywinauto.findbestmatch" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2018, Mark Mc Mahon and Contributors
<span class="commit">
Revision <code>7c93b2dd</code>.
</span>
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span>
v: latest
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>Versions</dt>
<dd><a href="/en/latest/">latest</a></dd>
<dd><a href="/en/stable/">stable</a></dd>
<dd><a href="/en/0.6.5/">0.6.5</a></dd>
<dd><a href="/en/0.6.4/">0.6.4</a></dd>
<dd><a href="/en/0.6.3/">0.6.3</a></dd>
<dd><a href="/en/0.6.2/">0.6.2</a></dd>
<dd><a href="/en/0.6.1/">0.6.1</a></dd>
<dd><a href="/en/0.6.0/">0.6.0</a></dd>
<dd><a href="/en/uia/">uia</a></dd>
</dl>
<dl>
<dt>Downloads</dt>
<dd><a href="//readthedocs.org/projects/pywinauto/downloads/pdf/latest/">pdf</a></dd>
<dd><a href="//readthedocs.org/projects/pywinauto/downloads/htmlzip/latest/">htmlzip</a></dd>
</dl>
<dl>
<dt>On Read the Docs</dt>
<dd>
<a href="//readthedocs.org/projects/pywinauto/?fromdocs=pywinauto">Project Home</a>
</dd>
<dd>
<a href="//readthedocs.org/builds/pywinauto/?fromdocs=pywinauto">Builds</a>
</dd>
</dl>
<hr/>
Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.
</div>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

@ -1 +0,0 @@
[{"functionName":"ElementRunAction","argsArray":[[{"title":"Taskbar","class_name":"Shell_TrayWnd","ctrl_index":null},{"title":"SSH, Telnet and Rlogin client","depth_end":2}],"click",[]]},{"functionName":"PywinautoExtElementWaitAppear","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"}]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Host Name (or IP address)","class_name":"Edit"}],"set_text",["HostNameTest"]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Raw"}],"click_input",["HostNameTest"]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Saved Sessions","class_name":"Edit"}],"set_text",["SavedSessionTest"]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox","ctrl_index":null},{"title":"Connection","depth_end":2}],"set_focus",[]]},{"functionName":"PywinautoExtElementWaitAppear","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Logical name of remote host"}]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Logical name of remote host (e.g. for SSH key lookup):","class_name":"Edit"}],"set_text",["It works!"]]}]

@ -1,32 +0,0 @@
import internalProcess
import subprocess
import json
#Стартуем процесс winGUI 32bit
lWinGUIx32 = subprocess.Popen(['WPy32-3720\\python-3.7.2\\python.exe','winGUI.py'],stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
lScriptJSON='[{"functionName":"ElementRunAction","argsArray":[[{"title":"Taskbar","class_name":"Shell_TrayWnd","ctrl_index":null},{"title":"SSH, Telnet and Rlogin client","depth_end":2}],"click",[]]},{"functionName":"PywinautoExtElementWaitAppear","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"}]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Host Name (or IP address)","class_name":"Edit"}],"set_text",["HostNameTest"]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Raw"}],"click_input",["HostNameTest"]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Saved Sessions","class_name":"Edit"}],"set_text",["SavedSessionTest"]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox","ctrl_index":null},{"title":"Connection","depth_end":2}],"set_focus",[]]},{"functionName":"PywinautoExtElementWaitAppear","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Logical name of remote host"}]]},{"functionName":"ElementRunAction","argsArray":[[{"title":"PuTTY Configuration","class_name":"PuTTYConfigBox"},{"title":"Logical name of remote host (e.g. for SSH key lookup):","class_name":"Edit"}],"set_text",["It works!"]]}]'
#Превращение массива байт в объект
lInputObject=json.loads(lScriptJSON)
#Отправить на исполнение
internalProcess.ProcessChildSendReadWaitQueueObject(lWinGUIx32,lInputObject)
#Тест одной операции
lInputObject=(
{"functionName":"ElementRunAction",
"argsArray":
[
[
{"title":"Taskbar",
"class_name":"Shell_TrayWnd",
"ctrl_index":None},
{"title":"SSH, Telnet and Rlogin client",
"depth_end":2}
],
"click",
[]
]
})
lResponseObject=internalProcess.ProcessChildSendReadWaitObject(lWinGUIx32,lInputObject)

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save