Skip to content

Commit

Permalink
implement get_active_element_state(x, y)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesicasusanto committed Jun 1, 2023
1 parent 37da667 commit 113933e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions openadapt/window/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pywinauto import Desktop
import time
from pprint import pprint
global active_window
def get_active_window_state():
active_window = get_active_window()
meta = get_active_window_meta(active_window)
Expand All @@ -28,9 +29,8 @@ def get_active_window_meta(active_window) :
logger.info(f"{active_window.get_properties()}=")
return active_window.get_properties()

def get_element_at_position(x, y):
# TODO
return None
def get_active_element_state(x, y):
return active_window.from_points(x,y)

def get_active_window():
app = pywinauto.application.Application(backend="uia").connect(active_only=True)
Expand Down Expand Up @@ -68,7 +68,6 @@ def main():
state = get_active_window_state()
pprint(state)
pickle.dumps(state)
import ipdb; ipdb.set_trace()


if __name__ == "__main__":
Expand Down

0 comments on commit 113933e

Please sign in to comment.