Last active
December 8, 2016 15:35
-
-
Save Chudesnov/b86679ef0772cdcb6d81f464e0dc66e6 to your computer and use it in GitHub Desktop.
Clipboardic auto-close script (to be used with "Put Icon in Tray" option)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Clipboardic is a clipboard manager for Windows by Nir Sofer (http://nirsoft.net). | |
; It does have a "stay in tray" option, but does not have a "start minimized" one. | |
; This script, when added to Startup, waits for the Clipboardic window to appear, closes it, | |
; and if it doesn't appear for a given amount of seconds (should be passed to the script, | |
; depends on your average load time, defaults to 5), unloads itself. | |
#NoEnv | |
SendMode Input | |
SetWorkingDir %A_ScriptDir% | |
StartTime := A_TickCount | |
SecondsElapsed := 0 | |
Timeout := 5 | |
if %0% > 0 | |
{ | |
Timeout := %1% | |
} | |
WinWait, Clipboardic, , (Timeout) | |
if ErrorLevel | |
{ | |
return ; Clipboardic is already hidden or not running yet | |
} | |
else | |
{ | |
WinClose ; Just send a WM_CLOSE message to the window (as if you clicked on the (x) icon) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment