Practical VBS Reminder APPLET _vbs

Source: Internet
Author: User
Tags chr prefetch
How to use:
1. Save the following code as: Ring.vbs (file name can be customized)
2. Move Ring.vbs to the program Startup group, which can be started automatically with Windows (location: Start-Program-Start, XP Startup group location is: C:\Documents and Settings\ your username \"Start menu \ program \ Boot \)
3. I'm using the window's own media player to play the music, so open your media player and save the "playing list" to D:\Music\ MYMUSIC.WPL (Save the path can be customized, but to the next in the code to modify the Strsoundfile path), you can only turn on the computer to automatically remind!
Note: If you are using Winamp to play music, you will have to change the path to Winamp playlist file address, and strcommand and StrCommand2 values such as:
strcommand = "C:\Program files\winamp\winamp.exe/prefetch:1/task medialibrary" & Chr (+) & Strsoundfile & C HR (34) ' Play Music
StrCommand2 = "Taskkill/im winamp.exe" ' Close music program
'/////////////////////////////code starts
Set Objshell = WScript.CreateObject ("Wscript.Shell")
j = 60 ' working Time (minutes)
n = 10 ' break Time (minutes)
Alerttext = "Rest, listen to music" & Chr (Ten) & "activities around the neck, waist." "& Chr &" Life is sports!! "' Reminder content, CHR (10) is a line feed
ALERTTEXT2 = n& "Minutes break time, keep working!" "
Strsoundfile = "D:\MUSIC\MYMUSIC.WPL" Auto Playlist address
strcommand = "Wmplayer.exe/prefetch:1/task medialibrary" & Chr (+) & Strsoundfile & Chr (34) ' Play Music
StrCommand2 = "Taskkill/im wmplayer.exe" ' Close music program
For i = 1 to 12 ' 12 the number of reminders
Wscript.Sleep (1000 * j)
MsgBox Alerttext, 64
Objshell.run strcommand, 1, False
Wscript.Sleep (1000 * N)
Objshell.run strCommand2, 0, True
MsgBox ALERTTEXT2, 64
Next
'/////////////////////////////code end

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.