下载地址:
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