Scripting help needed

Hello everybody,
This is my first post here so if this is not in the right area feel free to move it.
I am looking for help writing a script that will start DXPlayer playing when a time is reached. Basically a script to hit play when my alarm clock goes off. Thanks for the help.
1,917 views 1 replies
Reply #1 Top
I think something like this might work:

Sub Object_OnScriptEnter
Dim Alarm = "8:30:00 PM" 'Define alarm time
Dim Seconds = DateDiff(Now, Alarm) 'Returns number of second until the alarm goes of
Object.SetTimer 1, Seconds * 1000 'Convert to milliseconds
End Sub

Sub Object_OnTimer1
Set objPlayer = CreateObject("WMPlayer.OCX")
objPlayer.OpenPlayer("C:\path\to\some\file.mp3")
Sub