番茄工作法: 專註於某一段時間,減少打斷,提高時間的感知和掌控。 25min工作+5min休息 周期:4x(25+5)+20 VBS代碼實現如下: 為適應強迫症增加vds定時器調用如下: ...
番茄工作法:
專註於某一段時間,減少打斷,提高時間的感知和掌控。
25min工作+5min休息
周期:4x(25+5)+20
VBS代碼實現如下:
1 Dim fso,f,count,time,shell 2 set fso=wscript.CreateObject("Scripting.FileSystemObject") 3 set f=fso.opentextfile("d:\test.txt",8,true) 4 Set shell = CreateObject("Shell.Application") 5 count = 1 6 for j = 1 to 3 7 for i = 1 to 4 8 time = Now 9 shell.ToggleDesktop 10 CreateObject("SAPI.SpVoice").Speak "開始持續25分鐘集中註意力" 11 MsgBox "hello,Start focusing in 25 minutes" 12 f.Write("Number of tasks started: ") 13 f.WriteLine(count) 14 f.WriteLine("Start focusing in 25 minutes at ") 15 f.WriteLine(time) 16 wscript.sleep 1000*60*25 17 time = Now 18 shell.ToggleDesktop 19 CreateObject("SAPI.SpVoice").Speak "集中註意力時間結束,開始持續5分鐘休息" 20 MsgBox "hello,Start resting in 5 minutes" 21 f.WriteLine("Start resting in 5 minutes at ") 22 f.WriteLine(time) 23 f.WriteBlankLines(1) 24 count=count+1 25 wscript.sleep 1000*60*5 26 next 27 time = Now 28 shell.ToggleDesktop 29 CreateObject("SAPI.SpVoice").Speak "4次番茄工作法迴圈結束,開始持續20分鐘休息" 30 MsgBox "hello,4 times tomato work method end" 31 f.WriteBlankLines(1) 32 f.Write("Number of tasks started: ") 33 f.WriteLine(j) 34 f.WriteLine("Start resting after 4 times tomato work method at ") 35 f.WriteLine(time) 36 wscript.sleep 1000*60*20 37 next 38 f.Close() 39 set f = nothing 40 set fso = nothing
為適應強迫症增加vds定時器調用如下:
1 Include "D:\test.vbs" 2 3 Sub Include(sInstFile) 4 Dim oFSO, f, s, w, time 5 Set oFSO = CreateObject("Scripting.FileSystemObject") 6 Set f = oFSO.OpenTextFile(sInstFile) 7 Set w = oFSO.opentextfile("d:\timing.txt",8,true) 8 count = 1 9 'wscript.sleep 1000*60*14 10 time = Now 11 MsgBox "hello,Start resting in 5 minutes" 12 CreateObject("SAPI.SpVoice").Speak "集中註意力時間結束,開始持續5分鐘休息" 13 w.Write("Number of tasks started: ") 14 w.WriteLine(count) 15 w.WriteLine("Start resting in 5 minutes at ") 16 w.WriteLine(time) 17 count=count+1 18 wscript.sleep 1000*60*3 19 s = f.ReadAll 20 f.Close 21 Set f = Nothing 22 Set oFSO = Nothing 23 ExecuteGlobal s 24 set w = nothing 25 End Sub