Support Board
Date/Time: Wed, 27 Nov 2024 02:36:18 +0000
Post From: Time/Sales Window: Is there a way to have it auto-clear lines older than X seconds ?
[2022-06-27 14:57:15] |
sean3000 - Posts: 53 |
I created an AutoHotkey script that clears time and sales when a hotkey is pressed. It would still be nice to have native support for time-based auto-clearing and hotkey functionality, but this script is a decent workaround. The script takes the coordinate of the Clear menu item on the T&S windows and sends a click input to that location when the hotkey is pressed. It records the mouse location prior to the click and returns the cursor to its original location after the input is sent. To determine the coordinates on your screen, right click the AutoHotkey app icon in the taskbar and select Window Spy. Hover your cursor over the T&S Clear menu item and note the Screen coordinates in the Mouse Position box (do not use the window or client options). #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #Persistent #SingleInstance force SetMouseDelay, -1 CoordMode, Mouse, Screen ; Automatically reload script upon changes, not required but useful when editing the script SetTimer,UPDATEDSCRIPT,500 UPDATEDSCRIPT: FileGetAttrib,attribs,%A_ScriptFullPath% IfInString,attribs,A { FileSetAttrib,-A,%A_ScriptFullPath% SplashTextOn,,,Updated script, Sleep,500 Reload } ; Clear T&S when ALT+C is pressed ; Refer to AutoHotkey documentation to set up your own hotkey: autohotkey.com/docs/Hotkeys.htm !c:: BlockInput MouseMove MouseGetPos, x, y Click, 3240 940 MouseMove, x, y, 0 BlockInput MouseMoveOff return |