用vbs脚本简易实现 番茄工作法
番茄工作法:
专注于某一段时间,减少打断,提高时间的感知和掌控。
25min工作+5min休息
周期:4x(25+5)+20
VBS代码实现如下:
Dim fso,f,count,time,shell
set fso=wscript.CreateObject("Scripting.FileSystemObject")
set f=fso.opentextfile("d:\test.txt",,true)
Set shell = CreateObject("Shell.Application")
count =
for j = to
for i = to
time = Now
shell.ToggleDesktop
CreateObject("SAPI.SpVoice").Speak "开始持续25分钟集中注意力"
MsgBox "hello,Start focusing in 25 minutes"
f.Write("Number of tasks started: ")
f.WriteLine(count)
f.WriteLine("Start focusing in 25 minutes at ")
f.WriteLine(time)
wscript.sleep **
time = Now
shell.ToggleDesktop
CreateObject("SAPI.SpVoice").Speak "集中注意力时间结束,开始持续5分钟休息"
MsgBox "hello,Start resting in 5 minutes"
f.WriteLine("Start resting in 5 minutes at ")
f.WriteLine(time)
f.WriteBlankLines()
count=count+
wscript.sleep **
next
time = Now
shell.ToggleDesktop
CreateObject("SAPI.SpVoice").Speak "4次番茄工作法循环结束,开始持续20分钟休息"
MsgBox "hello,4 times tomato work method end"
f.WriteBlankLines()
f.Write("Number of tasks started: ")
f.WriteLine(j)
f.WriteLine("Start resting after 4 times tomato work method at ")
f.WriteLine(time)
wscript.sleep **
next
f.Close()
set f = nothing
set fso = nothing
为适应强迫症增加vds定时器调用如下:
Include "D:\test.vbs" Sub Include(sInstFile)
Dim oFSO, f, s, w, time
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set f = oFSO.OpenTextFile(sInstFile)
Set w = oFSO.opentextfile("d:\timing.txt",,true)
count =
'wscript.sleep 1000*60*14
time = Now
MsgBox "hello,Start resting in 5 minutes"
CreateObject("SAPI.SpVoice").Speak "集中注意力时间结束,开始持续5分钟休息"
w.Write("Number of tasks started: ")
w.WriteLine(count)
w.WriteLine("Start resting in 5 minutes at ")
w.WriteLine(time)
count=count+
wscript.sleep **
s = f.ReadAll
f.Close
Set f = Nothing
Set oFSO = Nothing
ExecuteGlobal s
set w = nothing
End Sub
用vbs脚本简易实现 番茄工作法的更多相关文章
- 使用vbs脚本进行批量编码转换
使用vbs脚本进行批量编码转换 最近需要使用SourceInsight查看分析在Linux系统下开发的项目代码,我们知道Linux系统中文本文件默认编码格式是UTF-8,而Windows中文系统中的默 ...
- 在本地主机上powershell中连接远程主机执行vbs脚本,得到执行结果(2008版及以上)
在桌面版的主机上远程管理服务器版主机,在本地powershell中连接远程主机执行vbs脚本,得到执行结果. 执行步骤: 1.将本地主机上的Hyper.vbs复制到远程连接主机上.例如,本地vbs脚本 ...
- [VBS]脚本中的字典、动态数组、队列和堆栈
今天用VBS脚本写了几个程序,用到了字典(Dictionary).动态数组(ArrayList).队列(Queue)和堆栈(Stack).现在写篇Blog总结一下 :-) 1.编写环境 今天突发奇想下 ...
- Vbs脚本经典教材(转)
Vbs脚本经典教材(最全的资料还是MSDN) —为什么要使用Vbs? 在Windows中,学习计算机操作也许很简单,但是很多计算机工作是重复性劳动,例如你每周也许需要对一些计算机文件进行复制.粘贴.改 ...
- Pomodairo,番茄工作法-应用篇
传统: 选择一个待完成的任务 将番茄时间设为适合自己的固定时间 专注工作,中途不允许做任何与该任务无关的事,直到番茄时钟响 ...
- Pomodairo,番茄工作法-解刨篇
处于“信息大爆炸”的 e 时代的我们每天必定要处理很多的事情,不管是工作.学习.生活......面对这么多的纷杂的事物我们将如何应对?如何做到有条不紊的进行?高效.轻松.愉快的完成它呢?这时一款精致的 ...
- 用VBS脚本发邮件
需求是这样的:针对账号的管理,如果发现该账号的管理员给账号加了批注,(比如要过期,修改密码,完善资料等),就需要找到这样的账号及其管理的邮件,然后发邮件给他们的管理员同时抄送给账号以达到提醒的目的.那 ...
- 监视系统3389的VBS脚本
Title: 监视系统3389的VBS脚本 --2010-10-27 19:56 从网上找的,不知道是不是NP写的那个 ---------------------------------------- ...
- VBS脚本病毒特点及如何防范3(转)
5.Vbs病毒生产机的原理介绍 所谓病毒生产机就是指可以直接根据用户的选择产生病毒源代码的软件.在很多人看来这或许不可思议,其实对脚本病毒而言它的实现非常简单. 脚本语言是解释执行的.不需要编译,程序 ...
随机推荐
- Java 根据银行卡号获取银行名称以及图标
转 https://blog.csdn.net/N_007/article/details/78835526 参考 CNBankCard 中国各大银行卡号查询 一.支付宝接口获取名称 根据 卡号 获取 ...
- hdu 4845 : 拯救大兵瑞恩 (bfs+状态压缩)
题目链接 #include<bits/stdc++.h> using namespace std; typedef long long LL; int n,m,p,s,k; ,,,-}; ...
- Netty模型
- Oracle中start with...connect by/start with…connect by prior子句的用法
connect by 是结构化查询中用到的,其基本语法是:select … from tablenamestart with 条件1connect by 条件2where 条件3;例:select * ...
- Spring Security 3.1 中功能强大的加密工具 PasswordEncoder
Spring Security 3.1 中功能强大的加密工具 PasswordEncoder 博客分类: security spring springsecurity 好吧,这种加密机制很复杂,还是 ...
- jpa remove
直接使用em.remove会报错,IllegalArgumentException: Removing a detached instance 即对象处于脱管的状态,使用merge使之被session ...
- Sending forms through JavaScript[form提交 form data]
https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/Sending_forms_through_JavaScript As in the ...
- ctcss
CTCSS解码器基于非常窄的带通滤波器,其通过所需的CTCSS音调.滤波器的输出经过放大和整流,只要存在所需的音调,就会产生直流电压.直流电压用于打开,启用或取消静音接收器的扬声器音频级.当音调存在时 ...
- p5342 [TJOI2019]甲苯先生的线段树
分析 代码 #include<bits/stdc++.h> using namespace std; #define int long long ],yy[],cnt1,cnt2; ][ ...
- 牛客2019提高D1t1 最短路
分析 我们发现可以按照ai从小到大排序 边的大小就是当前的a减去前面第一个不等于它的a 代码 #include<iostream> #include<cstdio> #incl ...