Greetings robot community, I would like to run DJ's example of time and date using C#Script ...or...the .EZB file. I thought at one time there was a control script for C# ......and the Example-Script-CSpeakTimeDate.EZB is not found in the Cloud....I have searched the Forum hi and low for the answer..to no avail. I know the answer will be very simple! ...its the questions that are hard:)
It may be due to lack of sleep and being borderline exhausted but what are you trying to do? Have the robot speak the time and date?
If so it's pretty simple using EZ-Script, there are variables for the hour, minute, second, dayName, month, day, year etc.
A simple script of;
SayWait($dayName)
Will have the robot speak the day name, i.e. "Sunday"
Or use the hour and minute to say the time, with some ifs to get it to say it correctly (so rather than saying 11 10 pm it would say 10 past 11 pm), just use the $hour and $minute variables.
# Work out correct formatting for speaking the time
# 24 hour to 12 hour conversion
IF($hour >12)
$12hour = $hour - 12
$ampm = "PM"
Else
$12hour = $hour
$ampm = "AM"
EndIf
IF($minute < 30)
SayWait("It is "+$minute+" past "+$12hour+" "+$ampm)
Else
SayWait("It is "+$12hour+" "+$minute+" "+$ampm)
EndIF
The code would need some more work (probably at midnight and on the hour when there are 0s involved), it was just knocked up in about 3 minutes as an example but hopefully it gives you an idea.
It does give me an idea( a good one) and go to bed!.....thank you so much..go to bed....:) When you back awake .....where does the script "find" the time to be able to output it? or how does the script "acquire" the time from the pc? ...Thanks so much Rich, as always
EDIT: Found the answer to... where does the script " find " the time ..................!Variable Constants/Reserved Words! within EZ Script functions
Greetings robot community, I would like to run DJ's example of time and date using C#Script ...or...the .EZB file. I thought at one time there was a control script for C# ......and the Example-Script-CSpeakTimeDate.EZB is not found in the Cloud....I have searched the Forum hi and low for the answer..to no avail. I know the answer will be very simple! ...its the questions that are hard:)
It may be due to lack of sleep and being borderline exhausted but what are you trying to do? Have the robot speak the time and date?
If so it's pretty simple using EZ-Script, there are variables for the hour, minute, second, dayName, month, day, year etc.
A simple script of;
Will have the robot speak the day name, i.e. "Sunday"
Or use the hour and minute to say the time, with some ifs to get it to say it correctly (so rather than saying 11 10 pm it would say 10 past 11 pm), just use the $hour and $minute variables.
The code would need some more work (probably at midnight and on the hour when there are 0s involved), it was just knocked up in about 3 minutes as an example but hopefully it gives you an idea.
It does give me an idea( a good one) and go to bed!.....thank you so much..go to bed....:) When you back awake .....where does the script "find" the time to be able to output it? or how does the script "acquire" the time from the pc? ...Thanks so much Rich, as always
EDIT: Found the answer to... where does the script " find " the time ..................!Variable Constants/Reserved Words! within EZ Script functions