mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-05 10:04:48 +00:00
49 lines
896 B
Plaintext
49 lines
896 B
Plaintext
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
|