This is an old revision of the document!
Queue Control Waiting Program
Quickly puts a call in waiting with your name and then automatically inserts who called into the name field, then copies the description of the ticket into problem field.
# -*- 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="CSS 2.0") main_window = app.window(title='CSS 2.0') update_status_window = app.window(title='Update Status') # Access the grid grid = main_window.TrswVirtualStringGrid # Updating the status window combobox = update_status_window.child_window(class_name="TrswIncComboBox") combobox.type_keys('Waiting') edit = update_status_window.child_window(title='',class_name="TEdit") edit.set_focus() # Ensure the Edit field is focused before typing edit.type_keys('Jonathan Calling', with_spaces=True) time.sleep(.1) update_status_window.child_window(title="&OK", class_name="TButton").click() # 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): # Press the down arrow key six times 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' window new_caller = app.window(title='New Caller') new_caller.print_control_identifiers() new_caller.Edit.select() new_caller.Edit.type_keys('^c') time.sleep(.1) new_caller.Button2.click() # Select 'Take this Call' option time.sleep(.1) main_window.child_window(title="Take this Call", class_name="TButton").click() main_window.child_window(title="Call Detail", timeout=2) if main_window.child_window(title="** Notes **", class_name='TRzTabSheet'): pyautogui.hotkey('shift', 'tab') pyautogui.press('left') time.sleep(.1) # Paste content into the Call Detail window and copy-paste other content main_window.child_window(class_name="TfrmSupportCall").Edit7.type_keys('^v') time.sleep(.1) main_window.child_window(class_name="TPanel",title="pnlCallDetail").Edit2.select() time.sleep(.1) main_window.child_window(class_name="TPanel",title="pnlCallDetail").Edit2.type_keys('^c') time.sleep(.1) main_window.child_window(class_name="TfrmSupportCall").Edit4.type_keys('^v')
Queue Control Learning Content
Autohotkey Keyboard Shortcuts Example for use with Queue Control Launch