FN-GM Posted June 11, 2008 Posted June 11, 2008 Hi I would like some VBS code that will call a subroutine at 13:30 if anyone could help that will be good. Thanks. Z
SYNACK Posted June 11, 2008 Posted June 11, 2008 This looks like kind of what you want: scripting vbscript For fun: a VBS alarm clock SetAlarm.vbs Set ws = WScript.CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") when = InputBox("When do you want to wake up?") 'needs to be in military time! e.g. 14:15 for 2:15 PM Set f = fso.OpenTextFile("C:\AlarmFlag.txt",2,true) f.Write "On" f.close ws.Run("at " & when & " ""C:\Alarm.vbs""") it schedules a separate vbs file to be run at a time specified but you could probably either break up your code into multiple files or use command line arguments to specify which bit of code you want it to run when triggered. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now