Differences
This shows you the differences between two versions of the page.
python:python_programs:rswqueuebot_queuecontroller [2024/05/07 04:50] – created jcorona | python:python_programs:rswqueuebot_queuecontroller [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~cssp_main_openDIV~~ | ||
- | |||
- | ====== Queue Control Waiting Program | ||
- | |||
- | Quickly puts a call **in waiting** with **your name** and then automatically inserts **who calle**d into the **name field**, then copies the **description** of the ticket into problem field. | ||
- | |||
- | <code python> | ||
- | # -*- coding: utf-8 -*- | ||
- | """ | ||
- | Created on Sat Jul 15 21:03:15 2023 | ||
- | |||
- | @author: jcorona | ||
- | """ | ||
- | |||
- | # -*- coding: utf-8 -*- | ||
- | import pyautogui | ||
- | import time | ||
- | from pywinauto.application import Application | ||
- | from pynput.keyboard import Controller, Key | ||
- | |||
- | # Initializing the controller | ||
- | keyboard = Controller() | ||
- | |||
- | # Connecting to the application | ||
- | app = Application().connect(title=" | ||
- | main_window = app.window(title=' | ||
- | update_status_window = app.window(title=' | ||
- | |||
- | # Access the grid | ||
- | grid = main_window.TrswVirtualStringGrid | ||
- | |||
- | # Updating the status window | ||
- | combobox = update_status_window.child_window(class_name=" | ||
- | combobox.type_keys(' | ||
- | edit = update_status_window.child_window(title='', | ||
- | edit.set_focus() | ||
- | edit.type_keys(' | ||
- | time.sleep(.1) | ||
- | update_status_window.child_window(title="& | ||
- | |||
- | # Set focus on the grid and access context menu | ||
- | grid.set_focus() | ||
- | keyboard.press(Key.menu) | ||
- | keyboard.release(Key.menu) | ||
- | time.sleep(.1) | ||
- | for _ in range(6): | ||
- | keyboard.press(Key.down) | ||
- | keyboard.release(Key.down) | ||
- | time.sleep(0.1) | ||
- | keyboard.press(Key.enter) | ||
- | keyboard.release(Key.enter) | ||
- | |||
- | # Copy content from 'New Caller' | ||
- | new_caller = app.window(title=' | ||
- | new_caller.print_control_identifiers() | ||
- | new_caller.Edit.select() | ||
- | new_caller.Edit.type_keys(' | ||
- | time.sleep(.1) | ||
- | new_caller.Button2.click() | ||
- | |||
- | # Select 'Take this Call' option | ||
- | time.sleep(.1) | ||
- | main_window.child_window(title=" | ||
- | main_window.child_window(title=" | ||
- | if main_window.child_window(title=" | ||
- | pyautogui.hotkey(' | ||
- | pyautogui.press(' | ||
- | time.sleep(.1) | ||
- | |||
- | # Paste content into the Call Detail window and copy-paste other content | ||
- | main_window.child_window(class_name=" | ||
- | time.sleep(.1) | ||
- | main_window.child_window(class_name=" | ||
- | time.sleep(.1) | ||
- | main_window.child_window(class_name=" | ||
- | time.sleep(.1) | ||
- | main_window.child_window(class_name=" | ||
- | </ | ||
- | |||
- | [[: | ||
- | |||
- | [[: | ||
- | |||
- | |||
- | |||
- | ~~cssp_closeDIV~~ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||