This isn't exactly the same idea, but somewhat similar:
;;; ClipDate v0.1 bLisTeRinG 2004 ;;;
#Persistent
tmSave = %Clipboard%
tmIni = ClipDate.ini
FileInstall, ClipDate.ini, %A_ScriptDir%\%tmIni%, 0
iniRead, tmClp, %tmIni%, options, iniFile
iniRead, db, %tmIni%, options, debug
Loop, 14
{
iniRead, tmM, %tmIni%, menu, menu%a_index%
iniRead, tmC, %tmIni%, menu, code%a_index%
If tmM = Error
{
Break
}
Else
{
tmC%a_index% = %tmC%
Menu, Tray, add, %tmM%, tmGo
IfEqual, db, yes, MsgBox, iniFile:`t%tmIni%`nmenu:`t%tmM%`nvar:`ttmC%a_index%`ncode:`t%tmC%`ndebug:`t%db%
}
}
Menu, Tray, add,
Menu, Tray, add, Clip&Date, tmCD
Menu, Tray, add, Clip&Time, tmCT
Menu, Tray, add, Clip&Both, tmCB
Menu, Tray, add,
Menu, Tray, add, &KeepOpen, tmKeep
IfExist, %tmClp%, Menu, Tray, add, &Clipboard, tmClip
Menu, Tray, add, E&xit, tmExit
Menu, Tray, icon, %a_WinDir%\Clipbrd.exe
Menu, Tray, tip, %Clipboard%
Menu, Tray, default, Clip&Date
Menu, Tray, nostandard
Menu, Tray, show
Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; presets
tmCB:
FormatTime, tmT, , h:mm tt
Clipboard = %tmT% %a_dddd% %a_mmmm% %a_dd% %a_yyyy%
Menu, Tray, default, Clip&Both
Goto tmTT
tmCD:
Clipboard = %a_dddd% %a_mmmm% %a_dd% %a_yyyy%
Menu, Tray, default, Clip&Date
Goto tmTT
tmCT:
FormatTime, tmT, , h:mm tt
Clipboard = %tmT%
Menu, Tray, default, Clip&Time
Goto tmTT
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; routines
tmTT:
Tooltip, %Clipboard%
Menu, Tray, Tip, %Clipboard%
SetTimer, tmTTX, 7000
IfEqual, tmKeep, yes, Menu, Tray, show
Return
tmKeep:
If tmKeep = yes
{
tmKeep = no
Menu, Tray, uncheck, &KeepOpen
}
Else
{
tmKeep = yes
Menu, Tray, check, &KeepOpen
}
Menu, Tray, show
Return
tmClip:
Run, %tmClp%
Menu, Tray, show
Return
tmTTX:
SetTimer, tmTTX, Off
ToolTip,
If tmKeep = yes
{
Return
}
Goto tmExit
tmExit:
IfWinExist, Clipboard Viewer
{
WinClose,
}
Clipboard = %tmSave%
ExitApp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; get settings
tmGo:
;;; Keep the last chosen MenuItem as double-click default.
Menu, Tray, default, %A_ThisMenuItem%
;;; Get Menu# to choose Variable# (tm) & Clear Clipboard.
Transform, tm, deref, `%tmC%a_ThisMenuItemPos%`%
Clipboard =
;;; Split variable(tm) into Array (tmA1...tmAx)
StringSplit, tmA, tm, %A_Space%, `%`,
;;; Get Items from Line (raw:tmB fixed:tmD)
Loop, 10
{
tmB = `%tmA%a_index%`%
Transform, tmD, deref, %tmB%
IfEqual, tmD, , Break
tmE = `%%tmD%`%
tmF =
Transform, tmF, deref, %tmE%
;ToolTip, D:`t%tmD%`nF:`t%tmF%
;Sleep, 2000
If tmF =
{
;msgbox, Table
If tmD = a_mmmm
{
tmF = %a_mmmm%
}
If tmD = a_mmm
{
tmF = %a_mmm%
}
If tmD = a_dddd
{
tmF = %a_dddd%
}
If tmD = a_ddd
{
tmF = %a_ddd%
}
If tmD = comma
{
tmF = `,%a_space%
}
;ToolTip, Table:`t%tmF%
;Sleep, 2000
Clipboard = %Clipboard%%tmF%
}
Else
{
Clipboard = %Clipboard% %tmF%
}
IfEqual, db, yes, MsgBox, item:`t%a_index%`nB Raw:`t%tmB%`nD Code:`t%tmD%`nE Raw:`t%tmE%`nF String:`t%tmF%`nClip:`t%Clipboard%
}
tmA1=
tmA2=
tmA3=
tmA4=
tmA5=
tmA6=
tmA7=
tmA8=
tmA9=
tmB=
tmD=
tmE=
tmF=
Goto tmTT
Anyway it might be ok for someone...
gq.