真诚倒计时(worktime clock)——一个只在工作窗口走字的倒计时器

前因,有人提问,于是我自己用autohotkey做了一个,不过不太满足题主要求,就另外发出一下,或许会满足其他人需要,比如我自己。

用法及使用效果:

打开后,会有一个小框

按照 时:分:秒 的格式,输入数字,软件便自动开始了
|
|

image
|
|
这个时钟会在每个软件的窗口三大键附近显示,很小巧不影响心流
但是只有当你在用目标窗口时,才会进行倒计时

你可以设定多个目标工作窗口,通过鼠标移到目标窗口按下快捷键ctrl+f1 即可!

|
|


|
|

GIF
|
|
倒计时结束后,会通过语音进行提醒
默认提示语是:你设定的道计时结束了,你设定的道计时结束了,你设定的道计时结束了!

通过按下ctrl + F2 ,设定其他提示语。


|

2 个赞

下载地址:
dogbean.ysepan.com

最适合人群,写小说的
用来看自己今天真实码了多久的字。

ahk代码

#Persistent
global if_start := 0
SetBatchLines, -1
FileDelete, dog.txt
yourwords := "你设定的道计时结束了,你设定的道计时结束了,你设定的道计时结束了!"

gui timer: New , , QQ_timer
gui timer: Color, EEAA99
gui timer: Font, s9 cRed Bold, Segoe UI
gui timer: Add, Edit, vMyEdit gstart w70 h18 -Wrap, %TempNote%
gui timer: -Caption +AlwaysOnTop
gui timer: Show
WinSet, TransColor, EEAA99 180, QQ_timer

SetTimer, timekiller, 1000
return

timekiller:
{
	if(if_start = 1)
	{
		time_array := StrSplit(MyEdit, ":")
		shi:=time_array[1]
		fen:=time_array[2]
		miao:=time_array[3]
		
		MouseGetPos, , , curWin, 
		WinExist("ahk_id " curWin)
		WinGetPos, wX, wY, wW, 
		xx:=wX + wW - 200
		Gui timer: Show , NA x%xx% y%wY%
		
		Loop, read, dog.txt
	{
    if (curWin = A_LoopReadLine)
    {
    is_act := 1
    }
	}
		if (is_act = 1)
		{
			if (shi=0)
				yushi:=0
			if (yushi=0 and fen=0)
				yufen:=0
			
			if (miao != 0)
				miao := miao - 1
			else if (yufen != 0)
			{
				miao:=59
				if (fen != 0)
					fen:= fen-1
				else if (yushi != 0)
				{
					fen:=59	
					if (shi != 0)
						shi:=shi-1
				}
			}
		}
		
		Newtime = %shi%:%fen%:%miao%
		if (shi=0 and fen=0 and miao=0)
		{
			run mshta vbscript:createobject("sapi.spvoice").speak("%yourwords%")(window.close)
			ExitApp
		}
		GuiControl, timer: Text, MyEdit ,%Newtime%
		gui timer: Submit, NoHide
		
		is_act := 0
	}
}
return

start:
	if(if_start = 0)
	{
	gui timer: Submit, NoHide
	if (StrLen(MyEdit) = 8)
	{
	if_start:=1
	}
	}
return

^F1::
MouseGetPos, , , msWin, 
FileAppend, %msWin%`n, dog.txt
return

^F2::
InputBox, yourwords , "请输入您的自定义提示语", , , 700, 120
return
1 个赞

这不得帮忙顶一个(虽然用不上)