A small tool to notify you if you have copied anything in the last two seconds by displaying a small red rectangle at the bottom right of your screen for two seconds. Useful if you keep spamming ctrl+c to make sure the thing i copied
Uses a script found on this forum for displaying the toaster.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent
; #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.
OnClipboardChange:
TP_Show("Copied text", "Red", "12", "Red", 2000)
return
TP_Show(TP_Message="Hello, World", TP_FontColor="Blue", TP_FontSize="12", TP_BGColor="White", TP_Lifespan=0)
{
Global TP_GUI_ID
DetectHiddenWindows, On
SysGet, Workspace, MonitorWorkArea
Gui, 89:-Caption +ToolWindow +LastFound +AlwaysOnTop +Border
Gui, 89:Color, %TP_BGColor%
Gui, 89:Font, s%TP_FontSize% c%TP_FontColor%
Gui, 89:Add, Text, gTP_Fade, %TP_Message%
Gui, 89:Show, Hide
TP_GUI_ID := WinExist()
WinGetPos, GUIX, GUIY, GUIWidth, GUIHeight, ahk_id %TP_GUI_ID%
NewX := WorkSpaceRight-5
NewY := WorkspaceBottom-5
Gui, 89:Show, Hide x%NewX% y%NewY% W5 H5
DllCall("AnimateWindow","UInt",TP_GUI_ID,"Int",500,"UInt","0x00040008") ; TOAST!
If (TP_Lifespan)
SetTimer, TP_Fade, % "-" TP_Lifespan
Return
}
TP_Fade:
DllCall("AnimateWindow","UInt",TP_GUI_ID,"Int",1000,"UInt","0x90000") ; Fade out when clicked
Gui, 89:Destroy
Return