Página 1 de 1

Função time()

Enviado: 27 Out 2011 17:59
por Otavio-lucas
Olá pessoal estou começando a programar em clipper e estou tentando fazer um sistema de controle de estoque e gostaria de utilizar a função time(), para mostra o horario atual, funciona mais não está atualizando o horario automaticamente, como posso fazer para que isso aconteça.

Nota de Moderação:
por Pablo César: Este tópico foi movido da seção de Bate papo uma vez que o assunto é especifico desta sessão.

Função time()

Enviado: 27 Out 2011 18:05
por Pablo César
Otávio seja bem vindo ao fórum !

Você não conseguirá com a função time() deixar o relogio na tela. Para isso você irá precisa implementar no seu código a função SHOWTIME() da biblçoteca CT.LIB.

Coloque no inicio do seu programa:

SHOWTIME(00,70,.F.,"w+/b",.F.,.F.)

Olhe a sintaxe:
SHOWTIME([<nRow>], [<nColumn>], [<lMode>], [<cAttr|nAttr>], [<l12/24>], [<lAM/PM>]) --> cNull

Arguments
------------

<nRow> Designates the row where the time is displayed. The default
is the cursor row.

<nColumn> Designates the column where the time is displayed. The
default is the cursor column.

<lMode> Designates whether seconds are to appear in the time
display (.F.), or not (.T.). The default is display seconds (.F.).

<cAttr|nAttr> Designates to the screen attribute to use for the
time display. Strings in the form "NN/NN" or "CC/CC" (e.g., "0/7" or
"B/GR") are possible. The default is the setting for CLEARA (see
Introduction, Video Functions).

<l12/24> By designating this parameter as .T., a 12-hour display is
selected. The default is a 24-hour display (.F.).

<lAM/PM> If you have a 24-hour display, you may want to switch on
an am/pm display. When you specify this parameter as .T., an "a" or "p"
(as in DOS), appears to reflect the time. The default is no display
(.F.).

() A call without parameters uninstalls the time display.
E você terá que compilar o seu programa adicionando a CT.LIB, assim:

CLIPPER PROGRAMA
RTLINK FI PROGRAMA LIB CT

Verifique que a CT.LIB esteja na pasta LIB do Clipper. Qualquer dúvida pode perguntar, boa sorte !

Função time()

Enviado: 27 Out 2011 18:24
por Otavio-lucas
Obrigado, estou feliz em participar deste Fórum

Tentei utilizar a função SHOWTIME() mais ao compilar está aparencendo o seguinte erro, "undefined symbol (s) after library search"

Função time()

Enviado: 27 Out 2011 19:53
por Pablo César
Otavio-lucas escreveu:Tentei utilizar a função SHOWTIME() mais ao compilar está aparencendo o seguinte erro, "undefined symbol (s) after library search"
Veja o que eu tinha dito na minha mensagem anterior !
CLIPPER PROGRAMA
RTLINK FI PROGRAMA LIB CT

Verifique que a CT.LIB esteja na pasta LIB do Clipper. Qualquer dúvida pode perguntar, boa sorte !
Qual é a versão do seu Clipper ? Utilizas Rtlink ou Blinker ?

Função time()

Enviado: 02 Nov 2011 17:47
por Gilberto M Silva
Arquivo de lote para compilar o .prg principal
clipa.bat
@ECHO OFF
CLS
SET INCLUDE=C:\CLIPPER5\INCLUDE;
SET LIB=C:\CLIPPER5\LIB;
SET OBJ=C:\CLIPPER5\OBJ;
SET C:\CLIPPER5\BIN\CLIPPER=F140;
C:\CLIPPER5\BIN\CLIPPER PROGRAMA
C:\CLIPPER5\BIN\RTLINK FI PROGRAMA,C:\CLIPPER5\OBJ\TIMESLIC.OBJ LI DBFCDX.LIB LI CT52.LIB
PROGRAMA
DEL *.BAK
DEL *.OBJ
ECHO ON

Código: Selecionar todos

SHOWTIME(01,69,.F.)
01 = linha e 69 = coluna onde vc quer que a hora fique visivel