python:python_programs:rswqueuebot_queuecontroller

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

python:python_programs:rswqueuebot_queuecontroller [2024/05/07 04:50] – created jcoronapython: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="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') 
-</code>  
- 
-[[:python:python_programs:rswqueuebot_queuecontroller:queuecontrol_learning_content]] 
- 
-[[:python:python_programs:rswqueuebot_queuecontroller:autohotkey_shortcuts_example]] 
- 
- 
- 
-~~cssp_closeDIV~~ 
-\\ 
-\\ 
-\\ 
-\\ 
-\\