Login Page - Create Account

Support Board


Date/Time: Fri, 18 Apr 2025 05:14:20 +0000



[User Discussion] - AHK version 1.1.37.02

View Count: 148

[2025-03-26 18:38:46]
User14953 - Posts: 248
AHK version 1.1.37.02
Looking to create a *.ahk file to Clear the Alert Manager Log.
[2025-03-27 20:43:44]
JohnR - User831573 - Posts: 330
Here is one way of doing it.

1 - I tied it to the Alt left mouse button. Change it to what ever you prefer.

2 - You can call it what ever you want or add it to your existing AHK file

3 - I put in a Sleep for 1 sec between each step so you can see what it is doing. Change it to as fast as your system can handle if you choose to. All sleep times do not have to be the same duration. I usually use 100 - 250 depending on what I am trying to do.

4 - You can eliminate the last step(s) which responds to SCs popup to confirm delete.

5 - I did not try to eliminate the lines above the ! left mouse macro. I needed them for another thing I use AHK for.

Hope this helps
JohnR


; #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.

SetTitleMatchMode 2
SetTitleMatchMode ("Slow")

DetectHiddenWindows 1
DetectHiddenText 1

;
;
;
;

; Alt=! + Mouse Left Button = open Alert manager

!LButton::
{
  SendInput "^!a"
  Sleep 1000
  ; I use a sleep after each send to give the system time to "do" what I asked. You can adjust each one or take them out
  SendInput "!f"
  Sleep 1000
  SendInput "{Right 4}"
  Sleep 1000
  SendInput "{Enter}"
  Sleep 1000
  SendInput "!e"
  Sleep 1000
  SendInput "{Down 6}"
  Sleep 1000
  SendInput "{Enter}"
  Sleep 1000
  ; Lines below are for AHK to respond to confirmation request from SC to do the delete
  SendInput "{Enter}"
  Sleep 1000
  
  SoundBeep 2550,225 ; I like to hear a sound when the macro is finished
Return
}
;
;
Date Time Of Last Edit: 2025-03-27 20:45:24
attachmentJOR_AHK_SC_AlertLogClear.ahk - Attached On 2025-03-27 20:42:58 UTC - Size: 1.3 KB - 36 views
[2025-03-28 17:40:17]
JohnR - User831573 - Posts: 330
Also, I am on AHK ver 2.0.19 not the Ver 1

JohnR
[2025-03-29 16:31:56]
User14953 - Posts: 248
Thanks JohnR.
Date Time Of Last Edit: 2025-03-29 16:32:15

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account