topic stringlengths 1 63 | text stringlengths 1 577k ⌀ |
|---|---|
Codigos de tecla | Antonio,
Gracias por responder.
¿ Quisiste decir que pregunte en el ::keydown() por las 2 teclas ?
Seria asi por ejemplo
METHOD KeyDown(nKey, nFlags)
IF nKey == 43 .OR. nKey == OTRO_VALOR_DE_LA_TECLA_MAS
......
ENDIF
RETURN NIL |
Codigos de tecla | En algunos casos tengo búsquedas que se disparan si presiono alguna tecla, cuando utilizo el teclado numérico ( y la búsqueda es numérica ) el primer caracter que me muestra es uno alfanumérico. Pero si utilizo la calculadora de windows no sucede. Por qué ???
Salu2 |
Codigos de tecla | Horacio,
Puedes mostrar el código que usas ? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Coding issue / Harbour 3/ MSVC | I am having a problem with a small piece of code using Codejock Calendar. Perhaps someone can tell me what is wrong. The configuration with xHarbour(.com)/xCC works fine, but the Harbour 3.0/MSVC 2010 does not.
[u:eqvns3aj]Here is the manual instruction from Codejock:[/u:eqvns3aj]
Remarks
Any number and any type of objects can be attached to an event using the Property collection.
When adding a custom property, a string name must be given to the custom property. This string name will also be used to retreive the custom property from the collection.
Example
[CustomProperties Sample (Visual Basic)] This sample illustrates how to get and set custom properties for an event.
Dim NewEvent As CalendarEvent
Set NewEvent = CalendarControl.DataProvider.CreateEvent
'Add some custom properties
NewEvent.CustomProperties.Property("String Value") = "Hello"
NewEvent.CustomProperties.Property("Numeric") = 500
NewEvent.CustomProperties.Property("Boolen Value") = False
'Retrieve the custom property
Dim nInt As Integer
nInt = NewEvent.CustomProperties.Property "Numeric"
[b:eqvns3aj][u:eqvns3aj]So I’m assigning a custom ID to each record that is processed.[/u:eqvns3aj][/b:eqvns3aj]
[u:eqvns3aj]In xHarbour it was written as:[/u:eqvns3aj]
:CustomProperties:Property( "id", ::oApt:aptuid )
[u:eqvns3aj]And in Harbour ( that doesn’t work ), I have written it as:[/u:eqvns3aj]
:CustomProperties:Property( "id" ) = ::oApt:aptuid
[b:eqvns3aj]When trying to compile with Harbour/MSVC, it generates an error E0022 invalid lvalue[/b:eqvns3aj]
Any idea why ? |
Coger dato real de excel (SOLUCIONADO) | Hola,
Teniendo en la celda excel el dato formateado 104,24 internamente, realmente, la celda contiene 104,2412343 que es lo que devuelve Harbour
¿ Cómo podria hacer para que Harbour devuelva 104,24, es decir, el número ya formateado ?
Gracias anticipadas |
Coger dato real de excel (SOLUCIONADO) | Podrias pasarlos Str( xx,2) y luego devolver a numero con Val() |
Coger dato real de excel (SOLUCIONADO) | Gracias por tu interés, pero el truco era coger de la celda la propiedad :text y no :value
Lo incomodo es que :text podria contener coma decimal o punto decimal, dependiendo del formato de la celda. Y averiguar eso podria ser una locura. Asi que hice dos cosas:
1º Asumir que todo lleva coma decimal
2º Asegurar el proceso preveyendo posibles formateos de la celda que devolvieron malos val(:Text) haciendo Round(:Value, DECIMALES_CONTENIDOS_EN_PROPIEDAD_TEXT) y compararlo con el Val(:Text) |
Coger el texto del item seleccionado en un TTreeView | Muy buenas foro, tengo un pequeño problema a la hora de coger el texto del item seleccionado de un TTreeView, mira yo utilizo
oTree:GetSelected():GetParent():cPrompt
(estoy cogiendo el texto del padre del hijo seleccionado), el problema es que me introduce códigos raros despues del texto adquirido.
¿Como puedo solucionarlo?
Un Saludo. |
Coger fichero grafico/datos desde HTTP | Como podría coger un fichero gráfico (foto, etc...) o de datos (zip, doc, etc...) o ficheros en general siendo este el enlace (por ejemplo): [b:2q5nh832]http://www.fivetechsoft.com/images/logo5t2.gif[/b:2q5nh832]
Es decir, con alguna de las tecnicas de petición de páginas HTTP coger ficheros alojados en WEBs.
No se si me he explicado.
Por otro lado a veces el enlace es de este tipo [b:2q5nh832]http://www.planepictures.net/tshow.cgi?EC-HDT[/b:2q5nh832] y es una foto. |
Coger fichero grafico/datos desde HTTP | Me contesto yo solo... (lo encontre)
[code=fw:2wrd6e8q]<div class="fw" id="{CB}" style="font-family: monospace;">oHttp:=CreateObject<span style="color: #000000;">(</span><span style="color: #ff0000;">"WinHTTP.WinHTTPRequest.5.1"</span><span style="color: #000000;">)</span><br />oHttp:<span style="color: #000000;">SetTimeouts</span><span style="color: #000000;">(</span><span style="color: #000000;">30000</span>,<span style="color: #000000;">30000</span>,<span style="color: #000000;">30000</span>,<span style="color: #000000;">30000</span><span style="color: #000000;">)</span><br />oHttp:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"GET"</span>,<span style="color: #ff0000;">"http://www.fivetechsoft.com/images/logo5t2.gif"</span>,.F.<span style="color: #000000;">)</span><br />oHttp:<span style="color: #000000;">Send</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br />cImagen:=oHttp:<span style="color: #000000;">ResponseBody</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Aqui esta la salsa de todo</span><br />MemoWrit<span style="color: #000000;">(</span><span style="color: #ff0000;">"logo5t2.gif"</span>,cImagen<span style="color: #000000;">)</span></div>[/code:2wrd6e8q] |
Coger fichero grafico/datos desde HTTP | JMGARCIA,
Sabe como chamar esta função direto no site: analise(login,senha,string)
Exemplo de Conexão:
Linguagem PHP + Class nusoap
<?php
include_once('lib/nusoap.php');
// link do web service
$wsdl = 'http://www.phdrisk.com/padrao/webservice/server.php?wsdl';
$client = new nusoapclient($wsdl,true);
$registro = array();
$registro[] = "99999"; // login
$registro[] = "99999"; //senha
$registro[] = "<analisePHDRISK>…"; //string
print_r($client->call('analise',$registro));
?>
Link Web Service
<!-- m --><a class="postlink" href="https://www.phdrisk.com/padrao/webservi">https://www.phdrisk.com/padrao/webservi</a><!-- m --> ... r.php?wsdl
Fluxo
| analise(login,senha,string) |
USUARIO | ----------------------------------------- | PHDRISK
| stringRetorno |
| ----------------------------------------- |
Procedimento
Chamar a função analise passando por parâmetro o login, a senha, e o XML de envio, como retorno será enviado XML de retorno. |
Coger fichero grafico/datos desde HTTP | JM Garcia:
Gracias por la solucion, en algun momento puede que la necesitemos.. |
Coger fichero grafico/datos desde HTTP | [quote="SGS":22ig5blu]JMGARCIA,
Sabe como chamar esta função direto no site: analise(login,senha,string)
Exemplo de Conexão:
Linguagem PHP + Class nusoap
<?php
include_once('lib/nusoap.php');
// link do web service
$wsdl = 'http://www.phdrisk.com/padrao/webservice/server.php?wsdl';
$client = new nusoapclient($wsdl,true);
$registro = array();
$registro[] = "99999"; // login
$registro[] = "99999"; //senha
$registro[] = "<analisePHDRISK>…"; //string
print_r($client->call('analise',$registro));
?>
Link Web Service
<!-- m --><a class="postlink" href="https://www.phdrisk.com/padrao/webservi">https://www.phdrisk.com/padrao/webservi</a><!-- m --> ... r.php?wsdl
Fluxo
| analise(login,senha,string) |
USUARIO | ----------------------------------------- | PHDRISK
| stringRetorno |
| ----------------------------------------- |
Procedimento
Chamar a função analise passando por parâmetro o login, a senha, e o XML de envio, como retorno será enviado XML de retorno.[/quote:22ig5blu]
Hola
Lograste resolver este problema, agradeceria tu ayuda
saludos |
Coger fichero grafico/datos desde HTTP | JM,
Muy bueno, gracias por compartirlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Coger la version del fichero .exe | Muy buenas estoy intentando coger la version del fichero .exe de la PocketPc, he cogido una funcion programada en C pero me da muchos errores al compilar.¿ Me podreis decir algo sobre esto ?Un Saludo. |
Coger la version del fichero .exe | Estas usando FWH\samples\FileVer.prg ? |
Coger la version del fichero .exe | Si estoy usando esa funcion pero me dá errores como:Almacen.prg(1318) : error C2664: 'GetFileVersionInfoSizeW' : cannot convert parameter 1 from 'char *' to 'unsigned short *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style castAlmacen.prg(1326) : error C2065: 'GlobalAlloc' : undeclared identifierAlmacen.prg(1326) : error C2065: 'GMEM_MOVEABLE' : undeclared identifierAlmacen.prg(1326) : error C2440: 'initializing' : cannot convert from 'int' to 'void *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castAlmacen.prg(1332) : error C2065: 'GlobalLock' : undeclared identifierAlmacen.prg(1332) : error C2440: 'initializing' : cannot convert from 'int' to 'void *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castAlmacen.prg(1334) : error C2664: 'GetFileVersionInfoW' : cannot convert parameter 1 from 'char *' to 'unsigned short *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style castAlmacen.prg(1336) : error C2664: 'VerQueryValueW' : cannot convert parameter 2 from 'char [25]' to 'unsigned short *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style castAlmacen.prg(1393) : error C2664: 'VerQueryValueW' : cannot convert parameter 2 from 'char *' to 'unsigned short *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style castAlmacen.prg(1400) : error C2065: 'GlobalUnlock' : undeclared identifierAlmacen.prg(1401) : error C2065: 'GlobalFree' : undeclared identifierLINK : fatal error LNK1181: cannot open input file 'Almacen.obj'Un Saludo. |
Coger la version del fichero .exe | Muy buenas, ¿alguien sabe porqué me dan los errores anteriores?Un Saludo. |
Coger la version del fichero .exe | Softruz,Muéstranos el código de esa función. Por lo que puedo ver... hay que hacer algún trabajo extra para que funcione 100x100 en PPC. |
Coger la version del fichero .exe | Tienes que cambiar todas las llamadas a Global...() por Local...()Y en la función GetFileVersionInfoSize() te está pidiendo un puntero a una cadena "wide" en vez de a una cadena tradicional (char *). Tienes que usar AnsiToWide(). Revisa el código en C de FWPPC en donde usamos AnsiToWide() y WideToAnsi(). |
Coger un fichero por HTTP | Necesito la mejor forma de coger un fichero pot HTTP (puerto 80)
Es del tipo [b:1u7i0gvm]192.168.1.253/values.xml[/b:1u7i0gvm] por ejemplo.
Después sería cuestión de tratar ese XML que eso ya es otro cantar.
Gracias. |
Coger un fichero por HTTP | Hola,
Mira este post
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=11915&start=15">viewtopic.php?f=3&t=11915&start=15</a><!-- l -->
Espero que te sirva. |
Coger un fichero por HTTP | Gracias LucasDeBeltran, es lo que buscaba... <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> |
Cogido Barra equivalente a int2of5x1 36 | Estimados
Cual es el Cogido Barra equivalente a int2of5x1, 36 de la funcion de Cayetano Gome ?
gracias
David |
ColCharts in xBrowse with percent | It´s possible?
[img:1vntzwg3]http://acessosoft.com.br/images/chartpercent.png[/img:1vntzwg3] |
ColCharts in xBrowse with percent | shark,
please have a look at sample -> [color=#0000FF:ug2g38im]xbrprogb.prg [/color:ug2g38im]
[img:ug2g38im]http://www.pflegeplus.com/IMAGES/Progbar.jpg[/img:ug2g38im]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
ColCharts in xBrowse with percent | Shark,
You could probably turn off the cells lines (or paint them white) in the example Uwe mentioned to get a closer look to your sample.
James |
ColCharts in xBrowse with percent | [quote="ukoenig":26nmpiuc]shark,
please have a look at sample -> [color=#0000FF:26nmpiuc]xbrprogb.prg [/color:26nmpiuc]
[img:26nmpiuc]http://www.pflegeplus.com/IMAGES/Progbar.jpg[/img:26nmpiuc]
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->[/quote:26nmpiuc]
My cols is a CHART ( Fw_DrawShape() ). Is not a col with numeric values. |
ColCharts in xBrowse with percent | You can draw text using FW_SayText() over the same rectangle after drawing with FW_DrawShape() |
Colectores de datos | Estimados Srs.
Tengo un cliente con una maquina Zebex PDL-10L con una base CRD-10 Cradle y me ha podido que la ponga en funcionamiento.
El problema es que lo tiene sin ningún tipo de CD y/o manual.
A través de la página de Zebex [url:2mv5c53e]http://www.zebex.com[/url:2mv5c53e] y su modelo PDL-20 he conseguido ver como poder configurarla para que pida los datos que yo quiera y como volcar los datos a través del menú que aparece en ella.
Sin embargo, no se si existe la posiblidad de forzar a volcar los datos sin necesidad de entrar en su menú, ya que en él aparace toda la configuración de la misma.
He visto, lo que parece una serie de comando para enviar a la pistola, por ejemplo: <SOH><CR><LF>W<EOT> muestra la versión, pero no he conseguido hacerlo funcionar.
¿Alguno conoce el funcionamiento de estas pistolas?
¿Cómo puedo enviar a la pistola esos códigos? y ¿cómo y dónde devuelve la información solicitada?
He probado de la siguiente forma:
[code:2mv5c53e]nBytes := WriteComm( nComm, chr(1)+chr(13)+chr(10)+"W"+chr(4) )[/code:2mv5c53e]
No da error, nBytes coge un valor correcto y en base veo que se enciende el led RX, por tanto parece que envía la información correctamente, pero ya esta, no hace nada mas.
Gracias por vuestra ayuda |
Colectores de datos | Hola foro,
Esta claro que nadie a tenido que trabajar con maquinas Zebex. Es una pena.
Lo que creo que si me podíais ayudar es a como funciona el envío de ordenes a los puerto comm y recoger la información devuelta.
Uso las instrucciones de FWH para comunicación con un puerto comm
OpenComm( )
BuildCommDcb( )
SetCommState( )
oWnd:bCommNotify
EnableCommNotification( )
Y funciona correctamente.
Ahora esto tratando de probar
WriteComm()
Lo que no sé, es is la orden que envío con WriteComm fuerza a la maquina a devolver una cadena de caracteres, como puedo recogerla.
¿Debería recogerse automáticamente en bCommNotify?, ¿Hay que forzar de alguna manera el ReadComm?
Espero haberme explicado. |
Colectores de datos | Hola Fgondi:
Por la experiencia que tengo en comunicaciones seriales, todo depende del protocolo del aparato al que quieras comunicarte. Por ejemplo
abrirpuerto
mandar_enq
leer_ack
mandardatos
leer_ack
mandardatos
leer_ack
mandar_eot
leer_eot
CerrarPuerto
Esta secuencia es un ejemplo para comunicarse con una registradora NCR 2050.
Espero que te sirva de algo esta info |
Colectores de datos | Hola,
Muchas gracias cmsoft por tu respuesta. Por lo que leo de este tipo máquinas, usa ese mismo protocolo.
Lo que no se es como introduccirlo con código xHarbour/FWH
[code:2vrvt95o]AbrirPuerto
[/code:2vrvt95o]Lo OpenComm, BuildCommDcb, etc. para la apertura y escucha del puerto
[code:2vrvt95o]mandar_enq[/code:2vrvt95o]
Me imagino que sea WriteComm( nComm, chr(5)+CRLF )
[code:2vrvt95o]leer_ack[/code:2vrvt95o]Esto es lo que no se como hacer
[code:2vrvt95o]mandardatos[/code:2vrvt95o]Otra vez WriteComm con los datos/códigos a mandar
[code:2vrvt95o]leer_ack[/code:2vrvt95o]Esto es lo que no se como hacer
[code:2vrvt95o]mandar_eot[/code:2vrvt95o]WriteComm( nComm, chr(4)+CRLF )
¿Serias tan amable de ayudarme con el código que me falta? |
Colectores de datos | Hola foro,
Nadie puede ayudarme?
Gracias por vuestro tiempo |
Colectores de datos | Fernando,
fwh\samples\TestComm.prg sirve cuando es una comunicación rápida. Se envian datos y se lee una respuesta inmediata.
fwh\samples\phone.com es cuando la comunicación no es inmediata, sino que hay demoras y entonces hay que usar eventos. |
Colectores de datos | Disculpá la tardanza:
Aca te pongo el código que yo utilizo:
[code:1b1u2r00]FUNCTION crearbcc(p1)
LOCAL bcc,i
bcc = CHR(0)
FOR i = 1 TO LEN(p1)
bcc := charxor(bcc,SUBSTR(p1,i,1))
NEXT
RETURN bcc
FUNCTION abrirport(n)
LOCAL IdPort,cDcb,nError
IdPort := OpenComm("COM"+STR(n,1),1024,256)
IF IdPort <= 0
nError = GetCommError( IdPort)
MsgInfo( "Error al abrir: " + Str( nError ) )
ELSE
MsgRun("Puerto abierto como " + STR(IdPort))
ENDIF
IF ! BuildCommDcb("COM"+STR(n,1)+":9600,n,8,1" , @cDcb)
nError = GetCommError( IdPort)
MsgInfo( "Error al Configurar: " + Str( nError ) )
RETURN 0
ELSE
MsgRun("Puerto Configurado")
ENDIF
IF ! SetCommState( IdPort, cDcb )
nError = GetCommError( IdPort)
MsgInfo( "Error al setear: " + Str( nError ) )
RETURN 0
ELSE
MsgRun("Puerto Seteado")
ENDIF
RETURN IdPort
PROCEDURE mandar(port,string)
LOCAL nBytes
IF (nBytes := WriteComm( port,string) ) < 0
MsgAlert("Mando mal string")
ENDIF
RETURN
FUNCTION leer_ack(port)
LOCAL fallo, ack := " ", nBytes,i := 1
fallo = .t.
DO WHILE .t.
MsgWait("Leyendo Ack ","Espere",.15)
nBytes := ReadComm( port,@ack)
i++
IF i > 20 .or. ack <> " "
EXIT
ENDIF
ENDDO
IF ack <> ""
fallo = .f.
MsgInfo(asc(ack),memvar->musuanom)
ENDIF
RETURN fallo
FUNCTION leer_enq(port)
LOCAL fallo,enq:=" ",nBytes,i := 1
fallo = .t.
DO WHILE .t.
MsgWait("Leyendo Enq","Espere",.3)
nBytes := ReadComm( port,@enq)
i++
IF i > 20 .or. enq <> " "
EXIT
ENDIF
ENDDO
IF enq <> ""
fallo = .f.
MsgInfo(asc(enq),memvar->musuanom)
ENDIF
RETURN fallo
FUNCTION leer_eot(port)
LOCAL fallo,eot := " " ,nBytes,i := 1
fallo = .t.
DO WHILE .t.
MsgWait("Leyendo EoT","Espere",.3)
nBytes := ReadComm( port,@eot)
i++
IF eot = CHR(6)
MsgWait("Esperando por EoT","Espere",5)
LOOP
ENDIF
IF i > 20 .or. eot <> " "
EXIT
ENDIF
ENDDO
IF eot <> ""
fallo = .f.
MsgInfo(asc(eot),memvar->musuanom)
ENDIF
RETURN fallo
PROCEDURE mandar_eot(port)
LOCAL nBytes
*IF ( nBytes := WriteComm( port, "" )) <= 0
IF ( nBytes := WriteComm( port, CHR(4) )) <= 0
MsgAlert("Mando mal EOT")
ENDIF
RETURN
FUNCTION mandar_enq(port)
LOCAL mcont,retorno,nBytes
retorno = .t.
FOR mcont := 1 TO 10
* IF ( nBytes := WriteComm( port, "" )) <= 0
IF ( nBytes := WriteComm( port, CHR(5))) <= 0
MsgAlert("Mando mal ENQ")
retorno := .f.
ELSE
retorno := .t.
EXIT
ENDIF
MsgWait("Enviando datos...","Aguarde",1)
NEXT
RETURN retorno
PROCEDURE mandar_ack(port)
LOCAL nBytes
*IF ( nBytes := WriteComm( port, "" )) <= 0
IF ( nBytes := WriteComm( port, CHR(6))) <= 0
MsgAlert("Mando mal ACK")
ENDIF
RETURN
FUNCTION leer_bloque(port,n)
LOCAL bloque:= SPACE(n),bcc1,nBytes,i:=1
DO WHILE .t.
*MsgWait(bloque,"Espere",.2)
nBytes := ReadComm( port,@bloque)
i++
IF EMPTY(bloque)
MsgWait("Esperando ENQ","Espere",3)
mandar_enq(port)
LOOP
ENDIF
*bloque := IF(EMPTY(bloque),"",bloque)
IF i > 20 .or. bloque <> SPACE(n)
EXIT
ENDIF
ENDDO
bcc1 = crearbcc(SUBSTR(bloque,2,LEN(bloque)-2))
IF RIGHT(bloque,1) <> bcc1 .and. !(""$bloque)
*MsgAlert(OemtoAnsi(bloque),STR(ASC(bcc1))+" <> "+STR(ASC(RIGHT(bloque,1))))
MEMVAR->falla = .t.
ENDIF
RETURN bloque
[/code:1b1u2r00] |
Colectores de datos | Hola cmsoft,
Muchisimas gracias por tu respuesta.
Ahora entiendo como puedo obtener respuesta del aparato a las ordenes que le envío.
Con esto ya puedo probar el protocolo propio, que es practicamente identico al que usas, de la colectora de datos para hacerla funcionar de la forma deseada.
Antonio, gracias también por tu respuesta. Ya había visto los ejemplos pero lo que no entendía era como hacer el readcom de forma correcta.
Por cierto, y aunque no venga al caso, muy buena la evolución de la clase xbrowse. Con la evolución que lleva me ha hecho tomar la decisión de cambiar mis browse a dicha clase. |
Colgado al agregar un registro | Hola a todos
Para agregar un registro en un ambiente de red a un fichero dbf/cdx venía utilizando el codigo:
[code=fw:2hfx34ez]<div class="fw" id="{CB}" style="font-family: monospace;">nIntentos := <span style="color: #000000;">5</span><br />cAlias := <span style="color: #ff0000;">"ALIAS"</span><br />lUnLock := .F.<br /><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span>lUnLock<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> !NetErr<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Si no hay error</span><br /> <span style="color: #00C800;">RETURN</span> .t.<br /> <span style="color: #00C800;">EndIf</span><br /> <span style="color: #00C800;">If</span> nIntentos <=<span style="color: #000000;">0</span><br /> EXIT<br /> <span style="color: #00C800;">EndIf</span><br /> Depura<span style="color: #000000;">(</span><span style="color: #ff0000;">"Esperando 1/2 segundo para agregar un registro"</span><span style="color: #000000;">)</span><br /> syswait<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span><span style="color: #000000;">)</span><br /> nIntentos ++<br /><span style="color: #00C800;">ENDDO</span><br />Depura<span style="color: #000000;">(</span><span style="color: #ff0000;">"finAgregaRegistrocon error"</span><span style="color: #000000;">)</span><br /> </div>[/code:2hfx34ez]
Debido a que en algunas ocasiones me aparecían registros vacios modifique el codigo haciendo que despues de agregar el registro se mueva el puntero al registro que se acaba de añadir.
[code=fw:2hfx34ez]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span>lUnLock<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> !NetErr<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Si no hay error</span><br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbgoto<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> .t.<br /> <span style="color: #00C800;">EndIf</span><br /> </div>[/code:2hfx34ez]
Ahora en algunas ocasiones el programa se queda colgado cuando ejecuto la línea en la que se mueve el puntero
¿Alguna idea de que puede estar pasando? |
Colgado al agregar un registro | [code=fw:27fn3o9h]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> NEWRECORD<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">IF</span> NETERR<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Erro: Nao posso criar um novo registro "</span>, <span style="color: #ff0000;">"Confirma "</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">ENDIF</span> <br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">FUNCTION</span> RECORDLOCK<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// TRABAR REGISTRO.</span><br /><br /> <span style="color: #00C800;">LOCAL</span> ABORTED := .F. <br /> <span style="color: #00C800;">LOCAL</span> <span style="color: #00C800;">TRY</span> := <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .NOT. RLOCK<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> SYSREFRESH<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> INKEY<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span><span style="color: #000000;">)</span> <br /><br /> <span style="color: #00C800;">IF</span> ++<span style="color: #00C800;">TRY</span> > <span style="color: #000000;">10</span> <br /><br /> ABORTED := .T. <br /> EXIT <br /><br /> <span style="color: #00C800;">ENDIF</span> <br /><br /> <span style="color: #00C800;">ENDDO</span> <br /><br /> <span style="color: #00C800;">IF</span> ABORTED <br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Registro bloqueado por outro usuario"</span>, <span style="color: #ff0000;">"Confirma"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">ENDIF</span> <br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> ABORTED <span style="color: #000000;">)</span><br /> </div>[/code:27fn3o9h] |
Colgado al agregar un registro | Karinha, gracias por contestar
Lo que me propones es lo mismo que hago yo, pero como en ocasiones se generaban registros vacios le agrege el movimiento del puntero en el area de trabajo y ahora en determinadas ocasiones (no se exactamento cual el la situación) se queda colgado en la orden (dbgoto)
Tengo verirficado que el sistema se queda colgado en esa instrucción. Supongo que desde otro terminal se hizo algo pero no acabo de tener claro es lo que deja mal el otro terminal.
Lo que si hago para que desde otro terminal no se esté agregando registros al mismo ficheroes la de establecer un semaforo con un fichero excluisvo para que dos terminales no puedan estar intentando agregar un registro en el mismo dbf en el mismo momento
[code=fw:2uu81o91]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> BloquearAltaRegistro<span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span><br />Memvar oEntorno<br /><span style="color: #00C800;">Local</span> cSmf, nMani, nIntentos<br />cSmf := cPathDBF + cAlias + <span style="color: #ff0000;">"_NWR.SMF"</span><br />nIntentos := <span style="color: #000000;">5</span><br /><br /><span style="color: #00C800;">Do</span> <span style="color: #00C800;">WHILE</span> nIntentos > <span style="color: #000000;">0</span><br /> nMani := FCREATE<span style="color: #000000;">(</span> cSmf, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> nMani != <span style="color: #000000;">-1</span><br /> <span style="color: #00C800;">RETURN</span> nMani<br /> <span style="color: #00C800;">EndIf</span><br /> nIntentos--<br /><span style="color: #00C800;">ENDDO</span><br /><span style="color: #00C800;">RETURN</span> nMani<br /><span style="color: #B900B9;">//------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">FUNCTION</span> DesBloquearAltaRegistro<span style="color: #000000;">(</span>nMani, cAlias<span style="color: #000000;">)</span><br />Memvar oEntorno<br /><span style="color: #00C800;">Local</span> cSmf<br />fclose<span style="color: #000000;">(</span>nMani<span style="color: #000000;">)</span><br />cSmf := oEntorno:<span style="color: #000000;">cPathSmf</span> + cAlias + <span style="color: #ff0000;">"_NWR.SMF"</span><br />ferase<span style="color: #000000;">(</span>cSmf<span style="color: #000000;">)</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2uu81o91]
[code=fw:2uu81o91]<div class="fw" id="{CB}" style="font-family: monospace;">nSmf := BloquearAltaRegistro<span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span><br /><span style="color: #00C800;">If</span> nSmf == <span style="color: #00C800;">NIL</span><br /> <span style="color: #00C800;">return</span> .F.<br /><span style="color: #00C800;">EndIf</span><br />lSalida := AgregaRegistro<span style="color: #000000;">(</span>cAlias, lUnlock, nVeces<span style="color: #000000;">)</span><br />DesBloquearAltaRegistro<span style="color: #000000;">(</span>nSmf, cAlias<span style="color: #000000;">)</span></div>[/code:2uu81o91]
Un saludo |
Colgado al agregar un registro | Vacios, cuando? podrias poner ejemplo simples?
No me gusta esa lógica que presenta tú. Desculpas, se la escrita no está correcta... és portunhol. jajajaja.
Saludos. |
Colgado al agregar un registro | [quote="miarcod":3p0ag64s]Karinha, gracias por contestar
Lo que me propones es lo mismo que hago yo, pero como en ocasiones se generaban registros vacios le agrege el movimiento del puntero en el area de trabajo y ahora en determinadas ocasiones (no se exactamento cual el la situación) se queda colgado en la orden (dbgoto)
Tengo verirficado que el sistema se queda colgado en esa instrucción. Supongo que desde otro terminal se hizo algo pero no acabo de tener claro es lo que deja mal el otro terminal.
[/quote:3p0ag64s]
Hola intenta ponerle commit antes del dbgoto()
[quote="miarcod":3p0ag64s]Karinha, gracias por contestar
Lo que si hago para que desde otro terminal no se esté agregando registros al mismo ficheroes la de establecer un semaforo con un fichero excluisvo para que dos terminales no puedan estar intentando agregar un registro en el mismo dbf en el mismo momento
[/quote:3p0ag64s]
te refieres a que la clave indice no se repita? entonces antes de adicionar un new registro deberias hacerle un seek a la clave indice de tu dbf |
Colgado al agregar un registro | Buenos dias,
El programa se queda colgado, no siempre, solo en algunas ocasiones cuando se ejecuta la funcion dboto
[code=fw:1qhthnsj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span>lUnLock<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> !NetErr<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Si no hay error</span><br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbgoto<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> .t.<br /> <span style="color: #00C800;">EndIf</span><br /> </div>[/code:1qhthnsj]
Esto sucede aleatoriamente en cualquier fichero. El efecto es que en algunos terminales de red se quedan colgados, si embargo otros pueden seguir trabajando.
Los registros vacios se producen porque sospecho que el dbappend se ejecuta pero al quedarse colgado el proceso no se completa pues no se llega a ejecutar los correspondientes replaces
Sigo investigando.
Un saludo |
Colgado al agregar un registro | Buenas
Recuerdo que me pasaba lo mismo (hace muchos años), en entorno de red (REDES NOVELL).
Creo recordar que el problema es que no das tiempo a que se grabe fisicamente el registro. Debes darle un instante y forzar el grabado con el DBCOMMIT(), antes de refrescar.
[code=fw:3bvxq87f]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span>lUnLock<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> !NetErr<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Si no hay error</span><br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>->DBCommit<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// fuerza la escritura en el disco duro</span><br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>->dbGoTop<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Va al último registro</span><br /> sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> .t.<br /> <span style="color: #00C800;">EndIf</span><br /> </div>[/code:3bvxq87f] |
Colgado al agregar un registro | [quote="miarcod":gy6s2tzd]Hola a todos
Para agregar un registro en un ambiente de red a un fichero dbf/cdx venía utilizando el codigo:
[code=fw:gy6s2tzd]<div class="fw" id="{CB}" style="font-family: monospace;">nIntentos := <span style="color: #000000;">5</span><br />cAlias := <span style="color: #ff0000;">"ALIAS"</span><br />lUnLock := .F.<br /><br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span>lUnLock<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> !NetErr<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Si no hay error</span><br /> <span style="color: #00C800;">RETURN</span> .t.<br /> <span style="color: #00C800;">EndIf</span><br /> <span style="color: #00C800;">If</span> nIntentos <=<span style="color: #000000;">0</span><br /> EXIT<br /> <span style="color: #00C800;">EndIf</span><br /> Depura<span style="color: #000000;">(</span><span style="color: #ff0000;">"Esperando 1/2 segundo para agregar un registro"</span><span style="color: #000000;">)</span><br /> syswait<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span><span style="color: #000000;">)</span><br /> nIntentos ++<br /><span style="color: #00C800;">ENDDO</span><br />Depura<span style="color: #000000;">(</span><span style="color: #ff0000;">"finAgregaRegistrocon error"</span><span style="color: #000000;">)</span><br /> </div>[/code:gy6s2tzd]
Debido a que en algunas ocasiones me aparecían registros vacios modifique el codigo haciendo que despues de agregar el registro se mueva el puntero al registro que se acaba de añadir.
[code=fw:gy6s2tzd]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbAppend<span style="color: #000000;">(</span>lUnLock<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> !NetErr<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// Si no hay error</span><br /> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>dbgoto<span style="color: #000000;">(</span> <span style="color: #000000;">(</span>cAlias<span style="color: #000000;">)</span>-><span style="color: #000000;">(</span>RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span> .t.<br /> <span style="color: #00C800;">EndIf</span><br /> </div>[/code:gy6s2tzd]
Ahora en algunas ocasiones el programa se queda colgado cuando ejecuto la línea en la que se mueve el puntero
¿Alguna idea de que puede estar pasando?[/quote:gy6s2tzd]
Te sugiero que pruebes quitandole el neterror y la funcion depura(), a veces menos es mas, pruebalo asi haber si desaperece los registros vacios, yo he trabajado con dbf en red años y no he tenido ese problema solo usaba los comandos basicos: rlock() para bloquear registros, unlock() para desbloquear el registro, append() para añadir nuevo registros
Otra opcion podrias probar con DATABASE aqui en el foro hay bastantes ejemplos |
Collaboration Data Objects | All,
I use Collaboration Data Objects for sending emails via gmail. Once I get it working it seems to work well. Problem I run into is when moving it to another site and the ports may not be open. Is see that inbound we need 993, and 995, and outbound I am using 465 outbound. However when I look for information on the CDO documentation on the web, I always see a comment about how it is end of life, and I shouldn't be using it. What else is there, any suggestions? If there is something newer with better error reporting I'm in...
Thanks,
Byron ... |
Collate Copies | Hi to all!
How do I fix this code for printing 2 copies and collate copies ?
[code=fw:2h6ahjzy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"report.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> MAIN<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oPrn<br /><span style="color: #00C800;">LOCAL</span> oFnt1<br /><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn ;<br /> PREVIEW ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TEST"</span><br /> oPrn:<span style="color: #000000;">SetPortrait</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #000000;">SetCopies</span><span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-20</span> <span style="color: #0000ff;">OF</span> oPrn<br /><br /> <span style="color: #0000ff;">PAGE</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> <span style="color: #000000;">900</span> , <span style="color: #000000;">300</span> , <span style="color: #ff0000;">"PAGE 1"</span> , oFnt1 , , , , <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /><br /> <span style="color: #0000ff;">PAGE</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> <span style="color: #000000;">900</span> , <span style="color: #000000;">300</span> , <span style="color: #ff0000;">"PAGE 2"</span> , oFnt1 , , , , <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">ENDPAGE</span><br /><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFnt1<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2h6ahjzy]
I have to print in Yellow and White sheets in this way
White Yellow
Pag 1 , 1
Pag 2 , 2
Pag 3 , 3
and so on
Directly from my code without having to open preferences dialog (of printer)
Many thanks |
Collate Copies | I have this problem using an old program Visual Obiect and Report Pro too! |
Collate Copies | Marco,
try
[code=fw:r99wcqui]<div class="fw" id="{CB}" style="font-family: monospace;">PRNSETCOLLATE<span style="color: #000000;">(</span> lCollate <span style="color: #000000;">)</span> --> lSuccess</div>[/code:r99wcqui]
EMG |
Collate Copies | Ok,
I will try next year!
Many thanks Enrico |
Collecting all samples (source) from the forum | Hello,
I'v spend more time i looking up samples, topics enz... than actualy programming. (I don't mind, since it's only for personel use) and the learing curve is nice.
Maybe it is possible to write a program that is able to read all topics, and when the topic contains the strings [code][/code], it could take
the
Subject, Date, Auther, forum (en,Spa) and the link like : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/posting.php?mode=post&f=3">posting.php?mode=post&f=3</a><!-- l -->
When browsing this program, we could locate more topics with source code included samples.
In my case, all I do is take samples, and rebuild, alther them.
The search function of forums can't do this, but FWH CAN !
Just a idea... |
Collecting all samples (source) from the forum | Marc,
what I can do is, creating a downloadlist of all my tools with infos.
Over the years there are many, scattered inside the forum.
regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
Collecting all samples (source) from the forum | Uwe,
That would be great !
I've already found some nice samples from you <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> They are with all files included and so very interesting for me. Probably also for some others I hope...
The samples in FWH are also nice, but some are very old. Recent stuff on the Forum is better.
All samples of Mr. Rao are interesting, since XBrowse is my engine in my program. Maybe they are also located on a folder on his computer?
Thanks for the effort.
Marc |
Collecting all samples (source) from the forum | [quote="Marc Venken":9defu66a]Hello,
I'v spend more time i looking up samples, topics enz... than actualy programming. (I don't mind, since it's only for personel use) and the learing curve is nice.
Maybe it is possible to write a program that is able to read all topics, and when the topic contains the strings [code=fw:9defu66a]<div class="fw" id="{CB}" style="font-family: monospace;"> </div>[/code:9defu66a], it could take
the
Subject, Date, Auther, forum (en,Spa) and the link like : <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/posting.php?mode=post&f=3">posting.php?mode=post&f=3</a><!-- l -->
When browsing this program, we could locate more topics with source code included samples.
In my case, all I do is take samples, and rebuild, alther them.
The search function of forums can't do this, but FWH CAN !
Just a idea...[/quote:9defu66a]
Please try this sample. You can improve on this:
[code=fw:9defu66a]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> nLastTopic := <span style="color: #000000;">33507</span> <span style="color: #B900B9;">// rage of topics</span><br /><span style="color: #00C800;">static</span> nFirstopic := <span style="color: #000000;">33400</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> SET DATE BRITISH<br /> SET CENTURY <span style="color: #0000ff;">ON</span><br /> SET DELETED <span style="color: #0000ff;">ON</span><br /> RDDSETDEFAULT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"DBFCDX"</span> <span style="color: #000000;">)</span><br /><br /> DBCREATE<span style="color: #000000;">(</span> <span style="color: #ff0000;">"SAMPLES.DBF"</span>, <span style="color: #000000;">{</span> ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TOPICNO"</span>, <span style="color: #ff0000;">'N'</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"TOPIC"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">60</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"AUTHOR"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"DATE"</span>, <span style="color: #ff0000;">'D'</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"CODE"</span>, <span style="color: #ff0000;">'M'</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #ff0000;">"DBFCDX"</span>, .T., <span style="color: #ff0000;">"DB"</span> <span style="color: #000000;">)</span><br /> FW_CdxCreate<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> CLOSE DB<br /><br /> USE SAMPLES EXCLUSIVE VIA <span style="color: #ff0000;">"DBFCDX"</span><br /><br /> ForumSamples<span style="color: #000000;">(</span> nLastTopic, nFirsTopic <span style="color: #000000;">)</span><br /><br /> BrowseSamples<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BrowseSamples<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg, oFont, oBold, oMono, oGet, oBrw<br /><br /> SET ORDER <span style="color: #0000ff;">TO</span> TAG TOPICNO<br /> GO TOP<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Segoe UI"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-14</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-18</span> BOLD<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oMono <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Lucida Console"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-12</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">900</span>,<span style="color: #000000;">700</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL <span style="color: #0000ff;">FONT</span> oFont ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"SAMPLES IN FWH FORUMS"</span><br /><br /> @ <span style="color: #000000;">90</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">-20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> DATASOURCE <span style="color: #ff0000;">"SAMPLES"</span> ;<br /> COLUMNS <span style="color: #ff0000;">"TOPICNO"</span>, <span style="color: #ff0000;">"DATE"</span>, <span style="color: #ff0000;">"AUTHOR"</span> ;<br /> AUTOSORT ;<br /> LINES NOBORDER<br /><br /> WITH OBJECT oBrw<br /> :<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLROWRC<br /> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span> || oDlg:<span style="color: #0000ff;">Update</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">lIncrFilter</span> := .t.<br /> :<span style="color: #000000;">bSeek</span> := <span style="color: #000000;">{</span> |c| <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">cAlias</span> <span style="color: #000000;">)</span>-><span style="color: #000000;">(</span> BrwFilter<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> END<br /><br /> @ <span style="color: #000000;">20</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> TRIM<span style="color: #000000;">(</span> SAMPLES->TOPIC <span style="color: #000000;">)</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">860</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">FONT</span> oBold <span style="color: #0000ff;">UPDATE</span><br /><br /> @ <span style="color: #000000;">60</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"Filter containing all words any where"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> @ <span style="color: #000000;">60</span>,<span style="color: #000000;">340</span> <span style="color: #0000ff;">SAY</span> oBrw:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrw:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">540</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_HRED,CLR_YELLOW<br /><br /> @ <span style="color: #000000;">90</span>,<span style="color: #000000;">420</span> <span style="color: #0000ff;">SAY</span> <span style="color: #ff0000;">"CODE"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">CENTER</span> ;<br /> <span style="color: #0000ff;">COLOR</span> CLR_BLACK, nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">231</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">255</span> <span style="color: #000000;">)</span><br /><br /> @ <span style="color: #000000;">120</span>,<span style="color: #000000;">420</span> <span style="color: #0000ff;">GET</span> oGet <span style="color: #0000ff;">VAR</span> SAMPLES->CODE <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">460</span>,<span style="color: #000000;">540</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> MEMO READONLY <span style="color: #0000ff;">FONT</span> oMono <span style="color: #0000ff;">UPDATE</span><br /><br /> oDlg:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span> || oDlg:<span style="color: #000000;">Box</span><span style="color: #000000;">(</span> <span style="color: #000000;">59</span>,<span style="color: #000000;">339</span>,<span style="color: #000000;">81</span>,<span style="color: #000000;">881</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont, oMono, oBold<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BrwFilter<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> lFound := .t.<br /> <span style="color: #00C800;">local</span> aTokens<br /> <span style="color: #00C800;">local</span> cSaveFilter := DBFILTER<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nSaveRec := RECNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> cFilter := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">return</span> .t.<br /> <span style="color: #00C800;">endif</span><br /><br /> c := UPPER<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /> aTokens := HB_ATokens<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">for</span> each c in aTokens<br /> AAdd<span style="color: #000000;">(</span> cFilter, <span style="color: #ff0000;">"'"</span> + c + <span style="color: #ff0000;">"' $ UPPER( DBRECORDINFO( 9 ) )"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /><br /> cFilter := FW_ArrayAsList<span style="color: #000000;">(</span> cFilter, <span style="color: #ff0000;">" .AND. "</span> <span style="color: #000000;">)</span><br /><br /> SET FILTER <span style="color: #0000ff;">TO</span> &cFilter<br /> GO TOP<br /> lFound := <span style="color: #000000;">(</span> OrdKeyCount<span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> lFound<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> ForumSamples<span style="color: #000000;">(</span> nTopic, nLast <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cTopic, cUrl, cPageURL, cUser, cText, cCode, nPage, nPages, n, cLeft, dDate<br /><br /> <span style="color: #00C800;">DEFAULT</span> nTopic := <span style="color: #000000;">33507</span>, nLast := nTopic - <span style="color: #000000;">50</span><br /><br /> <span style="color: #00C800;">for</span> nTopic := nTopic <span style="color: #0000ff;">to</span> nLast step <span style="color: #000000;">-1</span><br /><br /> nPage := <span style="color: #000000;">1</span><br /> cUrl := TopicNoToURL<span style="color: #000000;">(</span> nTopic <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> .t.<br /> cPageURL := cUrl + <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nPage > <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"&start="</span> + LTrim<span style="color: #000000;">(</span> Str<span style="color: #000000;">(</span> nPage * <span style="color: #000000;">15</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span><br /> MsgRun<span style="color: #000000;">(</span> cPageURL, <span style="color: #ff0000;">"READING FORUM PAGE"</span>, <span style="color: #000000;">{</span> || ;<br /> cText := WebPageContents<span style="color: #000000;">(</span> cPageUrl, .t. <span style="color: #000000;">)</span> ;<br /> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> nPage == <span style="color: #000000;">1</span><br /> nPages := PageCount<span style="color: #000000;">(</span> cText <span style="color: #000000;">)</span><br /> cTopic := textbetween<span style="color: #000000;">(</span> ctext, <span style="color: #ff0000;">"<h2>"</span>, <span style="color: #ff0000;">"</h2>"</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> cTopic := textbetween<span style="color: #000000;">(</span> cTopic, <span style="color: #ff0000;">">"</span>, <span style="color: #ff0000;">"</a>"</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> n := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> !Empty<span style="color: #000000;">(</span> cCode := TextBetween<span style="color: #000000;">(</span> cText, <span style="color: #ff0000;">"<code>"</span>, <span style="color: #ff0000;">"</code>"</span>, n, @cLeft <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> cUser := GetUserName<span style="color: #000000;">(</span> cLeft, @dDate <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> dDate <span style="color: #000000;">)</span><br /> dDate := CTOD<span style="color: #000000;">(</span> <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> cCode := ExtractPrgCode<span style="color: #000000;">(</span> cCode <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> DBAPPEND<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> FIELD->TOPICNO := nTopic<br /> FIELD->TOPIC := cTopic<br /> FIELD->AUTHOR := cUser<br /> FIELD->DATE := dDate<br /> FIELD->CODE := cCode<br /> n++<br /> <span style="color: #00C800;">enddo</span><br /> nPage++<br /> <span style="color: #00C800;">if</span> nPage > nPages<br /> EXIT<br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">enddo</span><br /> <span style="color: #00C800;">next</span> nTopic<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> TopicNoToURL<span style="color: #000000;">(</span> nTopic <span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"http://forums.fivetechsupport.com/viewtopic.php?f=3&t="</span> + cValToChar<span style="color: #000000;">(</span> nTopic <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> TextBetween<span style="color: #000000;">(</span> cText, cStartTag, cCloseTag, nPos, cLeft, cRight <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cRet := <span style="color: #ff0000;">""</span><br /><br /> <span style="color: #00C800;">if</span> !<span style="color: #000000;">(</span> cStartTag $ cText <span style="color: #000000;">)</span><br /> cLeft := cText<br /> cRight := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">return</span> <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">endif</span><br /><br /> cRight := AfterAtNum<span style="color: #000000;">(</span> cStartTag, cText, nPos <span style="color: #000000;">)</span><br /> cRet := BeforAtNum<span style="color: #000000;">(</span> cCloseTag, cRight, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> PCount<span style="color: #000000;">(</span><span style="color: #000000;">)</span> > <span style="color: #000000;">4</span><br /> cLeft := BeforAtNum<span style="color: #000000;">(</span> cStartTag, cText, nPos <span style="color: #000000;">)</span><br /> cRight := AfterAtNum<span style="color: #000000;">(</span> cCloseTag, cRight, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> cRet<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> ExtractPrgCode<span style="color: #000000;">(</span> cCode <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> nFrom, nUpto, cLeft, cRight, cToken<br /> <span style="color: #00C800;">local</span> nFor<br /> <span style="color: #00C800;">local</span> aSubs := <span style="color: #000000;">{</span> ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">'<br />'</span>,CRLF <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">' '</span>,<span style="color: #ff0000;">" "</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">'ÿ'</span>,<span style="color: #ff0000;">" "</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">'"'</span>,<span style="color: #ff0000;">'"'</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">for</span> nFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> aSubs <span style="color: #000000;">)</span><br /> cCode := StrTran<span style="color: #000000;">(</span> cCode, aSubs<span style="color: #000000;">[</span> nFor, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, aSubs<span style="color: #000000;">[</span> nFor, <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /><br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> !Empty<span style="color: #000000;">(</span> cToken := TextBetween<span style="color: #000000;">(</span> cCode, <span style="color: #ff0000;">"<"</span>, <span style="color: #ff0000;">">"</span>, <span style="color: #000000;">1</span>, @cLeft, @cRight <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> cCode := cLeft + cRight<br /> <span style="color: #00C800;">enddo</span><br /><br /> aSubs := <span style="color: #000000;">{</span> ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">'>'</span>, <span style="color: #ff0000;">">"</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">'<'</span>, <span style="color: #ff0000;">"<"</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">for</span> nFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> aSubs <span style="color: #000000;">)</span><br /> cCode := StrTran<span style="color: #000000;">(</span> cCode, aSubs<span style="color: #000000;">[</span> nFor, <span style="color: #000000;">1</span> <span style="color: #000000;">]</span>, aSubs<span style="color: #000000;">[</span> nFor, <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /> <span style="color: #00C800;">do</span> <span style="color: #00C800;">while</span> !Empty<span style="color: #000000;">(</span> cToken := TextBetween<span style="color: #000000;">(</span> cCode, <span style="color: #ff0000;">"&#"</span>, <span style="color: #ff0000;">";"</span>, <span style="color: #000000;">1</span>, @cLeft, @cRight <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> cToken := Chr<span style="color: #000000;">(</span> Val<span style="color: #000000;">(</span> cToken <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> cCode := cLeft + cToken + cRight<br /><br /> <span style="color: #00C800;">enddo</span><br /><br /><span style="color: #00C800;">return</span> cCode<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> PageCount<span style="color: #000000;">(</span> cText <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> nAt<br /> <span style="color: #00C800;">local</span> nPages := <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span> nAt := <span style="color: #00C800;">AT</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Page <strong>"</span>, cText <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> cText := <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">(</span> cText, nAt + <span style="color: #000000;">14</span>, <span style="color: #000000;">50</span> <span style="color: #000000;">)</span><br /> nPages := Val<span style="color: #000000;">(</span> AfterAtNum<span style="color: #000000;">(</span> <span style="color: #ff0000;">"<strong>"</span>, cText, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> nPages<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> GetUserName<span style="color: #000000;">(</span> cText, dDate <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> c1 := <span style="color: #ff0000;">"/memberlist.php?mode=viewprofile&u="</span> <span style="color: #B900B9;">//2342">cnavarro</a></strong> » Tue Jan 17</span><br /> <span style="color: #00C800;">local</span> c2 := <span style="color: #000000;">[</span><span style="color: #ff0000;">"username]<br /> local nAt := RAT( c1, cText )<br /> local n2 := RAT( c2, cText )<br /> local cUser := "</span><span style="color: #ff0000;">"<br /> local cDate<br /><br /> nAt := Max( nAt, n2 )<br /> if nAt > 0<br /> cText := SubStr( cText, nAt, 200 )<br /> cUser := TextBetween( cText, "</span>><span style="color: #ff0000;">", "</span><<span style="color: #ff0000;">", 1 )<br /> cDate := AllTrim( TextBetween( cText, "</span>»<span style="color: #ff0000;">", "</span></p><span style="color: #ff0000;">" ) )<br /> cDate := Upper( AfterAtNum( "</span> <span style="color: #ff0000;">", cDate, 1 ) )<br /> dDate := uCharToVal( cDate, 'D' )<br /> endif<br /><br />return cUser<br /><br />//----------------------------------------------------------------------------//<br /></span></div>[/code:9defu66a]
[url=https://imageshack.com/i/pmyMWQk0p:9defu66a][img:9defu66a]http://imagizer.imageshack.us/v2/xq90/922/yMWQk0.png[/img:9defu66a][/url:9defu66a] |
Collecting all samples (source) from the forum | [color=#4000FF:i9djjeph]AWESOME !![/color:i9djjeph] <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
This is realy a great example and a very usefull tool !
Maybe we can make a project out of this and put it on top of the forum as a locked item.
I'm sure that many people could benifit from this source and project.
We could Mark Items, and put them in a category that we create for ourselve as interesting.
I can think of many more.
Anybody interested in making this a genereal forum tool ? |
Collecting all samples (source) from the forum | It is very interesting
I think adding the headline ( topic title ) and a maybe provided download-link would be useful.
Because of big sourcefiles, frequently I''m including a download-link with the complete sample or tool.
regardss
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
Collecting all samples (source) from the forum | Excellent , Thank you Mr. Rao |
Collecting all samples (source) from the forum | I would add the topic title and also the possibility to save it to a DBF so next time it will start faster <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Collecting all samples (source) from the forum | Is it possible to include download-links as well and execute the download,
the same like open them from inside a topic ?
[img:1ehsxofn]http://www.pflegeplus.com/IMAGES/Download4.jpg[/img:1ehsxofn]
regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
Collecting all samples (source) from the forum | This sample is calling the FW board for every topic in a loop, and is then downloading the source.
Could It be possible with this code to download pic's in a loop from a server ?
Pics are maybe not possible
I've a file with these items
<!-- m --><a class="postlink" href="https://cdn.sportdirect.com/resizer/500x500/108102-5000-01.jpg">https://cdn.sportdirect.com/resizer/500 ... 000-01.jpg</a><!-- m -->
<!-- m --><a class="postlink" href="https://cdn.sportdirect.com/resizer/500x500/108102-5000-01.jpg">https://cdn.sportdirect.com/resizer/500 ... 000-01.jpg</a><!-- m -->
<!-- m --><a class="postlink" href="https://cdn.sportdirect.com/resizer/500x500/108102-5000-01.jpg">https://cdn.sportdirect.com/resizer/500 ... 000-01.jpg</a><!-- m -->
<!-- m --><a class="postlink" href="https://cdn.sportdirect.com/resizer/500x500/110101-0040-01.jpg">https://cdn.sportdirect.com/resizer/500 ... 040-01.jpg</a><!-- m -->
<!-- m --><a class="postlink" href="https://cdn.sportdirect.com/resizer/500x500/110101-0040-01.jpg">https://cdn.sportdirect.com/resizer/500 ... 040-01.jpg</a><!-- m -->
I would like to retrieve the pics localy. |
Collection of .BMP files? | Hi all,
Does anyone have recommendations for a "reasonable" collection of .bmp files for use as button images?
Thanks,
Ross |
Collection of .BMP files? | Ross,
[url:3jvbzk8a]http://findicons.com/search/work[/url:3jvbzk8a]
[url:3jvbzk8a]http://webtreats.mysitemyway.com/category/icons/[/url:3jvbzk8a]
Thanks to Felix P. Grande for his great findings! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
Collection of .BMP files? | [quote="Antonio Linares":266plu10]Ross,
[url:266plu10]http://findicons.com/search/work[/url:266plu10]
[url:266plu10]http://webtreats.mysitemyway.com/category/icons/[/url:266plu10]
Thanks to Felix P. Grande for his great findings! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:266plu10]
Thanks Antonio and Felix.
Cheers,
Ross |
Collegare una DLL con C Struttura | Salve,
Dovrei tradurre un sorgente scritto in C collegandomi ad una DLL in xHarbour e FWH 9.05. Ho usato la classe tStruct (non so se nel corso del tempo ha subito cambiamenti),
ma il risultato è che non riesco a collegarmi al device. Qualcuno mi saprebbe indicare la soluzione
Grazie
typedef struct
{
char IPAddress[16]; //xxx.xxx.xxx.xxx
int Port;
} TETHParameters;
typedef struct
{
char Amount[8+1];
char ECRId[8+1];
char PaymentType[1+1];
char TerminalId[8+1];
} TECRData;
typedef struct
{
char TerminalId[8+1];
char AcquirerId[11+1];
char TransactionType[3+1];
char TransactionResult[2+1];
} TPOSData;
TETHParameters ETHParameters;
strcpy(ETHParameters.IPAddress, “192.168.1.2”);
ETHParameters.Port = 1234;
IAE17AX_InitEth(ÐParameters);
TECRData ECRData;
TPOSData POSData;
int TransactionResult;
strcpy(ECRData.Amount, “00000001”);
strcpy(ECRData.PaymentType, “0”);
strcpy(ECRData.ECRId, “12345678”);
strcpy(ECRData.TerminalId, “87654321”);
TransactionResult = IAE17AX_Payment(&ECRData, &POSData);
ECRData e POSData sono puntatori alle strutture
------------------------------------------
STRUCT TETHParameters
MEMBER IPAddress As STRING LEN 16
MEMBER Port As _INT
ENDSTRUCT
ETHParameters:=ThisStruct(TETHParameters)
ECRData:=ThisStruct(TECRData)
POSData:=ThisStruct(TPOSData)
ETHParameters:IPAddress:="192.168.1.2"
ETHParameters:Port:=1234
IAE17AX_InitEth(@ETHParameters)
STRUCT TECRData
MEMBER Amount As STRING LEN 8+1
MEMBER ECRId As STRING LEN 8+1
MEMBER PaymentType As STRING LEN 1+1
MEMBER TerminalId As STRING LEN 8+1
ENDSTRUCT
STRUCT TPOSData
MEMBER TerminalId As STRING LEN 8+1
MEMBER AcquirerId As STRING LEN 11+1
MEMBER TransactionType As STRING LEN 3+1
MEMBER TransactionResult As STRING LEN 2+1
ENDSTRUCT
ECRData:Amount:="00000001"+chr(0)
ECRData:PaymentType:="0"+chr(0)
ECRData:ECRId:="12345678"+chr(0)
ECRData:TerminalId:="87654321"+chr(0)
TransactionR:=IAE17AX_Payment(@ECRData,@POSData)
DLL32 FUNCTION IAE17AX_InitEth(@ETHParameters AS PTR) AS VOID PASCAL LIB "IAE17.DLL"
DLL32 FUNCTION IAE17AX_Payment(@ECRData AS PTR, @POSData AS PTR) AS _INT PASCAL LIB "IAE17.DLL" |
Collegare una DLL con C Struttura | Invece di usare AS PTR prova ad usare una LPSTR e assegnala poi alla proprietà cBuffer della struct.
EMG |
Collegare una DLL con C Struttura | Ho provato ad usare cBuffer ... ma ancora niente. Potrebbero essere i tipi di dati in TETHParameters ? Ho usato la funzione StrPtr() per passare il puntatore alla struttura:
STRUCT TETHParameters
MEMBER IPAddress As STRING LEN 16
MEMBER Port As STRING LEN 6
ENDSTRUCT
ETHParameters:=ThisStruct(TETHParameters)
ECRData:=ThisStruct(TECRData)
POSData:=ThisStruct(TPOSData)
ETHParameters:IPAddress:="192.168.1.2"
ETHParameters:Port:=1234
ETHBuffer:=ETHParameters:cBuffer
IAE17AX_InitEth(@ETHBuffer)
STRUCT TECRData
MEMBER Amount As STRING LEN 8+1
MEMBER ECRId As STRING LEN 8+1
MEMBER PaymentType As STRING LEN 1+1
MEMBER TerminalId As STRING LEN 8+1
ENDSTRUCT
STRUCT TPOSData
MEMBER TerminalId As STRING LEN 8+1
MEMBER AcquirerId As STRING LEN 11+1
MEMBER TransactionType As STRING LEN 3+1
MEMBER TransactionResult As STRING LEN 2+1
ENDSTRUCT
ECRData:Amount:="00000001"+chr(0)
ECRData:PaymentType:="0"+chr(0)
ECRData:ECRId:="12345678"+chr(0)
ECRData:TerminalId:="87654321"+chr(0)
ECRBuffer:=StrPtr(ECRData:cBuffer)
POSBuffer:=StrPtr(POSData:cBuffer)
TransactionR:=IAE17AX_Payment(@ECRBuffer,@POSBuffer)
DLL32 FUNCTION IAE17AX_InitEth(@ETHBuffer AS LPSTR) AS VOID PASCAL LIB "IAE17.DLL"
DLL32 FUNCTION IAE17AX_Payment(@ECRBuffer AS PTR, @POSBuffer AS PTR) AS _INT PASCAL LIB "IAE17.DLL" |
Collegare una DLL con C Struttura | Non devi usare puntatori ma solo stringhe, altrimenti non credo ti funzionerà mai. Le stringhe poi devi prepararle (se sono in input) o interpretarle (se sono in output) secondo il tracciato desiderato. Non so se mi sono spiegato bene.
EMG |
Collegare una DLL con C Struttura | Dov'è che sbaglio ?
STRUCT TETHParameters
MEMBER IPAddress As STRING LEN 16
MEMBER Port As STRING LEN 6 // STRING ?? _INT ??
ENDSTRUCT
ETHParameters:=ThisStruct(TETHParameters)
ECRData :=ThisStruct(TECRData)
POSData :=ThisStruct(TPOSData)
ETHParameters:IPAddress:="192.168.1.2"
ETHParameters:Port :=4151
ETHBuffer :=ETHParameters:cBuffer // Stringa in Input
IAE17AX_InitEth(@ETHBuffer)
ECRData:Amount:="00000001"+chr(0)
ECRData:PaymentType:="0"+chr(0)
ECRData:ECRId :="12345678"+chr(0)
ECRData:TerminalId :="87654321"+chr(0)
ECRBuffer :=ECRData:cBuffer // Stringa in Input
POSBuffer :=POSData:cBuffer // Stringa in Output
TransactionR:=IAE17AX_Payment(@ECRBuffer,@POSBuffer)
DLL32 FUNCTION IAE17AX_InitEth(ETHBuffer AS LPSTR) AS VOID PASCAL LIB "IAE17.DLL"
DLL32 FUNCTION IAE17AX_Payment(@ECRBuffer AS LPSTR, @POSBuffer AS LPSTR) AS _INT PASCAL LIB "IAE17.DLL" |
Collegare una DLL con C Struttura | Ti consiglio di fare direttamente un wrapper in C, è più semplice.
EMG |
Collegare una DLL con C Struttura | Ho risolto con wrapper in C, ma c'era anche una inesatezza nel .h del produttore !!!
typedef struct
{
char IPAddress[16]; //xxx.xxx.xxx.xxx
char[5] Port; // invece di int Port;
} TETHParameters;
Grazie per il suggerimento |
Collegare una DLL con C Struttura | --- volevo scrivere char Port[5] |
Colocar BMP desde recursos en ventana | Estimados amigos:
Necesito colocar un bmp chico, que esta en recursos, debajo a la izquierda de la ventana principal.
Algo así como el nombre del programa, etc.
Saludos. |
Colocar BMP desde recursos en ventana | Hola... prueba asi:
....
DEFINE MSGITEM OF oWnd:oMsgBar ;
BITMAPS "ABOUT" ; // imagen en la barra inferior
ACTION MsgInfo("hola") ;
TOOLTIP "Acerca De..." |
Colocar BMP desde recursos en ventana | Gracias Willi, excelente.
Saludos. |
Colocar CLOCK a la derecha en SET MESAGGE | Hola a todos
Cómo hago para que la hora apareza a la derecha en SET MESSAGE despues de un texto colocado con MSGITEM?
He tratado asi
[code=fw:2btr2x3g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Copyright AcrSoft Inc."</span>+Str<span style="color: #000000;">(</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">(</span>Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span> <span style="color: #000000;">2007</span> <br /> <span style="color: #0000ff;">DEFINE</span> MSGITEM <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgBar</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'SOCIEDAD HOTELERA "LOS TAJIBOS S.A."'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /> <span style="color: #0000ff;">DEFINE</span> MSGITEM <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgBar</span> CLOCK <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span><br /> </div>[/code:2btr2x3g]
Pero no muestra la hora
Gracias por la ayuda
Saludos
Adhemar |
Colocar CLOCK a la derecha en SET MESAGGE | acaso probastes esto??
SET MESSAGE OF oWnd TO TXT_PREVIEW CENTERED ;
NOINSET CLOCK DATE KEYBOARD |
Colocar CLOCK a la derecha en SET MESAGGE | Gracias Angel
Ya intenté de esta forma
[code=fw:4z59ya7w]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Copyright AcrSoft Inc."</span>+Str<span style="color: #000000;">(</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">(</span>Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span>+Space<span style="color: #000000;">(</span><span style="color: #000000;">40</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">'SOCIEDAD HOTELERA "LOS TAJIBOS S.A."'</span> <span style="color: #000000;">2007</span> CLOCK<br /> </div>[/code:4z59ya7w]
Funciona, el problema es cuando estoy en el MENUITEM muestra su MESSAGE y desaparece el nombre de la empresa, además no lo coloca entre | | que se ve mas elegante.
Gracias una vez mas,
Saludos
Adhemar |
Colocar CLOCK a la derecha en SET MESAGGE | Solo se me ocurre que te inventes una rutina que le mandes el mensaje y siempre le sume el nombre de la empresa.
No lo he intentado nunca, yo tengo el nombre de la empresa en el encabezado del windows principal, me pareció menos complicado y como mando mensajes bastante grandes, necesito ese espacio con desesperación. (Aunque por experiencia los usuarios no los leen)
<!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> |
Colocar CLOCK a la derecha en SET MESAGGE | Gracias Manuel
Seguiré esperando..., quizas alguien tenga la solución.
Saludos
Adhemar |
Colocar CLOCK a la derecha en SET MESAGGE | Adhemar:
Sería más ilustrativo si colocas una imagén del problema.
Yo tengo el nombre de la empresa y se muestra bien.
Saludos |
Colocar CLOCK a la derecha en SET MESAGGE | Armando
Colocando
[code=fw:1wn6ppyp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Copyright AcrSoft Inc."</span>+Str<span style="color: #000000;">(</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">(</span>Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span>+Space<span style="color: #000000;">(</span><span style="color: #000000;">40</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">'SOCIEDAD HOTELERA "LOS TAJIBOS S.A."'</span> <span style="color: #000000;">2007</span> CLOCK<br /> </div>[/code:1wn6ppyp]
Sale así
[img:1wn6ppyp]http://200.58.176.148/paquetes/menu1.jpg[/img:1wn6ppyp]
Cuando estoy en el menú asi
[img:1wn6ppyp]http://200.58.176.148/paquetes/menu2.jpg[/img:1wn6ppyp]
Colocando
[code=fw:1wn6ppyp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Copyright AcrSoft Inc."</span>+Str<span style="color: #000000;">(</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">(</span>Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span> <span style="color: #000000;">2007</span> <br /> <span style="color: #0000ff;">DEFINE</span> MSGITEM <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgBar</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'SOCIEDAD HOTELERA "LOS TAJIBOS S.A."'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /> <span style="color: #0000ff;">DEFINE</span> MSGITEM <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgBar</span> CLOCK <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span><br /> </div>[/code:1wn6ppyp]
Sale así:
[img:1wn6ppyp]http://200.58.176.148/paquetes/menu3.jpg[/img:1wn6ppyp]
Cuando estoy en el menú asi
[img:1wn6ppyp]http://200.58.176.148/paquetes/menu4.jpg[/img:1wn6ppyp]
De esta forma no muestra la hora, y para mi es importante indica que el sistema no esta colgado ya que funciona con puertos COM
Gracias por la ayuda
Saludos
Adhemar |
Colocar CLOCK a la derecha en SET MESAGGE | Hola Adhemar...
Prueba lo siguiente:
[code=fw:21442urw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> Mensaje:=<span style="color: #ff0000;">"Mystic Soft(c)2009 ''Software solution'' Versión 1.00 (32 bits) By Ojeda Esteban Eduardo"</span><br /><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> Mensaje <span style="color: #000000;">2007</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> MSGITEM MsgNew <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgBar</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Calculadora"</span>;<br /> TOOLTIP <span style="color: #ff0000;">"Calculadora"</span>;<br /> <span style="color: #0000ff;">ACTION</span> WinExec <span style="color: #000000;">(</span><span style="color: #ff0000;">"Calc"</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> MSGITEM MsgNew <span style="color: #0000ff;">OF</span> oWnd:<span style="color: #000000;">oMsgbar</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">60</span>;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Impresora"</span>;<br /> TOOLTIP <span style="color: #ff0000;">"Impresora por Defecto"</span>;<br /> <span style="color: #0000ff;">ACTION</span> PrinterSetup<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">KeybOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">ClockOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWnd:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">DateOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:21442urw]
Con ese código quedá así:
[img:21442urw]http://u2peru.com/ES/images_hosting/uploaded/1055.jpg[/img:21442urw]
Nota: La primera imagen es cuando no estoy caminando por el menú principal del programa, la segunda cuando si camino sobre el menú. En ambos casos el reloj la fecha y el estado del teclado se ven correctamente y a la derecha.
Espero te sirva. |
Colocar CLOCK a la derecha en SET MESAGGE | Adhemar:
Entiendo lo que requieres y, hasta donde mis conocimientos me ayudan, me parece que va a ser dificil conseguirlo, me explico;
1.- He intentado compilar tu segundo ejemplo y me tira un error, creo que tambien debería tirartelo a tí pues estamos definiendo la cláusula CLOCK sobre un MSGITEM y esa cláusula debe ir sobre la barra de mensajes SET MESSAGE bla bla bla CLOCK 2007
2.- La barra de mensajes se forma primero con el mensaje y posteriormente el resto de las cláusulas KEYBOARD CLOCK etc etc.
3.- Despues de armar la barra de mensajes podemos agregar más items (msgitem) pero siempre van despues de las cláusulas de la barra de mensajes, por lo tanto el texto "SOCIEDAD HOTELERA etc" aparecerá despues del CLOCK y así no se ve bien
4.- Una posible solución sería concatenar los textos en la barra de mensajes
[code=fw:5lndn6ja]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWindow <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Copyright AcrSoft Inc."</span>+Str<span style="color: #000000;">(</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">(</span>Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">"SOCIEDAD HOTELERA"</span> <span style="color: #000000;">2007</span> CLOCK</div>[/code:5lndn6ja]
Espero haberme explicado
Saludos |
Colocar CLOCK a la derecha en SET MESAGGE | Adhemar:
Esteban le ha dado al clavo
[code=fw:cbcq3vpo]<div class="fw" id="{CB}" style="font-family: monospace;"><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWindow <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Copyright AcrSoft Inc."</span>+Str<span style="color: #000000;">(</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">(</span>Date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span> <span style="color: #000000;">2007</span><br /><br /><span style="color: #0000ff;">DEFINE</span> MSGITEM <span style="color: #0000ff;">OF</span> oWindow:<span style="color: #000000;">oMsgBar</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'SOCIEDAD HOTELERA "LOS TAJIBOS S.A."'</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE<br /><br /> oWindow:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">KeybOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWindow:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">ClockOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWindow:<span style="color: #000000;">oMsgBar</span>:<span style="color: #000000;">DateOn</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:cbcq3vpo]
Saludos |
Colocar CLOCK a la derecha en SET MESAGGE | Gracias Esteban
Funciona Perfecto
Tenía la esperanza de que alguien tenía la solución. ESTE FORO ES PODEROSO
Gracias a todos por la ayuda.
Saludos
Adhemar |
Colocar CLOCK a la derecha en SET MESAGGE | Perfecto!!! <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Saludos, Esteban. |
Colocar Excel/Word en Aplicacion | Buenos dias a todos
Estoy haciendo pruebas con OLE y me encuentro el siguiente problema:
[b:1vrhfomz]Excel:[/b:1vrhfomz] he conseguido incrustar en un Dialog de un Folder que es lo que necesito
He seguido las instrucciones que aparecen en el siguiente LINK
[url:1vrhfomz]http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21028&p=111658&hilit=incrustar+ole#p111658[/url:1vrhfomz]
aunque tengo problemas cuando dejo el foco y vuelvo al dialogo que contiene el Folder, ya que tengo que pinchar en la barra de edicion para que pueda moverme por la hoja. Permite pinchar con el mouse pero no permite editar.
Tambien estoy estudiando cómo puedo hacer para que salga la barra de herramientas, ya que solo sale la barra de edicion.
[code=fw:1vrhfomz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oFldUtiles:<span style="color: #000000;">SetOption</span><span style="color: #000000;">(</span> nOpt <span style="color: #000000;">)</span><br /> oBook := oExcel:<span style="color: #000000;">Workbooks</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oHoja := oExcel:<span style="color: #000000;">ActiveSheet</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> Sysrefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// No hace falta ya que se maximiza abajo</span><br /> <span style="color: #B900B9;">//oExcel:Left := 0</span><br /> <span style="color: #B900B9;">//oExcel:Top := 0</span><br /> <span style="color: #B900B9;">//oExcel:Height := 320</span><br /> <span style="color: #B900B9;">//oExcel:Width := 590</span><br /><br /> SetWindowLong<span style="color: #000000;">(</span>oExcel:<span style="color: #000000;">hWnd</span>,<span style="color: #000000;">-16</span>,<span style="color: #ff0000;">"L"</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">//Es la función API SetWindowLongA, en este caso quita la barra de titulo de excel</span><br /> <span style="color: #B900B9;">//SetForeWin(oExcel:hWnd) //Es la funcion API SetForegroundWindow tiene que ir antes de la llamada a setparent()</span><br /> <span style="color: #B900B9;">//SetParent(oExcel:hWnd,oWnd:hWnd) //Incrusta Excel en mi ventana</span><br /> <span style="color: #B900B9;">//oWnd:SetText( cverotc + ' - Libro abierto: '+clibro )</span><br /><br /> oExcel:<span style="color: #000000;">ActiveWorkBook</span>:<span style="color: #000000;">Protect</span><span style="color: #000000;">(</span><span style="color: #ff0000;">''</span>,.f.,.f.<span style="color: #000000;">)</span> <span style="color: #B900B9;">//Para poder manupilar el estado de la venta del libro</span><br /> oExcel:<span style="color: #000000;">WindowState</span> := <span style="color: #000000;">-4137</span> <span style="color: #B900B9;">//Se quitan los botones de maximizar, minimizar y cerrar</span><br /> oExcel:<span style="color: #000000;">Windows</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span>:<span style="color: #000000;">WindowState</span> := <span style="color: #000000;">-4137</span> <span style="color: #B900B9;">//Se maximiza Excel en mi ventana // -4140 Minimiza Excel</span><br /> oExcel:<span style="color: #000000;">ScreenUpdating</span> := .T.<br /> oExcel:<span style="color: #000000;">Visible</span> := .T. <span style="color: #B900B9;">//Hace Excel visible</span><br /> oExcel:<span style="color: #000000;">DisplayAlerts</span> := .F.<br /><br /> <span style="color: #B900B9;">//oFldUtiles:aDialogs[ nOpt ]:bGotFocus := { || oFldUtiles:aDialogs[ nOpt ]:Refresh(), SysRefresh() }</span><br /> oFldUtiles:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> nOpt <span style="color: #000000;">]</span>:<span style="color: #000000;">bGotFocus</span> := <span style="color: #000000;">{</span> || oFldUtiles:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> SetParent<span style="color: #000000;">(</span> oExcel:<span style="color: #000000;">hWnd</span> , oFldUtiles:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> nOpt <span style="color: #000000;">]</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> </div>[/code:1vrhfomz]
[b:1vrhfomz]Word:[/b:1vrhfomz]
He mirado los ejemplos que hay en FWH de Word.prg y Wordtable.prg, pero están hechos sobre una ventana y no sobre un dialog de un Folder.
Como no puedo incrustar la ventana del objeto, Word se ejecuta fuera de la Aplicacion
No puedo incrustar la ventana en el dialogo del FolderEx, la instruccion que uso en Excel, en [b:1vrhfomz]Word[/b:1vrhfomz] me da error
Por que en Excel funciona y en Word no?
[code=fw:1vrhfomz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oFldUtiles:<span style="color: #000000;">SetOption</span><span style="color: #000000;">(</span> nOpt <span style="color: #000000;">)</span><br /><br /> oDoc := oWord:<span style="color: #000000;">Documents</span>:<span style="color: #000000;">Add</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oWord:<span style="color: #000000;">WindowState</span> := <span style="color: #000000;">-4137</span> <span style="color: #B900B9;">//Se quitan los botones de maximizar, minimizar y cerrar</span><br /><br /> oWord:<span style="color: #000000;">Visible</span> := .T. <span style="color: #B900B9;">//Hace Word visible</span><br /><br /> SetParent<span style="color: #000000;">(</span> oWord:<span style="color: #000000;">hWnd</span>, oFldUtiles:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> nOpt <span style="color: #000000;">]</span>:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// Esta instruccion me da error, me dice que hWnd no existe como propiedad de oWord</span><br /> </div>[/code:1vrhfomz]
Como puedo solucionarlo?
Gracias |
Colocar Excel/Word en Aplicacion | Sr. Cristobal Navarro, espero que te ajude, testei com HARBOUR e funcionou perfeitamente. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
/*********************************************/
procedure AbrePlanilhaExcel( cPlanilha )
/*
*/
local oError, oExcel, cTitulo
Default cPlanilha := ''
if s_oWndExcel != nil
if !iszoomed(s_oWndExcel:hwnd)
s_oWndExcel:Maximize()
endif
return
endif
if !Empty(cPlanilha) .and. !File(cPlanilha)
MsgStop('Planilha informada não foi localizada. Verifique!', 'Atenção!')
return
endif
TRY
oExcel := CreateObject( "Excel.Application" )
CATCH oError
RetornaErrorTryCatch( oError, 'PLANILHA EXCEL' )
Return
END
cTitulo := ".:: EXCEL ::. "+Alltrim(cPlanilha)
oExcel:Workbooks:Open(cPlanilha)
SysRefresh()
define window s_oWndExcel mdichild of M->oWnd vscroll title cTitulo
s_oWndExcel:bKeyDown := {| nKey | IIf(nKey==VK_ESCAPE,s_oWndExcel:end(),;
IIf(nKey==VK_F6 .and. len(M->oWnd:oWndClient:aWnd) > 1, M->oWnd:NextWindow(),))}
activate window s_oWndExcel maximized ON Init(OnInitExcel(@oExcel));
Valid(ValidExcel( oExcel ))
return
/*********************************************/
static procedure OnInitExcel(oExcel)
/*
*/
SetWindowLong(oExcel:hWnd,-16,"L")
oExcel:DisplayAlerts := .F.
oExcel:ActiveWorkBook:Protect('',.f.,.f.) //Para poder manupilar el estado de la venta del libro
oExcel:WindowState := -4137 //Se quitan los botones de maximizar, minimizar y cerrar
oExcel:Windows(1):WindowState := -4137 //Se maximiza Excel en mi ventana
oExcel:ScreenUpdating := .T.
oExcel:Visible := .T.
oExcel:DisplayAlerts := .F.
s_oWndExcel:bGotFocus := { || IIf( s_oWndExcel != nil, s_oWndExcel:Refresh(),) }
SetParent(oExcel:hWnd, s_oWndExcel:hWnd) //Incrusta Excel en mi ventana
return
/*********************************************/
static function ValidExcel( oExcel )
/*
*/
oWorkBooks := oExcel:WorkBooks
oWorkBooks:Close()
oWorkBooks:= NIL
oExcel:Quit()
oExcel:= NIL
Hb_GCall(.t.)
s_oWndExcel := nil
return(.t.) |
Colocar Excel/Word en Aplicacion | El mensaje era muy antiguo y ya lo solucioné, pero
Muchas gracias por el código
Saludos |
Colocar Excel/Word en Aplicacion | Sr. Cristobal,
é possível ABRIR um DOCUMENTO e ao fechar a JANELA WINDOW salvar o documento?
obrigado |
Colocar Excel/Word en Aplicacion | [quote="SGS":g3axquts]Sr. Cristobal,
é possível ABRIR um DOCUMENTO e ao fechar a JANELA WINDOW salvar o documento?
obrigado[/quote:g3axquts]
Disculpa, no entiendo bien tu mensaje
Quieres abrir un documento y que no permita guardar/grabar el documento?
Esta es la traducción que me hace google translate
[quote:g3axquts]
Puede abrir un documento y cerrar la ventana ventana Guardar el documento?
[/quote:g3axquts] |
Colocar Excel/Word en Aplicacion | Sr. Cristobal,
Me gustaría abrir un documento, cambiar y guardar. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
Colocar Excel/Word en Aplicacion | SGS, veja o link <!-- m --><a class="postlink" href="https://msdn.microsoft.com/pt-br/library/office/ff194819.aspx">https://msdn.microsoft.com/pt-br/librar ... 94819.aspx</a><!-- m -->
tem um exemplo em VBA
algo do tipo
ActiveWorkbook.Close SaveChanges:=False
talvez ajude
e
<!-- m --><a class="postlink" href="http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=14925">http://www.pctoledo.com.br/forum/viewto ... =4&t=14925</a><!-- m -->
oExcel:ActiveWorkBook:SaveAs(cARQ,50) |
Colocar Excel/Word en Aplicacion | Obrigado System |
Colocar Excel/Word en Aplicacion | Sr. Cristobal,
En un oficce con la versión : 16.0.7070.2033 , que está pasando en el siguiente problema de la pantalla .
Se desalineado con la ventana.
Usted sabe si se puede solucionar el problema?
Gracias
[url=https://postimg.org/image/8ehjz37df/:2kpm1z5k][img:2kpm1z5k]https://s13.postimg.org/8ehjz37df/teste.png[/img:2kpm1z5k][/url:2kpm1z5k] |
Colocar Excel/Word en Aplicacion | Mira a ver si te ayuda
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21028&p=111782&hilit=excel+application#p111658">viewtopic.php?f=6&t=21028&p=111782&hilit=excel+application#p111658</a><!-- l --> |
Colocar Excel/Word en Aplicacion | Sr. Cristobal, obrigado! |
Colocar Negrilla en mitad del texto | Dear Antonio,
I think it is METHOD Say( nRow, nCol, cText, oFont, nWidth, nClrText, nBkMode, nPad ) CLASS VRD.
Best regards,
Otto |
Colocar Negrilla en mitad del texto | Compañeros del foro tengan buena tarde.
Tengo almacenado un texto en una dbf. Pero requiero que en la mitad del texto se impriman negrillas. ejemplo
Nota: [b:2zun6dzg]Si a la fecha del recibido de la presente notificación Usted se encuentra al día en el pago de sus cuotas, favor hacer caso omiso a esta comunicación [/b:2zun6dzg] y allegar los respectivos soportes de pago a la oficina.
Necesito darle formato al texto así como el ejemplo anterior, pero desde mi reporte.
Algún ejemplo o sugerencia? |
Colocar Negrilla en mitad del texto | Leandro,
Tienes ya algún ejemplo creado para probarlo con EasyReport ? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.