+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Code to call a sub routine at a certain time. in Coding and Web Development; Hi I would like some VBS code that will call a subroutine at 13:30 if anyone could help that will ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,374
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468

    Code to call a sub routine at a certain time.

    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

  2. #2

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,271
    Thank Post
    884
    Thanked 2,749 Times in 2,322 Posts
    Blog Entries
    11
    Rep Power
    785
    This looks like kind of what you want:
    scripting vbscript For fun: a VBS alarm clock

    Code:
    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.

  3. Thanks to SYNACK from:

    FN-GM (11th June 2008)



SHARE:
+ Post New Thread

Similar Threads

  1. Call Parents/Truancy Call
    By webman in forum MIS Systems
    Replies: 8
    Last Post: 7th March 2009, 07:10 PM
  2. SQL Code
    By wesleyw in forum Coding
    Replies: 3
    Last Post: 17th April 2008, 04:08 PM
  3. VBS File takes long time to load 1st time?
    By Samson in forum Scripts
    Replies: 3
    Last Post: 4th September 2007, 08:40 AM
  4. Who works term time only? How many full time?
    By gwendes in forum General Chat
    Replies: 45
    Last Post: 10th February 2007, 06:38 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •