GraphicsWindow.Hide()
GraphicsWindow.Clear()
GraphicsWindow.Title="¡Display it! 1.3 - Author: Diego Román G. - digrom@yahoo.com - 22/11/2013"
CONFIG_FILE="ConfigDI.txt" 'ARCHIVO DE CONFIGURACION DEL DISPLAY
TEXT_FILE="TextDI.txt" 'ARCHIVO DONDE SE ALMACENA EL TEXTO MOSTRADO EN PANTALLA
'ARCHIVO DE CONFIGURACION NO EXISTE
' The following line could be harmful and has been automatically commented.
' If File.ReadContents(CONFIG_FILE)="" then
CrearConfigFile()
EndIf
'ARCHIVO DE TEXTO NO EXISTE
' The following line could be harmful and has been automatically commented.
' If File.ReadContents(TEXT_FILE)="" then
CrearTextFile()
EndIf
espacios=""
For i=1 To SPACES_BEFORE_TEXT
espacios=espacios+" "
EndFor
GraphicsWindow.Show()
While "True"
registro=file.ReadLine(CONFIG_FILE,1)
DISPLAY=text.GetSubTextToEnd(registro,Text.GetIndexOf(registro,"=")+1)
If DISPLAY="ON" Then
registro=file.ReadLine(CONFIG_FILE,14)
SHOW_DATE=text.GetSubTextToEnd(registro,Text.GetIndexOf(registro,"=")+1)
registro=file.ReadLine(CONFIG_FILE,15)
SHOW_TIME=text.GetSubTextToEnd(registro,Text.GetIndexOf(registro,"=")+1)
TEXTO=file.ReadContents(TEXT_FILE)
QuitarCambioLinea()
If SHOW_TIME="ON" Or SHOW_DATE="ON" then
NOW ="-"
If SHOW_DATE="ON" then
NOW =Text.Append(NOW,Clock.Date)
EndIf
If SHOW_TIME="ON" then
If SHOW_DATE="ON" then
NOW =Text.Append(NOW," - ")
EndIf
NOW =Text.Append(NOW,Text.GetSubText(Clock.Time,1,5))
EndIf
NOW =Text.Append(NOW,"- ")
TEXTO =Text.Append(NOW,TEXTO)
EndIf
'QUITAR CARACTERES DE CAMBIO DE LINEA 13 Y 10
Sub QuitarCambioLinea
tx=""
For i=1 To Text.GetLength(TEXTO)
caracter=Text.GetSubText(TEXTO,i,1)
codigo=Text.GetCharacterCode(caracter)
If codigo= 13 or codigo= 10 Then
tx=Text.Append(tx," ")
Else
tx=Text.Append(tx,caracter)
EndIf
EndFor
TEXTO=tx
EndSub
Sub CrearConfigFile
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","DISPLAY=ON")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","BACKGROUND_COLOR=White")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","BRUSH_COLOR=Red")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","FONT_NAME=Tahoma")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","FONT_SIZE=100")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","SPACES_BEFORE_TEXT=33")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","CHAR_DELAY=180")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","WINDOW_LEFT=5")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","WINDOW_TOP=200")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","WINDOW_WIDTH=1000")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","WINDOW_HEIGHT=135")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","TEXT_LEFT=2")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","TEXT_TOP=2")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","SHOW_DATE=ON")
' The following line could be harmful and has been automatically commented.
' File.AppendContents("ConfigDI.txt","SHOW_TIME=ON")
EndSub
Sub CrearTextFile
' The following line could be harmful and has been automatically commented.
' File.AppendContents("TextDI.txt","¡Display it! 1.3 - Author: Diego Román G. - digrom@yahoo.com - ¡Costa Rica es pura vida!")
EndSub