You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"To recieve the text above as a Python object, run computer.display.get_text_as_list_of_lists()",
113
+
"assistant",
114
+
)
112
115
)
113
-
)
114
116
return
115
117
116
118
ifquadrant==None:
117
-
# Implement active_app_only!
118
119
ifactive_app_only:
119
-
region=self.get_active_window()["region"]
120
-
screenshot=pyautogui.screenshot(region=region)
120
+
active_window=pywinctl.getActiveWindow()
121
+
ifactive_window:
122
+
screenshot=pyautogui.screenshot(
123
+
region=(
124
+
active_window.left,
125
+
active_window.top,
126
+
active_window.width,
127
+
active_window.height,
128
+
)
129
+
)
130
+
message=format_to_recipient(
131
+
"Taking a screenshot of the active app (recommended). To take a screenshot of the entire screen (uncommon), use computer.display.view(active_app_only=False).",
132
+
"assistant",
133
+
)
134
+
print(message)
135
+
else:
136
+
screenshot=pyautogui.screenshot()
137
+
121
138
else:
122
139
screenshot=take_screenshot_to_pil(
123
140
screen=screen, combine_screens=combine_screens
124
141
) # this function uses pyautogui.screenshot which works fine for all OS (mac, linux and windows)
125
-
# message = format_to_recipient("Taking a screenshot of the entire screen. This is not recommended. You (the language model assistant) will recieve it with low resolution.\n\nTo maximize performance, use computer.display.view(active_app_only=True). This will produce an ultra high quality image of the active application.", "assistant")
126
-
# print(message)
142
+
message=format_to_recipient(
143
+
"Taking a screenshot of the entire screen. This is not recommended. You (the language model assistant) will recieve it with low resolution.\n\nTo maximize performance, use computer.display.view(active_app_only=True). This will produce an ultra high quality image of the active application.",
0 commit comments