A2osX/EXAMPLES/CLOCK.txt
2020-01-28 15:20:23 -05:00

49 lines
896 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This is the A2osX Clock Example
#
# It makes extensive use of functions to display the current time.
#
# Because you cannot get the current time to a variable, this script
# puts the time into a tmp file and then reads it back into vars.
# If /RAM3 exists we will use that to hold the TMP file.
#
# Functions for displaying clock digits
#
# Print at Screen Location Function
# CALL PRINTXY Num_Row Num_Column Str_String
FUNCTION PRINTXY {
ECHO -N "\e[$1;$2H$3"
}
# Print Inverse At X Y
# CALL INVERSEXY Row Col String
FUNCTION INVERSEXY {
ECHO -N "\e[$1;$2H\e[7m$3\e[0m"
}
# CALL DispSpace Row Col
FUNCTION DispSpace
{
SET Row = $1
SET Col = $2
}
FUNCTION DispColon
{
SET Row = $1
SET Col = $2
}
FUNCTION DispHour
{
}
#Clear Screen
ECHO \f
MAN
TEXT /MAKE/USR/SHARE/EXAMPLES/CLOCK