Skip to content

Commit

Permalink
Removed Mobile mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
StDensity committed Apr 28, 2024
1 parent 776dfb2 commit a5debd5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions GUI_v0.2.2.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def check_focus(required_browser_id):
browser_open_delay = 5
inspect_element_delay = 5
search_delay = 2
total_searches = 70 # Initialize total_searches variable
total_searches = 35 # Initialize total_searches variable

# Create and configure entry fields for delay values
browser_open_delay_label = ttk.Label(frame, text="Browser Open Delay:")
Expand Down Expand Up @@ -169,8 +169,8 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se
check_focus(required_browser_id)

# Opens Inspect Elements
auto.hotkey('ctrl', 'shift', 'i')
time.sleep(inspect_element_delay)
# auto.hotkey('ctrl', 'shift', 'i')
# time.sleep(inspect_element_delay)
# To check whether the browser has lost focus or not.
check_focus(required_browser_id)
# This is the bring back focus to the browser from inspect elements
Expand All @@ -180,17 +180,17 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se
for i in range(0, total_searches):
# To check whether the browser has lost focus or not.
check_focus(required_browser_id)
if i == total_searches // 2:
# Toggles device mode
auto.hotkey('ctrl', 'shift', 'i')
time.sleep(inspect_element_delay)
auto.hotkey('ctrl', 'shift', 'i')
time.sleep(inspect_element_delay)
auto.hotkey('ctrl', 'shift', 'm')
time.sleep(inspect_element_delay)
# This is the bring back focus to the browser from inspect elements
auto.hotkey('alt')
# To bring focus to the search bar.
# if i == total_searches // 2:
# # Toggles device mode
# auto.hotkey('ctrl', 'shift', 'i')
# time.sleep(inspect_element_delay)
# auto.hotkey('ctrl', 'shift', 'i')
# time.sleep(inspect_element_delay)
# auto.hotkey('ctrl', 'shift', 'm')
# time.sleep(inspect_element_delay)
# # This is the bring back focus to the browser from inspect elements
# auto.hotkey('alt')
# # To bring focus to the search bar.
auto.hotkey('ctrl', 'l')

# Generate a random question by choosing a random prefix and word
Expand All @@ -209,7 +209,7 @@ def execute_search(total_searches, browser_open_delay, inspect_element_delay, se
auto.press("enter")

# Closes Inspect Elements
auto.hotkey('ctrl', 'shift', 'i')
# auto.hotkey('ctrl', 'shift', 'i')


# Run the Tkinter main loop
Expand Down

0 comments on commit a5debd5

Please sign in to comment.