Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ryan778
GitHub Repository: Ryan778/Ryan778.github.io
Path: blob/master/bkmusic/tacos.js
574 views
1
/* RainingTacos.js
2
Copyright (C) 2017 Ryan Zhang.
3
Licensed under CC-BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
4
This means that you are free to modify it and redistribute it, but not removing the attribution (this text right here) or profiting from it.
5
6
To run, simply open the file.
7
To stop, simply restart the computer.
8
Once the script has been run, it can be deleted and the music will still play.
9
*/
10
11
var WShell = WScript.CreateObject('WScript.Shell');
12
var popup = WShell.popup('Background Music Player Troll\nCopyright (C) Ryan Zhang 2017. Licensed under CC-BY-NC 4.0\n\nPress OK to start the script or CANCEL to abort the script.\nOnce the script starts, the file can be deleted.', 0, 'Background Music Player Troll (Raining Tacos)', 1)
13
if(popup === 2){
14
WScript.Quit()
15
}
16
while (true){
17
var oPlayer = WScript.CreateObject('WMPlayer.OCX')
18
oPlayer.URL = 'https://ryan778.github.io/bkmusic/tracks/rainingtacos.mp3'
19
oPlayer.controls.play()
20
while (oPlayer.playState != 1 ){
21
WScript.Sleep (100)
22
}
23
oPlayer.close()
24
}
25