home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 41,866 of 42,547   
   Arlen Holder to All   
   Re: Found this speaking time vbs batch s   
   13 Jun 20 05:28:14   
   
   XPost: alt.comp.freeware, alt.comp.os.windows-10   
   From: arlenholder@newmachine.com   
      
   As always, striving to add on-topic technical value with every post,   
   below is another template users may benefit from testing out.   
      
   It covers the four main conditions we spoke about prior:   
   . 11:59PM => Good evening; the current time is eleven fifty nine pm   
   . 12:00AM => Goood morning; the current time is 12 o'clock midnight   
   . 12:01AM => Goood morning; the current time is 12 oh one am   
   etc.   
      
   Set Sapi = Wscript.CreateObject("SAPI.SpVoice")   
    dim str   
    if hour(time) < 12 then   
    Sapi.speak "Good Morning TechLog"         ' Add Your Own Greetings   
   Message.   
    else   
    if hour(time) > 12 then   
    if hour(time) > 16 then   
    Sapi.speak "Good evening TechLog"		   ' Add Your Own Greetings Message.   
    else   
    Sapi.speak "Good afternoon TechLog"	   ' Add Your Own Greetings Message.   
    end if   
    end if   
    end if   
    Sapi.speak "The current time is"           ' Add Your Own Time Greetings   
   Message.   
   if hour(time) > 12 then   
    Sapi.speak hour(time)-12   
    else   
    if hour(time) = 0 then   
    Sapi.speak "12"   
    else   
    Sapi.speak hour(time)   
    end if   
    end if   
   if minute(time) < 10 then   
    Sapi.speak "o"   
    if minute(time) < 1 then   
    Sapi.speak "clock"   
    else   
    Sapi.speak minute(time)   
    end if   
    else   
    Sapi.speak minute(time)   
    end if   
   if hour(time) > 12 then   
    Sapi.speak "P.M."   
    else   
    if hour(time) = 0 then   
    if minute(time) = 0 then   
    Sapi.speak "Midnight"   
    else   
    Sapi.speak "A.M."   
    end if   
    else   
    if hour(time) = 12 then   
    if minute(time) = 0 then   
    Sapi.speak "Noon"   
    else   
    Sapi.speak "P.M."   
    end if   
    else   
    Sapi.speak "A.M."   
    end if   
    end if   
    end if   
   --   
   Source:   
      
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca