How to implement vbs reminder Mini Program
This article mainly introduces how to achieve vbs reminder Mini Program, the article is very detailed, has a certain reference value, interested friends must read it!
How to use it:
1. Save the following code as: Ring.vbs (the file name can be customized)
two。 Move Ring.vbs to the program startup group so that you can start automatically with WINDOWS (location: start-program-start, XP startup group location: C:\ Documents and Settings\ your user name\ "start" menu\ program\ start\)
3. I use Window's own Media Player to play music here, so first open your Media Player and save the "playlist in progress" to D:\ Music\ MyMusic.wpl (the save path can be customized, but you need to modify the strSoundFile path in the code below), and then you can automatically remind you by turning on your computer!
Note: if you are using Winamp to play music, you must change the path to the playlist file address of Winamp, and the values of strCommand and strCommand2, such as:
StrCommand = "C:\ Program Files\ Winamp\ winamp.exe / prefetch:1 / Task MediaLibrary" & Chr (34) & strSoundFile & Chr (34) 'play music
StrCommand2 = "taskkill / im winamp.exe" 'close the music program
'/ / the code starts
Set objShell = WScript.CreateObject ("WScript.Shell")
J = 60 'working time (minutes)
N = 10 'rest time (minutes)
AlertText = "take a break and listen to music" & Chr (10) & "move your neck and waist." & Chr (10) & "Life lies in exercise!" 'for reminders, Chr (10) is a newline character
AlertText2 = n & "it's time for a minute break. Get back to work!"
StrSoundFile = "D:\ Music\ MyMusic.wpl" 'Auto playlist address
StrCommand = "wmplayer.exe / prefetch:1 / Task MediaLibrary" & Chr (34) & strSoundFile & Chr (34) 'play music
StrCommand2 = "taskkill / im wmplayer.exe" 'close the music program
For I = 1 To 12'12 is the number of reminders
WScript.Sleep (1000 * 60 * j)
MsgBox alertText, 64
ObjShell.Run strCommand, 1, False
WScript.Sleep (1000 * 60 * n)
ObjShell.Run strCommand2, 0, True
MsgBox alertText2, 64
Next
'/ / end of code
The above is all the contents of the article "how to achieve vbs reminder Mini Program". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!