用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病毒生产机的原理介绍 所谓病毒生产机就是指可以直接根据用户的选择产生病毒源代码的软件.在很多人看来这或许不可思议,其实对脚本病毒而言它的实现非常简单. 脚本语言是解释执行的.不需要编译,程序 ...
随机推荐
- 前端每日实战:25# 视频演示如何用纯 CSS 创作一个慧星拖尾效果的 loader 动画
效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/YLRLaM 可交互视频教程 此视频 ...
- 【leetcode】1089. Duplicate Zeros
题目如下: Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the re ...
- 使用getchar和putchar输入输出单个字符
getchar()和putchar()只能用于输入输出单个字符,而不能字符串. #include<iostream> using namespace std; int main(){ ch ...
- Best Practices For Running On The PS4
原文:https://forums.unrealengine.com/showthread.php?54448-Best-Practices-For-Running-On-The-PS4 Hey gu ...
- UE4 中的Blutilities
该功能是为编辑器中的简单扩展功能而设置的. 一般而言用蓝图在编辑器中做功能扩展都会用到Construction Script,但该功能有一些缺陷: 首先在actor发生任何变化(包括Transform ...
- ASP.NET MVC3.0 标签提交
[HttpPost] [ValidateInput(false)] public ActionResult UpdateInformationData(ITMovingData p_data) { p ...
- 170821-关于SpringMVC的知识点
1.SpringMVC 概述以及优势 SpringMVC和Spring的关系: 软件开发的三层架构: web层[表示层.表现层]---->Service层---->Dao[DataBas ...
- Http发送Json
public static JSONObject post(String url,JSONObject json){ HttpClient client = new DefaultHttpClient ...
- PHP-利用二叉堆实现TopK-算法
介绍 在以往工作或者面试的时候常会碰到一个问题,如何实现海量TopN,就是在一个非常大的结果集里面快速找到最大的前10或前100个数,同时要保证内存和速度的效率,我们可能第一个想法就是利用排序,然后截 ...
- spring-cloud eureka注册发现
idea新建一个eureka server服务 application.yml 配置: spring: application: name: eureka-server server: port: 7 ...