본문 바로가기

Software coding skill(python, web등)22

pywinauto 8 - 어플리케이션 인스턴스 생성 하나의 Application() 인스턴스를 생성하기 위해서, 1) 해당 application이 실행이 안되어 있는 경우 : start() (해당 설정한 주소의 어플리케이션이 실행됨) 2) 해당 application이 이미 실행되어 있는 경우 : connect() 를 사용한다. 인스턴스 생성후, 이 인스턴스를 이용해서 접근을 하면된다. 아래의 pywinauto 공식 사이트 설명을 참고하기 바란다. https://pywinauto.readthedocs.io/en/latest/HowTo.html#how-to-specify-a-usable-application-instance How To’s — pywinauto 0.6.8 documentation The windows handle of a window of t.. 2020. 2. 11.
pywinauto 7 - 안정적인 자동화 pywinauto 공식사이트 내용을 번역한 것입니다. I start the application as I did before (app.start("C:\setup.exe") and then connect the application (app.connect(title="Setup")) so you are connected to the process that is running the GUI window. 어플리케이션을 start하고나서 connect를 해줘야, 실행중인 window의 프로세스에 connect된다. pywinauto doesn't catch spawing additional processes (but we have plans to make windows manipulation availabl.. 2020. 2. 11.
pywinauto 6 - listview 내 text 읽기/쓰기 Listview class를 컨트롤할 일이 있는데, 엑셀표같은 이 아이템들을 읽고 선택하는 방법을 알아야한다. 예제) text 읽기: listview=app.top_window.window(control_id=1567, class_name="SysListView32") items=listview.items() # Listview내 모든 아이템들 리턴 item_count=listview.item_count() # Listview내 아이템 갯수 리턴 texts=items.texts() # Listview내 아이템들의 텍스트 리턴 https://pywinauto.readthedocs.io/en/latest/code/pywinauto.controls.uia_controls.html#pywinauto.contro.. 2020. 2. 11.
pywinauto 5 - 32bit / 64bit app 종류별 환경 설정 Getting Started Guide Once you have installed pywinauto - how do you get going? The very first necessary thing is to determine which accessibility technology (pywinauto’s backend) could be used for your application. The list of supported accessibility technologies on Windows: Win32 API (backend="win32") - a default backend for now MFC, VB6, VCL, simple WinForms controls and most of the old legac.. 2020. 2. 11.
pywinauto 4 - list select / click 내가 참고했던 List element의 클릭 방법들 공유. https://stackoverflow.com/questions/41112765/pywinauto-and-listitem-selection pywinauto and listitem selection I'm playing around with pywinauto and using it to automate Skype functions on Windows 7. I'm having trouble selecting people from my contact list accurately. The general code to open Skype and stackoverflow.com https://stackoverflow.com/questions/2033162.. 2020. 2. 11.
Pywinauto 3 - Attribute Magic Pywinauto 공식 사이트 내용을 번역한 것입니다. Attribute Resolution Magic 속성 해석 매직 Python simplifies creating window specification by resolving object attributes dynamically. 파이썬은 오브젝트 속성들을 다이나믹하게 사용하면서, window specification을 생성하는 것을 단순화한다. But an attibute name has the same limitations as any variable name: no spaces, commas and other special symbols. 그러나 한 속성이름은 변수이름과 같은 제한을 갖는다. 공간, 콤마나 다른 특별한 심볼 없게 하기. But f.. 2020. 2. 11.
Pywinauto 2 - Window Specification Pywinauto 공식 사이트 내용을 번역한 것입니다. It’s a core concept for the high level pywinauto API. Window specification은 high level pywinauto API를 위한 코어 개념이다. You are able to describe any window or control approximately or in more details even if it doesn’t exist yet or already closed. Window specification also keeps information about matching/search algorithm that will be used to get a real window or control.. 2020. 2. 10.
Pywinauto 1 - Entry Points for Automation Entry Points for Automation So you have an application, you know it supports one of the mentioned accessibility technologies. What’s the next? First you should start your application or connect to an existing app instance. It can be done with an Application object. 먼저, 어플리케이션 오브젝트 인스턴스 만들기. 이미 실행된 app에 connect를 하거나, start로 새로 app실행한다. This is not just a clone of subprocess.Popen, subprocess.Pope.. 2020. 2. 10.
color script 사용 - code 첨부 글쓰기 이전 글의 코드 첨부한 비주얼이 별로인 것 같아서, 다른 깔끔한 방법을 찾아 보았다. color script 라는 사이트를 발견하였다. https://colorscripter.com/ Color Scripter Simple & Flexible Syntax HighLighter colorscripter.com 언어 선택하고 미리 작성했던 코드를 붙여 넣는다. 블로그 글쓰기 모드를 html로 변경하고 붙여넣기를 하면, 아래와 같이 깔끔하게 코딩이 잘보이도록 첨부가 된다. 클립보드로 복사를 사용해봤을 때는 글씨가 약간 어색하게 적용되어서, 나는 html복사 방법을 이용했다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2.. 2020. 2. 7.
pywinauto 예제 - 메모장 저장 자동화를 위해서는, 굳이 처음에 새로 프로그램을 실행시키는 것을 반복하는 것 보다는, 실행되어 있는 프로그램에서 계속 무언가 반복하는게 필요할 수 있다. 새로 프로그램 실행 : start() 열려있는 프로그램 인식 : connect() # -*- coding: utf-8 -*- """ Created on Fri Feb 7 22:15:50 2020 @author: kenro """ from pywinauto.application import Application import pywinauto # 열려진 메모장 다이얼로그 창에 컨넥트 함 app = pywinauto.application.Application() # 열려진게 없을때는 Run a target application #app = Applicatio.. 2020. 2. 7.