The idea is to have a picture icon and a small timer under it that will countdown from say 8 seconds, and I'd like the timer to not reset until it reaches 0, currently it will reset anytime the hotkey is pressed even if it's in the middle of cooldown.
Eventually I'd like to add around 5 icons/timers but right now I'm starting with 1 until I figure things out more.
Some questions I have/things I'd like to do with this:
How do I make the icon transparent? setting transparency doesn't seem to work.
How do I remove the gray bar where the timer is located? Ideally I'd love to have say a green colored bold timer with the numbers slightly bigger, and for the numbers to just be sitting there under the icon without the gray gui/boarder/whatever that is.
How do I edit the timer to include Milliseconds? I don't really need the HH:MM:SS Format, mainly I need MM:SS.MS or even SS.MS
How do I make it click-through? I thought +E0x20 was the correct setting but it doesn't appear to be working for me.
Thanks very much! If anyone can help me out with this I'd very much appreciate it a lot!
Code: Select all
#SingleInstance Force
;-------------------------------------------------------------------------------------------------------------------------------
TimerXY = x0 y100 w50
;-------------------------------------------------------------------------------------------------------------------------------
FormatSeconds(NumberOfSeconds) ;Convert the specified number of seconds to hh:mm:ss format.
{
hours := Format("{:02}", NumberOfSeconds//3600)
ts := 1601
ts += NumberOfSeconds, s
FormatTime, var, % ts, %hours%:mm:ss
Return var
}
;-------------------------------------------------------------------------------------------------------------------------------
TransColor = 0xdddddd
WinSet, Transparent, 100
Gui, 1:Color, %TransColor%
Gui, 1:+E0x20 -Caption +LastFound +ToolWindow +AlwaysOnTop
Gui, 1: Add, Picture, x0 y0 w100 h100 +BackgroundTrans, 13093614.png
Gui, 1:Font, s9, Comic Sans MS
Gui, 1:Show, x900 y900 w100 h115, Wyverns
Gui, 1:Add, Text, %TimerXY% vTimer, -
Return
;=============================================================================================================================================================================================
;Timer
5::
Settimer, TimerCD, 1000
TimerVar := 8
TimerCD:
{
TimerVar--
GuiControl,, Timer, % FormatSeconds(TimerVar)
}
if TimerVar = 0
{
settimer, TimerCD, off
GuiControl,, Timer, -
}
Return
;=============================================================================================================================================================================================
F1::Exitapp