topic
stringlengths
1
63
text
stringlengths
1
577k
Avi desde recursos
[quote="Antonio Linares":1ihumf60]Jairo, Tienes que incluir el AVI en el recurso de esta forma: 2020 AVI "test.avi" y desde el código hacer: REDEFINE VIDEO oVideo ID 2020 El número 2020 es arbitrario. Puedes usar el que quieras[/quote:1ihumf60] Gracias Antonio lo intentare Cordialmente Jairo Barbosa
Aviso del depurador FTH: (4204)
Al ejecutar un app con xEdit 4.0.3, me sale un aviso del debuger #1: FTH: (4204): *** Fault tolerant heap shim applied to current process. This is usually due to previous crashes. *** no se si se trata de abuso de memoria o recursos. Alguien que me pueda indicar porfa.
Aviso del depurador FTH: (4204)
[url:3bn4ek97]https://msdn.microsoft.com/en-us/library/windows/desktop/dd744764(v=vs.85).aspx[/url:3bn4ek97]
Aviso en Ímpresión
En una aplicación que vengo usando desde hace años, observo ahora que cuando desde el previo, voy a imprimir y tiene varias páginas, aparece una pequeña ventana con: Campo de Impresion: Todos/Página Actual/Paginas de__ a __. ¿Hay alguna manera de evitar esta ventana de aviso?. Muchas gracias
Aviso que el servidor de SQL esta caído
Hola feliz año 2022 Hola Antonio <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Aviso que el servidor de SQL esta caído [url=https&#58;//imgbb&#46;com/:phbkvdx3][img:phbkvdx3]https&#58;//i&#46;ibb&#46;co/GpGxhVk/Captura-de-pantalla-2022-01-13-005711&#46;png[/img:phbkvdx3][/url:phbkvdx3]
Aviso que el servidor de SQL esta caído
Querida Aida, gracias por el aviso saludos
Aviso que el servidor de SQL esta caído
[quote="Antonio Linares":1ssqmfig]Querida Aida, gracias por el aviso saludos[/quote:1ssqmfig] Hola aun sigue sin funcionar <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> [img:1ssqmfig]https&#58;//cdn&#46;memegenerator&#46;es/descargar/32141642[/img:1ssqmfig]
Aviso que el servidor de SQL esta caído
Querida Aida, De momento está de baja y seguirá de baja por un tiempo Estamos dándole vueltas a reorganizarlo de otra forma <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Te pido disculpas por las molestias. Por lo que se ha comentado puedes conseguir un año gratuito en los servers de Amazon
Aviso que el servidor de SQL esta caído
No tienes que disculparte yo soy la latosa <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> ya empece a dar lata <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> a si tengo la conexión al servidor que ya no funciona como me dijiste [code=fw:1mpu3qxt]<div class="fw" id="{CB}" style="font-family: monospace;">CONNECT oServer HOST <span style="color: #ff0000;">"54.37.60.32"</span> ;<br />                      USER <span style="color: #ff0000;">"aida"</span> ;<br />                      PASSWORD <span style="color: #ff0000;">"fivetech"</span>;<br />                      PORT <span style="color: #000000;">3306</span> ;<br />                      FLAGS <span style="color: #000000;">0</span>;<br />                      DATABASE <span style="color: #ff0000;">"aida"</span></div>[/code:1mpu3qxt] se conectaba muy bien ahora me di de alta en otro servidor SQL de la misma manera [code=fw:1mpu3qxt]<div class="fw" id="{CB}" style="font-family: monospace;">CONNECT oServer HOST <span style="color: #ff0000;">"sql5.freesqldatabase.com"</span> ; <br />                      USER <span style="color: #ff0000;">"aida"</span> ;<br />                      PASSWORD <span style="color: #ff0000;">"chuchis123"</span>;<br />                      PORT <span style="color: #000000;">3306</span> ;<br />                      FLAGS <span style="color: #000000;">0</span>;<br />                      DATABASE <span style="color: #ff0000;">"aida"</span></div>[/code:1mpu3qxt] pero no se conecta en ningun momento <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> con FiveDbu y el Navicat me conecto perfectamente por que sera que desde el código que no modifique y que antes si funcionaba y ahora con un servidor diferente ya no funciona. Gracias por tu ayuda <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> me encanto saber de ti <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Aviso que el servidor de SQL esta caído
ya está solucionado <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Te envié las instrucciones por facebook una vez lo pruebes desde Heidi necesito que me digas que IP ó rango de IPs tenemos que autorizar
Aviso que el servidor de SQL esta caído
salio este ip 189.217.3.201 <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Aviso que el servidor de SQL esta caído
ok, vuelve a intentar acceder <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Aviso que el servidor de SQL esta caído
Listo ya funciona <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Muchas grax <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> con barba te ves muy diferente <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Que este año te sea de super excito y muchas carreras de motos ganadas <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> ahora a trabajar duro este año GRACIAS! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Aviso que el servidor de SQL esta caído
ya guarda los datos en el servidor pero después de guardarlos el programa se congela <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> y después de un rato se cierra <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> [url=https&#58;//ibb&#46;co/D7xLH8w:86q5bu3l][img:86q5bu3l]https&#58;//i&#46;ibb&#46;co/LCLvXJ9/Captura-de-pantalla-2022-01-16-191129&#46;png[/img:86q5bu3l][/url:86q5bu3l] a si lo tengo desde siempre antes no se atoraba [code=fw:86q5bu3l]<div class="fw" id="{CB}" style="font-family: monospace;">      <span style="color: #00C800;">TRY</span><br />                      CONNECT oServer HOST <span style="color: #ff0000;">"xxxxxx"</span> ;<br />                      USER <span style="color: #ff0000;">"xxxxxx_"</span> ;<br />                      PASSWORD <span style="color: #ff0000;">"*******"</span>;<br />                      PORT <span style="color: #000000;">3306</span> ;<br />                      FLAGS <span style="color: #000000;">0</span>;<br />                      DATABASE <span style="color: #ff0000;">"xxxxx_"</span><br /><br /><br />irNueva2:=  rNueva0<br />oQry := TDolphinQry<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM materiales order by serialpc"</span> <span style="color: #000000;">&#41;</span><br />oQry:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span>  oQry:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> irNueva2,<span style="color: #ff0000;">"serialpc"</span> <span style="color: #000000;">&#41;</span>==<span style="color: #ff0000;">"0"</span><br /><br />elseif oQry:<span style="color: #000000;">cancelar</span>=AllTrim<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"1"</span><span style="color: #000000;">&#41;</span><br /><br /><br /><br /> ? <span style="color: #ff0000;">"SE TERMINARA EL PLAZO DE PRUEBA ADQUIERA SU LICENCIA"</span><br /><br />*Registrame<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />elseif oQry:<span style="color: #000000;">cancelar</span>=<span style="color: #ff0000;">"2"</span><br /><br />? <span style="color: #ff0000;">"SE TERMINO EL PLAZO DE PRUEBA ADIOS."</span><br /><br />quit<br /><br /><span style="color: #00C800;">endif</span><br /><br />irNueva2:=  rNueva0 <br />oQry := TDolphinQry<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM materiales order by serialpc"</span> <span style="color: #000000;">&#41;</span><br />oQry:<span style="color: #000000;">gotop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span>  oQry:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> rNueva0,<span style="color: #ff0000;">"serialpc"</span> <span style="color: #000000;">&#41;</span>== <span style="color: #000000;">0</span><br /><br /> aCampos :=    <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">'windows'</span>,<span style="color: #ff0000;">'fecha'</span>,<span style="color: #ff0000;">'hora'</span>,<span style="color: #ff0000;">'wusuario'</span>,<span style="color: #ff0000;">'serialpc'</span>,<span style="color: #ff0000;">'usuario'</span>, <span style="color: #ff0000;">'serial'</span>,<span style="color: #ff0000;">'laip'</span>,<span style="color: #ff0000;">'laipp'</span>,<span style="color: #ff0000;">'nusuario'</span>,<span style="color: #ff0000;">'ippublica'</span>,<span style="color: #ff0000;">'dias'</span>,<span style="color: #ff0000;">'intentos'</span><span style="color: #000000;">&#125;</span><br /> aVariables := <span style="color: #000000;">&#123;</span>WinT,      tfecha, thora ,wuser     ,rNueva0   ,rNueva1  , rNueva2 ,cIp   ,cIpx   ,nuser     ,ippub      ,cTequedan,colorix<span style="color: #000000;">&#125;</span><br /><br /> oServer:<span style="color: #000000;">Insert</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'materiales'</span>, aCampos, aVariables <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">else</span><br /><br /><span style="color: #00C800;">endif</span><br /><br />oQry = oServer:<span style="color: #000000;">Query</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SELECT * FROM materiales ORDER BY serialpc "</span> <span style="color: #000000;">&#41;</span><br />oData = oQry<br />oQry:<span style="color: #000000;">SetOrder</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"serialpc"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">if</span>  oQry:<span style="color: #000000;">Seek</span><span style="color: #000000;">&#40;</span> rNueva0,<span style="color: #ff0000;">"serialpc"</span> <span style="color: #000000;">&#41;</span>== <span style="color: #000000;">0</span><br /><span style="color: #00C800;">else</span><br /><br /><span style="color: #00C800;">if</span> empty<span style="color: #000000;">&#40;</span>rNueva2<span style="color: #000000;">&#41;</span><br />  rNueva2:=<span style="color: #ff0000;">""</span><br />    <span style="color: #00C800;">else</span><br />  <span style="color: #00C800;">endif</span><br />                    oQry:<span style="color: #000000;">usuario</span>=rNueva1<br />                    oQry:<span style="color: #000000;">serial</span>=AllTrim<span style="color: #000000;">&#40;</span>rNueva2<span style="color: #000000;">&#41;</span><br />                    *oQry:<span style="color: #000000;">nusuario</span>=nuser<br />                    oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"nusuario"</span>,nuser<span style="color: #000000;">&#41;</span><br />                    oQry:<span style="color: #000000;">dias</span>=AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>cTequedan<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                    *oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"dias"</span>,AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>cTequedan<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />                    oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"intentos"</span>,colorix<span style="color: #000000;">&#41;</span><br />                    oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"final"</span>,finale<span style="color: #000000;">&#41;</span><br />                    oQry:<span style="color: #000000;">FieldPut</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"version"</span>,<span style="color: #ff0000;">"1.1bJ"</span><span style="color: #000000;">&#41;</span><br />                    oQry:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">endif</span><br /><br />CATCH oErr<br />   lConectaNovamente := .t.<br />  <br />   end<br /><br /><span style="color: #00C800;">if</span> lConectaNovamente<br />MsgRun<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"No se puede conectar revice su coneccion o barrera de fuego..."</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /> </div>[/code:86q5bu3l]
Aviso que el servidor de SQL esta caído
Prueba a acceder usando Heidi y verifica que esten la tabla y los datos, etc
Aviso que el servidor de SQL esta caído
Aida Kinda a long shot answer ... many cloud applications, Att.net, Google.cm .. consider certain apps as "less secure" and you have to generate a special secure password before your application will connect .. <!-- m --><a class="postlink" href="https://support.google.com/accounts/answer/6010255?hl=en">https://support.google.com/accounts/ans ... 0255?hl=en</a><!-- m --> Just my 2 cents worth .. Rick Lipkin
Aviso que el servidor de SQL esta caído
[quote="Antonio Linares":23w4decg]Prueba a acceder usando Heidi y verifica que esten la tabla y los datos, etc[/quote:23w4decg] Si los guarda con en el Navicat puedo ver la tabla con los datos pero después que mi programita guarda los datos se queda congelado [url=https&#58;//ibb&#46;co/Hr3BGxD:23w4decg][img:23w4decg]https&#58;//i&#46;ibb&#46;co/dQxjkL0/Captura-de-pantalla-2022-01-17-211225&#46;png[/img:23w4decg][/url:23w4decg] [url=https&#58;//es&#46;imgbb&#46;com/:23w4decg]subir fotos a google[/url:23w4decg]
Aviso que el servidor de SQL esta caído
Ya encontré lo que atora al programa es esto que uso para sacar la IP ippub:= PublicIP() <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> si quito el PublicIP() ya no se atora por que pasara esto y como remediarlo? <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
Aviso que el servidor de SQL esta caído
[quote="AIDA":24jgmhaw]Ya encontré lo que atora al programa es esto que uso para sacar la IP ippub:= PublicIP() <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> si quito el PublicIP() ya no se atora por que pasara esto y como remediarlo? <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->[/quote:24jgmhaw] [code=fw:24jgmhaw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//**************************************************************</span><br /><span style="color: #00C800;">Function</span> PublicIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> cBuffer, cRequest, cResponse, nBytes, pSocket<br /><br /> INetInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  pSocket := INetConnect<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"checkip.dyndns.org"</span>, <span style="color: #000000;">80</span> <span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">IF</span> INetErrorCode<span style="color: #000000;">&#40;</span> pSocket <span style="color: #000000;">&#41;</span> <> <span style="color: #000000;">0</span><br />   ? <span style="color: #ff0000;">"Socket error:"</span>, INetErrorDesc<span style="color: #000000;">&#40;</span> pSocket <span style="color: #000000;">&#41;</span><br />   INetCleanUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   QUIT<br />  <span style="color: #00C800;">ENDIF</span><br /><br />  nBytes   := INetSend<span style="color: #000000;">&#40;</span> pSocket, <span style="color: #ff0000;">"GET / HTTP/1.1"</span> + CRLF + <span style="color: #ff0000;">"Host: checkip.dyndns.org"</span> + CRLF + <span style="color: #ff0000;">"User-Agent: HTTP-Test-Program"</span> + CRLF + CRLF <span style="color: #000000;">&#41;</span><br />  cBuffer  := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">512</span><span style="color: #000000;">&#41;</span><br />  cResponse:= <span style="color: #ff0000;">""</span><br /><br />  <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span> nBytes > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   nBytes    := INetRecv<span style="color: #000000;">&#40;</span> pSocket, @cBuffer <span style="color: #000000;">&#41;</span><br />   cResponse += <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> cBuffer, nBytes <span style="color: #000000;">&#41;</span><br />   cBuffer   := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">512</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">ENDDO</span><br /><br />  INetClose<span style="color: #000000;">&#40;</span> pSocket <span style="color: #000000;">&#41;</span><br /> INetCleanUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span> allTrim<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> cResponse, rat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<body>"</span>, cResponse <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">26</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<"</span>, <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> cResponse, rat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<body>"</span>, cResponse <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">26</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:24jgmhaw]
Aviso que el servidor de SQL esta caído
[quote="AIDA":3i5j473i][quote="AIDA":3i5j473i]Ya encontré lo que atora al programa es esto que uso para sacar la IP ippub:= PublicIP() <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> si quito el PublicIP() ya no se atora por que pasara esto y como remediarlo? <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->[/quote:3i5j473i] sera culpa del windos 11 <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:3i5j473i]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//**************************************************************</span><br /><span style="color: #00C800;">Function</span> PublicIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> cBuffer, cRequest, cResponse, nBytes, pSocket<br /><br /> INetInit<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  pSocket := INetConnect<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"checkip.dyndns.org"</span>, <span style="color: #000000;">80</span> <span style="color: #000000;">&#41;</span><br /><br />  <span style="color: #00C800;">IF</span> INetErrorCode<span style="color: #000000;">&#40;</span> pSocket <span style="color: #000000;">&#41;</span> <> <span style="color: #000000;">0</span><br />   ? <span style="color: #ff0000;">"Socket error:"</span>, INetErrorDesc<span style="color: #000000;">&#40;</span> pSocket <span style="color: #000000;">&#41;</span><br />   INetCleanUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   QUIT<br />  <span style="color: #00C800;">ENDIF</span><br /><br />  nBytes   := INetSend<span style="color: #000000;">&#40;</span> pSocket, <span style="color: #ff0000;">"GET / HTTP/1.1"</span> + CRLF + <span style="color: #ff0000;">"Host: checkip.dyndns.org"</span> + CRLF + <span style="color: #ff0000;">"User-Agent: HTTP-Test-Program"</span> + CRLF + CRLF <span style="color: #000000;">&#41;</span><br />  cBuffer  := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">512</span><span style="color: #000000;">&#41;</span><br />  cResponse:= <span style="color: #ff0000;">""</span><br /><br />  <span style="color: #00C800;">WHILE</span> <span style="color: #000000;">&#40;</span> nBytes > <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />   nBytes    := INetRecv<span style="color: #000000;">&#40;</span> pSocket, @cBuffer <span style="color: #000000;">&#41;</span><br />   cResponse += <span style="color: #0000ff;">Left</span><span style="color: #000000;">&#40;</span> cBuffer, nBytes <span style="color: #000000;">&#41;</span><br />   cBuffer   := Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">512</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">ENDDO</span><br /><br />  INetClose<span style="color: #000000;">&#40;</span> pSocket <span style="color: #000000;">&#41;</span><br /> INetCleanUp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span> allTrim<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> cResponse, rat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<body>"</span>, cResponse <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">26</span> <span style="color: #000000;">&#41;</span>, <span style="color: #000000;">1</span>, <span style="color: #00C800;">At</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<"</span>, <span style="color: #0000ff;">substr</span><span style="color: #000000;">&#40;</span> cResponse, rat<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"<body>"</span>, cResponse <span style="color: #000000;">&#41;</span> + <span style="color: #000000;">26</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span></div>[/code:3i5j473i][/quote:3i5j473i]
Aviso que el servidor de SQL esta caído
el problema sera lo que comenta Rick Lipkin <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> Una respuesta un poco remota... muchas aplicaciones en la nube, Att.net, Google.cm... consideran ciertas aplicaciones como "menos seguras" y tienes que generar una contraseña segura especial antes de que tu aplicación se conecte... <!-- m --><a class="postlink" href="https://support.google.com/accounts/ans">https://support.google.com/accounts/ans</a><!-- m --> ... 0255?hl=es
Aviso que el servidor de SQL esta caído
Hello Rick Lipkin I did what you recommended and if you were right I generated a key with the name of my application and it finally works correctly but this will have to be done by each user who acquires my program <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> [url:3jq71m1r]https&#58;//support&#46;google&#46;com/accounts/answer/185833?hl=es-419[/url:3jq71m1r] [quote="Rick Lipkin":3jq71m1r]Aida Kinda a long shot answer ... many cloud applications, Att.net, Google.cm .. consider certain apps as "less secure" and you have to generate a special secure password before your application will connect .. <!-- m --><a class="postlink" href="https://support.google.com/accounts/answer/6010255?hl=en">https://support.google.com/accounts/ans ... 0255?hl=en</a><!-- m --> Just my 2 cents worth .. Rick Lipkin[/quote:3jq71m1r]
Aviso que el servidor de SQL esta caído
Aida, Para obtener tu IP pública llama a esta URL: [url:g0y9asc0]https&#58;//www&#46;fivetechsoft&#46;com/getip&#46;php[/url:g0y9asc0]
Aviso que el servidor de SQL esta caído
En este ejemplo de mod_harbour tienes el código que necesitas. Posiblemente hay formas aún más sencillas de hacerlo <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> callphp.prg [code=fw:1eph8p9k]<div class="fw" id="{CB}" style="font-family: monospace;">#ifdef __PLATFORM__WINDOWS<br />&nbsp; &nbsp;<span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\h</span>arbour<span style="color: #000000;">\c</span>ontrib<span style="color: #000000;">\h</span>bcurl<span style="color: #000000;">\h</span>bcurl.ch"</span><br />#else<br />&nbsp; &nbsp;<span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"/usr/include/harbour/hbcurl.ch"</span><br />#endif<br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; curl_global_init<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; ? <span style="color: #ff0000;">"Hello world"</span><br /><br />&nbsp; ? callPHP<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"www.fivetechsoft.com/getip.php"</span> <span style="color: #000000;">&#41;</span> <br /><br />&nbsp; &nbsp;curl_global_cleanup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #00C800;">function</span> callPHP<span style="color: #000000;">&#40;</span> cUrl <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> hCurl, uValue<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! empty<span style="color: #000000;">&#40;</span> hCurl := curl_easy_init<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; curl_easy_setopt<span style="color: #000000;">&#40;</span> hCurl, HB_CURLOPT_URL, cUrl <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; curl_easy_setopt<span style="color: #000000;">&#40;</span> hCurl, HB_CURLOPT_DL_BUFF_SETUP <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> curl_easy_perform<span style="color: #000000;">&#40;</span> hCurl <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;uValue = curl_easy_dl_buff_get<span style="color: #000000;">&#40;</span> hCurl <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> uValue<br />&nbsp;</div>[/code:1eph8p9k]
Aviso que el servidor de SQL esta caído
Aida, Más simple: [code=fw:2aqt6n80]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> WebPageContents<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://www.fivetechsoft.com/getip.php"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:2aqt6n80]
Aviso que el servidor de SQL esta caído
Super <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> si funciona y el malvado <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> google ya no bloquea la aplicación <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> [code=fw:6hmr7yxc]<div class="fw" id="{CB}" style="font-family: monospace;">ippub:= WebPageContents<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://www.fivetechsoft.com/getip.php"</span> <span style="color: #000000;">&#41;</span></div>[/code:6hmr7yxc] Muchas gracias <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> seguimos en contacto y dando lata <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Saluditos <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> [quote="Antonio Linares":6hmr7yxc]Aida, Más simple: [code=fw:6hmr7yxc]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> WebPageContents<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://www.fivetechsoft.com/getip.php"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span></div>[/code:6hmr7yxc][/quote:6hmr7yxc]
Aviso que el servidor de SQL esta caído
[code=fw:1i460kgy]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> FW_PublicIP<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> WebPageContents<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"http://www.fivetechsoft.com/getip.php"</span> <span style="color: #000000;">&#41;</span></div>[/code:1i460kgy]
Aviso que el servidor de SQL esta caído
[code=fw:33k1k6xz]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">function</span> GetWebIp<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cReturn<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> xmlhttp<br />&nbsp; &nbsp;xmlhttp := win_oleCreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSXML2.ServerXMLHTTP"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;xmlhttp:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"GET"</span>, <span style="color: #ff0000;">"http://dynupdate.no-ip.com/ip.php"</span>, .F. <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Try</span><br />&nbsp; &nbsp; &nbsp; xmlhttp:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; cReturn := xmlhttp:<span style="color: #000000;">responseBody</span><br />Catch<br />&nbsp; &nbsp; &nbsp; cReturn := <span style="color: #ff0000;">"0.0.0.0"</span><br />End<br />&nbsp; &nbsp;xmlhttp := <span style="color: #00C800;">nil</span><br /><span style="color: #00C800;">return</span> cReturn<br />&nbsp;</div>[/code:33k1k6xz]
Avoid get object jump to next get -- SOLVED
Dear All, Say, there are two character gets.. How to prevent going to 2nd get object if user filled all chars of first get? Kind Regards, Frances
Avoid get object jump to next get -- SOLVED
solved. Set( _SET_CONFIRM , .T. )
Avoid internal ADS Error message (dialog)
Hello, I use traditional navigation access (like any RDD) to ADT files and SQL with RDDADS, when I have some error in SQL operation a dialog error is showed, are there some seting to avoid it? Rergards Marcelo
Avoid internal ADS Error message (dialog)
I suggest you use TRY .. CATCH .. END. When an error occurs you can retrieve the error with ADS functions and deal with the error accordingly. For SQL statments, I stongly suggest you first try executing manually in Arc32 and only when the SQL runs there without errors you should incorporate in your code.
Avoid internal ADS Error message (dialog)
Hello, thanks for response, I don't have problems with SQL sentences (sintax ,etc), e.g. if you try to delete some record DELETE FROM table WHERE column=data if some row on the table are locking for other user you have an error from ADS not from xHabour, the TRY CATCH not work for this situation the ADS error dialog will be present in the screen regards Marcelo [quote="nageswaragunupudi":16ctoaau]I suggest you use TRY .. CATCH .. END. When an error occurs you can retrieve the error with ADS functions and deal with the error accordingly. For SQL statments, I stongly suggest you first try executing manually in Arc32 and only when the SQL runs there without errors you should incorporate in your code.[/quote:16ctoaau]
Avoid sound in xbrowse
Hi everybody! How I can avoid a sound if a press space bar in xbrowse, I use space to check and uncheck the first col. Thanks in advance
Avoid sound in xbrowse
You can try with any key : [color=#0000FF:2bp14g8y]oBrw:bKeyDown := { | nKey | ( nRPos := RECNO(), ; // record-pos if needed nCPos := oBrw1:SelectedCol():nCreationOrder, ; // selected col IIF( nCPos = 1 .and. nKey == 13, ; // Sound on EDIT only on column 1 SndPlaySound( c_Path1 + "Alert.wav", 0 ), NIL ) ) }[/color:2bp14g8y] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Avoid sound in xbrowse
[quote="ukoenig":1c3qyo1d]You can try with any key : [color=#0000FF:1c3qyo1d]oBrw:bKeyDown := { | nKey | ( nRPos := RECNO(), ; // record-pos if needed nCPos := oBrw1:SelectedCol():nCreationOrder, ; // selected col IIF( nCPos = 1 .and. nKey == 13, ; // Sound on EDIT only on column 1 SndPlaySound( c_Path1 + "Alert.wav", 0 ), NIL ) ) }[/color:1c3qyo1d] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->[/quote:1c3qyo1d] Thank you but I dont want to play a sound if a check or unckeck the first col. In normal way if i press space to check i receive a windows beep like I'm done something wrong.
Avoid sound in xbrowse
On my system, I can not hear MsgBeep(). So I am unable to check where the sound is coming from. In any case if you SET BELL OFF initially, I guess you may not hear any MsgBeep()s. Can you please try that?
Avoid sound in xbrowse
Hi, My request is avoid beep sound in Msgxxxx functions. I have tried SET BELL OFF. But no success. Any comment? Thanks.
Avoid the Error Message of UEStudio.
Dear All, I try to use UES for Project Manager but when I compile the PUBLIC and PRIVATE Variable will show the warning message as following. [code=fw:2ijh093f]<div class="fw" id="{CB}" style="font-family: monospace;"><br />D:\V5\EZ4FO\ez4.prg<span style="color: #000000;">&#40;</span><span style="color: #000000;">50</span><span style="color: #000000;">&#41;</span> Warning W0001 &nbsp;Ambiguous reference: <span style="color: #ff0000;">'HMAIN'</span><br />&nbsp;</div>[/code:2ijh093f] How can I avoid this message? Best regards, Dutch
Avoid the Error Message of UEStudio.
Just declare it either as local, public or private. If it's a public or private var, declare it as file-wide memvar at the very top of the prg [i:1l5l6qq4]memvar hMain[/i:1l5l6qq4]
Avoid the Error Message of UEStudio.
Dear Hua, It means every memvar (public or private), it must declare on top of every prg file as following [code=fw:zy81tdb9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">'fivewin.ch'</span><br /><br />memvar hMain, TopWin, LeftWin<br />&nbsp;</div>[/code:zy81tdb9] Regards, Dutch
Avoid the Error Message of UEStudio.
Dear Hua, I got the option in UES. It has fixed. Automatic Memvar Declaration = yes Regards, Dutch
Ayuda
Alguien puede pasarme un ejemplo de mantenimiento de una tabla de Access con TOdbc y TDbOdbc, que contenga un UPDATE, INSERT Etc. Gracias de antemano José Martin Uriarte <!-- e --><a href="mailto:jmuarg@yahoo.es">jmuarg@yahoo.es</a><!-- e -->
Ayuda
Amigos: El pasar a 32 bits, ha sido bastante complicado, pues la metodologia de clipper difiere de Fwh. Necesito saber si puedo mostrar en pantalla con un recurso de Workshop, la informacion de un registro y segun el usuario necesite, permitir que pueda modificar. Pienso usar Say para mostrar y luego un Get, pero tengo la duda como realizarlo, sobre la misma definicion del recurso. Espero haberme expresado bien, ya que necesito realizar este cambio muy urgente. Saludos, Rafael. Fwh, xHabour 1.1.0, Workshop, Verce.
Ayuda
Rafael, El mismo código de Clipper con FiveWin, tiene que servirte con FWH. Muéstranos aqui como lo haces (PRG) y te indicamos como se hace en FWH (que debe ser igual).
Ayuda
Antonio: Muchas gracias por responder. Esto es lo que hago en Clipper, y quiero saber si puedo aplicar el mismo esquema, pero en Fwh. Se que quizas molesto demaciado, pero soy un principiante con esta herramienta tan famosa. Saludos, Rafael. *** CODIGO @ 5,27 get cod_usu5 pict '@!' color color28 read seek cod_usu5 if eof() *** DATO NUEVO stor spac(40) to des_equ1 stor spac(10) to cod_equ1 stor spac(20) to nro_ser1 stor spac(12) to rut_cli1 stor 0 to nro_hab1,per_man1,nro_con1 else *** YA EXISTE Y MUESTRA cod_equ1=cod_equ rut_cli1=rut_cli des_equ1=des_equ nro_hab1=nro_hab per_man1=per_man nro_con1=nro_con setcolor(color28) @ 7,27 say trim(cod_equ) pict '@!' @ 9,27 say trim(des_equ) pict '@!' @ 11,27 say nro_hab pict '999999' @ 13,27 say per_man pict '99' @ 15,27 say nro_con pict '9999999999' @ 17,27 say rut_cli @ 19,27 say trim(a->nom_cli) set colo to cor=1 cor:=ale(" MODIFICA DATOS , SI , NO , ") endif cor=1 if cor=1 *** AGREGA O MODIFICA @ 7,27 get cod_equ1 pict '@!' color color28 @ 9,27 get des_equ1 pict '@!' color color28 @ 11,27 get nro_hab1 pict '999999' color color28 @ 13,27 get per_man1 pict '99' color color28 @ 15,27 get nro_con1 pict '9999999999' color color28 @ 17,27 get rut_cli pict '!!!!!!!!!!!!' read cor=1 cor:=ale(" INGRESE OPCION , GRABA , MODIFICA , ") @ 24,20 say spac(58) endif if cor=1 ** GRABA endif
Ayuda
Aca te dejo un pequeño ejemplo, cualquier duda avisas... igual peudes bajar un manual basico desde UTILERIAS.... #include "FiveWin.ch" MEMVAR oBARPPAL, oREPORT, oDLGACCESO, oCOMBOBOX, oWPPAL, oWHIJAS, oCURMANO, rBMP, rDLL, lARCHIVOS,; lPRINT, nMENU, lAPPEND, lORIGEN, nRECNO, nTOP, cTitulo, dDesde, dHasta, nMEMO FUNCTION clasicli(lORIGEN) // MAESTRO CLASIFICACION CLIENTES local oDlgClaCli, oLbxClaCli, oDbfClaCli,; oGetBuscar, cBuscar,; oCmbClaCli, aCmbIndice := {"Código", "Nombre"}, nIndice := 1,; oBtnInc, oBtnCon, oBtnMod, oBtnEli, oBtnSel, oBtnImp, oBtnSalir DEFINE DIALOG oDlgClaCli RESOURCE "MAESTRO" OF oWppal; TITLE " CUENTAS POR COBRAR - Maestro Clasificación Clientes" DBSELECTAREA("jlclicla"); jlclicla->(OrdSetFocus(nIndice)); jlclicla->(DBGOTOP()) DATABASE oDbfClaCli; oDbfClaCli:GoTop(); oDbfClaCli:Blank(); nRecno := RecNo() REDEFINE LISTBOX oLbxClaCli; FIELDS jlclicla->&(FIELDNAME(1)), jlclicla->&(FIELDNAME(2)); ID 109; FIELDSIZES 80, 150; HEADERS " Código", " Nombre Clasificación"; ON RIGHT CLICK msginfo("Mostrar Menu POPUP"); ON DBLCLICK (IIF(lORIGEN, oDlgClaCli:END(), dataclacli(.F., oDlgClaCli, oDbfClaCli, oLbxClaCli))); WHEN (RecCount() > 0 ) UPDATE OF oDlgClaCli oLbxClaCli:GoTop(); oLbxClaCli:REFRESH() REDEFINE BTNBMP oBtnInc ID 106 OF oDlgClaCli NOBORDER; // INCLUIR ACTION (dataclacli(.T., oDlgClaCli, oDbfClaCli, oLbxClaCli)); PROMPT "Incluir"// FILE rBmp+"floppy.bmp" REDEFINE BTNBMP oBtnCon ID 107 OF oDlgClaCli NOBORDER; // MODIFICAR ACTION (dataclacli(.F., oDlgClaCli, oDbfClaCli, oLbxClaCli)); PROMPT "Modificar"; //FILE rBmp+"floppy.bmp" WHEN (RecCount() > 0 ) REDEFINE BTNBMP oBtnMod ID 108 OF oDlgClaCli NOBORDER; // CONSULTAR ACTION (msginfo("Que quieres Saber?")); PROMPT "Consultar"; //FILE rBmp+"floppy.bmp" WHEN (RecCount() > 0 ) REDEFINE BTNBMP oBtnEli ID 110 OF oDlgClaCli NOBORDER; // ELIMINAR ACTION (delrecord(oLbxClaCli, ,"jlclicla")); PROMPT "Eliminar"; //FILE rBmp+"floppy.bmp" WHEN (RecCount() > 0 ) REDEFINE BTNBMP oBtnSel ID 112 OF oDlgClaCli NOBORDER; // SELECCIONAR ACTION (msginfo("Seleccionar")); PROMPT "Selecionar"; //FILE rBmp+"floppy.bmp" WHEN (RecCount() > 0 ) REDEFINE BTNBMP oBtnImp ID 113 OF oDlgClaCli NOBORDER; // IMPRIMIR ACTION (oLbxClaCli:REPORT()); PROMPT "Imprimir"; //FILE rBmp+"floppy.bmp" WHEN (RecCount() > 0 ) REDEFINE BTNBMP oBtnSalir ID 114 OF oDlgClaCli NOBORDER; // SALIR ACTION (oDlgClaCli:END()); FILE rBmp+"salidaP1.bmp", rBmp+"salidaP2.bmp" REDEFINE COMBOBOX oCmbClaCli VAR nIndice; // COMBO-BOX ITEMS aCmbIndice; ON CHANGE (OrdSetFocus(nIndice), jlclicla->(DBGOTOP()),; oLbxClaCli:REFRESH(), oLbxClaCli:SetFocus()); WHEN (RecCount() > 0 ) UPDATE; ID 105 OF oDlgClaCli REDEFINE GET oGETBuscar VAR cBuscar ID 111 PICTURE "@!"; // GET BUSCAR VALID(buscar(cBuscar, oLbxClaCli, OrdSetFocus(nIndice))); WHEN (RecCount() > 0 ); OF oDlgClaCli *** Solo ToolTips oLbxClaCli:cTooltip := 'Botón Derecho para Opciones' oBtnInc:cTooltip := 'Incluir Registro' oBtnCon:cTooltip := 'Modificar Registro' oBtnMod:cTooltip := 'Consultar Registro' oBtnEli:cTooltip := 'Eliminar Registro' oBtnSel:cTooltip := 'Selecionar Registro' oBtnImp:cTooltip := 'Imprimir Los Registros' oBtnSalir:cTooltip := 'Retorna al Menu Principal' oCmbClaCli:cTooltip := 'Seleccione para Ordenar Datos' oGETBuscar:cTooltip := 'Introduzca para Buscar según Ordenado' ACTIVATE DIALOG oDlgClaCli CENTER * aRetorno := {jlemple->mpl_codigo, jlemple->mpl_nombre} * IF lORIGEN // CONTROLA SI ES LLAMADO DESDE OTRA PATALLA * RETURN (aRetorno) * ENDIF RETURN NIL // FIN MAESTRO CLASIFICACION CLIENTES FUNCTION dataclacli(lAPPEND, oDlg, oDbf, oLbx) // FICHA CLASIFICACION CLIENTE local oGET1, oGET2, oDlgDatCC, oBtnAce, oBtnSalir, oBtnAnt, oBtnSig,; cAPPEND := "Nuevo" IF !lAPPEND cAPPEND := "Modificar" oDbf:LOAD() // TRAE LOS CAMPOS PARA MODIFICAR ELSE oDbf:BLANK() ENDIF DEFINE DIALOG oDlgDatCC RESOURCE "DAT_MAESTRO" OF oDlg; TITLE oDlg:cCaption+" - "+cAPPEND REDEFINE GET oGET1 VAR oDbf:ccl_codigo ID 103 OF oDlgDatCC PICTURE "@!"; VALID(novacio(oDbf:ccl_codigo), vcodigo(oDbf:ccl_codigo, lAPPEND)); WHEN(lAPPEND) UPDATE REDEFINE GET oGET2 VAR oDbf:ccl_nombre ID 104 OF oDlgDatCC; VALID(novacio(oDbf:ccl_nombre)); WHEN(!EMPTY(oDbf:ccl_codigo)) UPDATE REDEFINE BTNBMP oBtnAnt ID 107 OF oDlgDatCC NOBORDER; // ANTERIOR ACTION (oLbx:GoUp(),; oDbf:LOAD(),; oGET1:REFRESH(),; oGET2:REFRESH(),; oLbx:REFRESH()); FILE rBmp+"anteP.bmp" UPDATE; WHEN (!lAPPEND) REDEFINE BTNBMP oBtnSig ID 108 OF oDlgDatCC NOBORDER; // SIGUIENTE ACTION (oLbx:GoDown(),; oDbf:LOAD(),; oGET1:REFRESH(),; oGET2:REFRESH(),; oLbx:REFRESH()); FILE rBmp+"sigueP.bmp" UPDATE; WHEN (!lAPPEND) REDEFINE BUTTON oBtnAce ID 105 OF oDlgDatCC; // BOTON ACEPTAR ACTION (graba(oDbf, oLbx, lAPPEND, "jlclicla", , ), oDlgDatCC:END()); PROMPT IIF(lAPPEND, "Agregar", "Actualizar"); //FILE rBmp+"grabarP.bmp"; WHEN (!EMPTY(oDbf:ccl_nombre)) UPDATE REDEFINE BUTTON oBtnSalir ID 106 OF oDlgDatCC;// NOBORDER; // BOTON CANCELAR ACTION (oDlgDatCC:END());//FILE rBmp+"salidaP1.bmp", rBmp+"salidaP2.bmp"; CANCEL *** Solo ToolTips oBtnAce:cTooltip := 'Haga Click para Grabar' oBtnSalir:cTooltip := 'Haga Click para Salir' ACTIVATE DIALOG oDlgDatCC CENTER RETURN NIL // FIN FICHA CLASIFICACION CLIENTE
Ayuda
Aitue, READ no se usa ni en FW ni en FWH.
Ayuda
Antonio: Hola, te mostre como lo hago en Clipper, no en Fw, es por esto que uso READ, mi duda es como puedo hacer lo mismo en FWH. Jose Luis, te agradesco tu ayuda, veo, todo se inia desde un Browse, pero por politicas de la empresa, la informacion no puede estar a disposicion de los digitadores, por lo que debo hacer los siguiente: 1. Pedir que digite CODIGO: 2. Revisar la base que exista: Si existe, mostrar en pantalla y dar la posibilidad de modificar, de lo contrario, Agregar registro, tal como se muestra en el codigo de Clipper. Todo lo que he leido y visto de Fwh, parten desde un browse, tal como tu me lo has indicado. A lo mejor lo que necesito hacer, no me lo permitr Fwh, pero me gustaria tener la claridad. Saludos, Rafael
Ayuda
Aitue, no es que parta de un browse, solo que uno lo usa como un maestro de visualizacion, lo que tu quieres hacer se hace tan facil en FWH como en CLIPPER, solo obvia el browse y listo, diseña tu ventana con los datos que deseas solicitar y listo, enviame a mi privado lo que deseas hacer y te envio para que tengas una idea de como hacerlo en FWH, como te dije, solo obvia el BROWSE y ya. A la orden para ayudarte, como te dije busca el manual de FWH en las utilierias. Saludos.
Ayuda
Jose Luis: Gracias por tu ayuda, te envie algo a tu correo personal. Saludos, Rafael [quote="joseluisysturiz":2yq7yu6i]Aitue, no es que parta de un browse, solo que uno lo usa como un maestro de visualizacion, lo que tu quieres hacer se hace tan facil en FWH como en CLIPPER, solo obvia el browse y listo, diseña tu ventana con los datos que deseas solicitar y listo, enviame a mi privado lo que deseas hacer y te envio para que tengas una idea de como hacerlo en FWH, como te dije, solo obvia el BROWSE y ya. A la orden para ayudarte, como te dije busca el manual de FWH en las utilierias. Saludos.[/quote:2yq7yu6i]
Ayuda
Cual versión del five? Muestra un ejemplo. Tu RPREVIEW.PRG y PRINTER.PRG son de esta versión? Saludos.
Ayuda
A ver si alguien me puede ayudar Para mostrar un browse de un array uso el siguiente codigo [code=fw:2zdwqg3d]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aDatBrow := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br /><span style="color: #0000ff;">REDEFINE</span> COLUMN BROWSE oDetalle <span style="color: #0000ff;">ID</span> <span style="color: #000000;">450</span>  <span style="color: #0000ff;">OF</span> oDialogo <span style="color: #0000ff;">FONT</span> oFontBrw<br />oDetalle:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span>aDatBrow<span style="color: #000000;">&#41;</span><br /><br />ADD COLUMN <span style="color: #0000ff;">TO</span> oDetalle <span style="color: #00C800;">DATA</span> ARRAY ELEM <span style="color: #000000;">1</span>  HEADER <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">10</span><br />ADD COLUMN <span style="color: #0000ff;">TO</span> oDetalle <span style="color: #00C800;">DATA</span> ARRAY ELEM <span style="color: #000000;">2</span>  HEADER <span style="color: #ff0000;">"Cod. Art."</span>    <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span><br />ADD COLUMN <span style="color: #0000ff;">TO</span> oDetalle <span style="color: #00C800;">DATA</span> ARRAY ELEM <span style="color: #000000;">3</span>  HEADER <span style="color: #ff0000;">"Descripción"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span><br />....</div>[/code:2zdwqg3d] Pero ahora quiero crear las columnas en un array al estilo [code=fw:2zdwqg3d]<div class="fw" id="{CB}" style="font-family: monospace;"><br />aDatBrow := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />aCols := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"Cod. Art"</span>, <span style="color: #ff0000;">"Descripcion"</span> <span style="color: #000000;">&#125;</span><br /><span style="color: #0000ff;">REDEFINE</span> COLUMN BROWSE oDetalle <span style="color: #0000ff;">ID</span> <span style="color: #000000;">450</span>  <span style="color: #0000ff;">OF</span> oDialogo <span style="color: #0000ff;">FONT</span> oFontBrw<br />oDetalle:<span style="color: #000000;">SetArray</span><span style="color: #000000;">&#40;</span>aDatBrow<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">for</span> i = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">&#40;</span>aCols<span style="color: #000000;">&#41;</span><br />   oDetalle:<span style="color: #000000;">AddColumn</span><span style="color: #000000;">&#40;</span> TCColumn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>.F., OemToAnsi<span style="color: #000000;">&#40;</span>aCols<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>, aCols<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#123;</span>|x| <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span>Pcount<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>><span style="color: #000000;">0</span>, oDetalle:<span style="color: #000000;">aArray</span><span style="color: #000000;">&#91;</span>oDetalle:<span style="color: #000000;">nAt</span>, i<span style="color: #000000;">&#93;</span> :=x, oDetalle:<span style="color: #000000;">aArray</span><span style="color: #000000;">&#91;</span>oDetalle:<span style="color: #000000;">nAt</span>, i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span>,,,,, <span style="color: #000000;">10</span>, .F., .F.,,,, .F. <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">next</span> i</div>[/code:2zdwqg3d]pero no me funciona, se que no puedo asignar directamente la variable del bucle gracias
Ayuda
Buenas noches, podrián ayudarme en lo siguiente: En una aplicación al generar el preview de un reporte si me aparecen todos los botones en la barra [url:1j3xficv]https&#58;//drive&#46;google&#46;com/file/d/1pnXvZ1dTulDWAmyr6qdBWGk5kMg7bnQw/view?usp=sharing[/url:1j3xficv] y en otra aplicación compilada con la misma versión [url:1j3xficv]https&#58;//drive&#46;google&#46;com/file/d/1mTMF9PnOYZTjyTBQLL69VwkF84O3zxs5/view?usp=sharing[/url:1j3xficv] Ambas tienen el mismo PREVIEW.DLL Por su atención gracias
Ayuda
Buenos dias. karinha, muchas gracias, solucionado. Tenia otra version de PRINTER.PRG, gracias de nuevo.
Ayuda con FW_DbfToJson
Buenas Noches Alguien tiene un ejemplo de uso de FW_DbfToJson muchas gracias Fabian
Ayuda con FW_DbfToJson
Fabian: [code=fw:2tlnr4ds]<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;">Function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> hJSon, hFile<br />   <br />   RddSetDefault<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"DBFCDX"</span><span style="color: #000000;">&#41;</span><br />   <br />   USE d:\fwh\samples\customer.dbf <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"Cust"</span><br /><br />   hJson := Cust-><span style="color: #000000;">&#40;</span>FW_DbfToJson<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />   hFile := FCreate<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"_Resp.json"</span> <span style="color: #000000;">&#41;</span><br />   FWrite<span style="color: #000000;">&#40;</span>hFile,hJSon<span style="color: #000000;">&#41;</span><br />   FClose<span style="color: #000000;">&#40;</span>hFile<span style="color: #000000;">&#41;</span><br />   <br />   HB_JsonDecode<span style="color: #000000;">&#40;</span>hJSon, @hJSon<span style="color: #000000;">&#41;</span><br />   <span style="color: #0000ff;">xBrowse</span><span style="color: #000000;">&#40;</span>hJSon,<span style="color: #ff0000;">"hJSon"</span><span style="color: #000000;">&#41;</span><br />   <br />   dbCloseall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span><span style="color: #00C800;">nIl</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:2tlnr4ds]
Ayuda Actualizar Browse en Dos Aplicaciones en Red
Estimado Colegas Tengo dos aplicaciones corriendo en red que utilizan la misma dbf una que ingresan datos de diferentes terminales aplicacion A y otra en el sector de pagos aplicacion B, Lo que quiero hacer es que se actualice el browse de la aplicacion B con los datos que son ingresados en la aplicacion A He probado con timers y olbx:refresh() pero no me funciona, de la unica manera que me esta funcionando es cerrando la aplicacion B y volviendola a abrir desde ya muchisimimas gracias <!-- e --><a href="mailto:databaselab2002@yahoo.com.ar">databaselab2002@yahoo.com.ar</a><!-- e --> Fabian
Ayuda Actualizar Browse en Dos Aplicaciones en Red
Usando un timer y un refresh del browse, debe funcionar
Ayuda Actualizar Browse en Dos Aplicaciones en Red
No te olvides de hacer el commit en el terminal que graba los datos, ya que si no, los archivos no se actualizan hasta que el programa termina. Atte, Lautaro
Ayuda Epson TM-T900FA Fiscal Argentina
Hola Estimados Colegas Tengo que adaptar un software fiscal a la tickeadora fiscal de 2 generacion , alguien tiene un ejemplo sencillo de uso del OCX o DLL para la Epson TM-T900FA (he probado con ambos y no logro la comunicacion con el controlador ) Desde ya muchas gracias Fabian
Ayuda OCX Fiscal Epson
Estimados Colegas Tengo que modificar un software para que imprima en tickeadora fiscal Tmu220af II , si me pueden orientar o han realizado la comunicacion desde Xharbour y tienen un prg de ejemplo desde ya muchas gracias Fabian <!-- e --><a href="mailto:windev2@yahoo.com.ar">windev2@yahoo.com.ar</a><!-- e -->
Ayuda Tsbrowse 8 y obrw:gopos()
Estimado Colegas Tengo problemas con la version 8 de Tsbrowse no me funciona el obrw:gopos() ej GoPos(6,6) me ubica el prompt en la columna 6 pero no se mueve hasta la fila 6 . ejecuto esta instruccion cuando hago el ON INIT del dialogo. Si alguien me puede orientar Gracias Fabian
Ayuda Tsbrowse 8 y obrw:gopos()
Estimados Colegas Ya encontre la solucion hay que poner lInitGoTop:=.F: que por defecto esta en = .T. Fabian
Ayuda envio de Sms modem 3G
Estimados Colegas Alguien tiene un ejemplo sencillo de como enviar SMS utilizando un modem 3g desde Fivewin desde ya muchas gracias Fabian
Ayuda envio de Sms modem 3G
A ver si esto te sirve. Te faltará el InfoCOM.exe, ¿Donde te lo opuedo enviar? Mírate este código con paciencia, enseguida pillarás como funciona. [code=fw:2218jd4y]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #B900B9;">/* Función para usar la utilidad InfoCOM.exe para gestionar puertos COM.<br />   ------------------------------------------------------------------ */</span><br /><br /><span style="color: #00C800;">STATIC</span> nPORTCOMSIM := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">STATIC</span> nPINSIM     := <span style="color: #000000;">-1</span><br /><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> nGetCOMofSIM<span style="color: #000000;">&#40;</span> lmensaje <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Local</span> nContador  := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">Local</span> nRespuesta := <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">For</span> nContador := <span style="color: #000000;">0</span> <span style="color: #0000ff;">To</span> <span style="color: #000000;">35</span><br /><br />    <span style="color: #B900B9;">//nRespuesta := ShellExecute( 0, "open", "c:\temp\infocom.exe", "COM" + AllTrim(Str(nContador, 3, 0 )) + " ICC", "", 1)     </span><br />    <span style="color: #B900B9;">//nRespuesta := Waitrun( "c:\temp\infocom.exe COM" + AllTrim(Str(nContador, 3, 0 )) + " ICC", 2 )</span><br /><br />    nRespuesta := Waitrun<span style="color: #000000;">&#40;</span> cPathINFOCOM<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"Infocom.exe"</span> + <span style="color: #ff0000;">" COM"</span> + AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>nContador, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" AT+CPIN?"</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>   <span style="color: #B900B9;">// If(nContador = 0, 1, 2) )</span><br />    <br />    Traza<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"nContador/nRespuesta:"</span>, nContador, <span style="color: #ff0000;">"/"</span>, nRespuesta <span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #00C800;">If</span> nRespuesta = <span style="color: #000000;">0</span><br />        <span style="color: #00C800;">If</span> lmensaje<br />            <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GetTrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SIM localitzat al port:"</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" COM"</span> + AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>nContador, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, Gettrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Atenció"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">EndIf</span><br />        nPORTCOMSIM := nContador<br />        Exit<br />    <span style="color: #00C800;">EndIf</span><br /><br />EndFor<br /><br /><span style="color: #00C800;">If</span> nContador > <span style="color: #000000;">35</span> .and. lmensaje<br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GetTrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SIM NO localitzat."</span><span style="color: #000000;">&#41;</span> , Gettrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ERROR !"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nContador > <span style="color: #000000;">35</span>, <span style="color: #000000;">0</span>, nContador <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> uSetPINSIM<span style="color: #000000;">&#40;</span> nCom, lMensaje <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Local</span> nPIN       := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">Local</span> nRespuesta := <span style="color: #000000;">0</span><br /><br /><span style="color: #00C800;">If</span> nCom = <span style="color: #000000;">0</span><br />    nCom := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nPORTCOMSIM = <span style="color: #000000;">0</span>, nGetCOMofSIM<span style="color: #000000;">&#40;</span> lMensaje <span style="color: #000000;">&#41;</span>, nPORTCOMSIM <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">If</span> nCom = <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">Return</span> .F.<br /><span style="color: #00C800;">EndIf</span><br /><br />MsgGet<span style="color: #000000;">&#40;</span> GetTrad<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Atenció!"</span><span style="color: #000000;">&#41;</span>, GetTrad<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Indiqui el COM del SIM:"</span><span style="color: #000000;">&#41;</span>, @ncOM <span style="color: #000000;">&#41;</span><br />MsgGet<span style="color: #000000;">&#40;</span> GetTrad<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Atenció!"</span><span style="color: #000000;">&#41;</span>, GetTrad<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Indiqui el PIN del SIM:"</span><span style="color: #000000;">&#41;</span>, @nPIN <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">If</span> nPIN = <span style="color: #000000;">0</span><br />    <span style="color: #B900B9;">/* Si torna a entrar al programa i ja ha desblocat el SIM si indicar una altra vegada el PIN dona error, per<br />       tan permeto que indiqui un PIN '0000' i s'intentarà llegir el IMEI del SIM, si s'aconsegueix permetrà<br />       continuar, si no vol dir que no té accés al SIM.<br />       ------------------------------------------------------------------------------------------------------ */</span><br />    nRespuesta := Waitrun<span style="color: #000000;">&#40;</span> cPathINFOCOM<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"Infocom.exe"</span> + <span style="color: #ff0000;">" COM"</span> + AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>nCOM, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" ICC"</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br />  <br />  <span style="color: #00C800;">Else</span><br /><br />    nRespuesta := Waitrun<span style="color: #000000;">&#40;</span> cPathINFOCOM<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"Infocom.exe"</span> + <span style="color: #ff0000;">" COM"</span> + AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>nCOM, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" AT+CPIN="</span> + <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10000</span> + nPIN, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">If</span> nRespuesta = <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">If</span> lMensaje<br />        <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GetTrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"SIM desblocat."</span><span style="color: #000000;">&#41;</span>, Gettrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Atenció"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">EndIf</span><br />    nPORTCOMSIM := nCOM<br />    nPINSIM     := Val<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> <span style="color: #000000;">10000</span> + nPIN, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">4</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />ElseIf lmensaje<br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GetTrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"PIN erroni."</span> <span style="color: #000000;">&#41;</span>, Gettrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ERROR !"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><br />Traza<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"nRespuesta:"</span>, nRespuesta <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">&#40;</span> nRespuesta == <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> lEnviaSMS<span style="color: #000000;">&#40;</span> nCom, cTelefono, cMensaje, nVisual, lmensaje <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">Local</span> nRespuesta := <span style="color: #000000;">-1</span><br /><br /><span style="color: #00C800;">If</span> nCom = <span style="color: #000000;">0</span><br />    nCom := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> nPORTCOMSIM = <span style="color: #000000;">0</span>, nGetCOMofSIM<span style="color: #000000;">&#40;</span> lMensaje <span style="color: #000000;">&#41;</span>, nPORTCOMSIM <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><span style="color: #00C800;">If</span> nCom = <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">Return</span> .F.<br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">If</span> nPINSIM = <span style="color: #000000;">-1</span><br />    uSetPINSIM<span style="color: #000000;">&#40;</span> nCom, lMensaje <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><span style="color: #00C800;">If</span> nPINSIM = <span style="color: #000000;">-1</span><br />    <span style="color: #00C800;">Return</span> .F.<br /><span style="color: #00C800;">EndIf</span><br /><br />cMensaje := cMensaje := Strtran<span style="color: #000000;">&#40;</span> cMensaje, <span style="color: #ff0000;">'"'</span>, <span style="color: #ff0000;">"'"</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">Nil</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//nRespuesta := Waitrun( cPathINFOCOM( .T. ) + "Infocom.exe" + " COM" + AllTrim(Str(nCOM, 3, 0 )) + " SMS " + cTelefono + ' "' + cMensaje + "-" + AllTrim(Str(nCOM, 3, 0 ))+ '"', nVisual )</span><br /><br />nRespuesta := Waitrun<span style="color: #000000;">&#40;</span> cPathINFOCOM<span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">"Infocom.exe"</span> + <span style="color: #ff0000;">" COM"</span> + AllTrim<span style="color: #000000;">&#40;</span>Str<span style="color: #000000;">&#40;</span>nCOM, <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">" SMS "</span> + cTelefono + <span style="color: #ff0000;">' "'</span> + cMensaje + <span style="color: #ff0000;">'"'</span>, nVisual <span style="color: #000000;">&#41;</span><br />Traza<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"Envío SMS a: "</span>, cTelefono <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//nRespuesta = 0</span><br /><br />Traza<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #ff0000;">"nRespuesta:"</span>, nRespuesta, <span style="color: #000000;">&#40;</span> nRespuesta == <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">If</span> lMensaje .and. <span style="color: #000000;">&#40;</span> nRespuesta <> <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> GetTrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Missatge no enviat a "</span> + cTelefono<span style="color: #000000;">&#41;</span>, Gettrad<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ERROR !"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #000000;">&#40;</span> nRespuesta == <span style="color: #000000;">0</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #B900B9;">//------------------------------------------------------------------</span><br /><span style="color: #00C800;">FUNCTION</span> Traza<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /><span style="color: #00C800;">FUNCTION</span> GetTrad<span style="color: #000000;">&#40;</span>c<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> c<br /><span style="color: #00C800;">FUNCTION</span> cPathINFOCOM<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> <span style="color: #ff0000;">"C:<span style="color: #000000;">\T</span>emp<span style="color: #000000;">\"</span><br /></span></div>[/code:2218jd4y]
Ayuda envio de Sms modem 3G
Fivewidi Por favor Enviamelo a <!-- e --><a href="mailto:windev2@yahoo.com.ar">windev2@yahoo.com.ar</a><!-- e --> Gracias Fabian
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
Amigos Muy buenas tardes. Tengo un problema o es error mio. Necesito obtener el Nombre del Día de la Semana, para lo cual uso de la siguiente Forma: cdow(Date()), mi problema es que obtengo "Sábado", con acento, quisiera obtener cada dia, sin acento. Podría ser " Sabado " o " Saturday ". Muchos Saludos Antonio
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
Saludos, yo que tu me creo un array publico con los dias de la semana, entonces uso en una VAR el numero del dia y eso hacia la posicion del array, asi lo hago con los meses y en mi tabla o dbf solo guardo el dia del mes o de la semana y cuando muestro se ve es los nombres de los meses o dias de la semana, saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
[code=fw:3lw0j0jr]<div class="fw" id="{CB}" style="font-family: monospace;">DayOfWeek := STRTRAN<span style="color: #000000;">&#40;</span>cdow<span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"á"</span>, <span style="color: #ff0000;">"a"</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:3lw0j0jr]
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
[quote="Bayron":ziqce9mg][code=fw:ziqce9mg]<div class="fw" id="{CB}" style="font-family: monospace;">DayOfWeek := STRTRAN<span style="color: #000000;">&#40;</span>cdow<span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>, <span style="color: #ff0000;">"á"</span>, <span style="color: #ff0000;">"a"</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:ziqce9mg][/quote:ziqce9mg] Hola Bayron Muchas gracias por tu ayuda. Para poder obtener el nombre sin acento, a tu sugerencia la tuve que modificar asi: DayOfWeek := STRTRAN(OemToAnsi(cdow(fe)), "á", "a") No se si de esta forma, hay opcion. Muchos Saludos. Antonio
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
[quote="joseluisysturiz":18a8829o]Saludos, yo que tu me creo un array publico con los dias de la semana, entonces uso en una VAR el numero del dia y eso hacia la posicion del array, asi lo hago con los meses y en mi tabla o dbf solo guardo el dia del mes o de la semana y cuando muestro se ve es los nombres de los meses o dias de la semana, saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:18a8829o] Hola Jose Luis. Muchas gracias por responder. Segun lo que tu me indicas, tengo la siguiente duda. Si tengo un Array con los dias de las Semana de "Lunes a Domingo", y por ejemplo el mes de Noviembre con los dias del 01 al 30, como podria saber que el "13/11/2019" corresponde a dia " Miercoles ", cualquier fecha, si en el Array solo tengo los nombres de los 7 dias. Quisas yo este muy confundido o no entiendo tu explicacion. Espero por comentarios. Muchos Saludos. Antonio
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
[quote="remtec":3ogp8mpp][quote="joseluisysturiz":3ogp8mpp]Saludos, yo que tu me creo un array publico con los dias de la semana, entonces uso en una VAR el numero del dia y eso hacia la posicion del array, asi lo hago con los meses y en mi tabla o dbf solo guardo el dia del mes o de la semana y cuando muestro se ve es los nombres de los meses o dias de la semana, saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:3ogp8mpp] Hola Jose Luis. Muchas gracias por responder. Segun lo que tu me indicas, tengo la siguiente duda. Si tengo un Array con los dias de las Semana de "Lunes a Domingo", y por ejemplo el mes de Noviembre con los dias del 01 al 30, como podria saber que el "13/11/2019" corresponde a dia " Miercoles ", cualquier fecha, si en el Array solo tengo los nombres de los 7 dias. Quisas yo este muy confundido o no entiendo tu explicacion. Espero por comentarios. Muchos Saludos. Antonio[/quote:3ogp8mpp] saludos, crei solo buscabas saber el dia de semana en algo corto, no por una fecha completa, asi como dices lo que te digo no te sirve si no de la forma que lo piensas hacer, aca te dejo algo que te podria servir, saludos, gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> [code=fw:3ogp8mpp]<div class="fw" id="{CB}" style="font-family: monospace;"><br />*** <span style="color: #ff0000;">"Days in month..:"</span>, DaysInMonth<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />*** <span style="color: #ff0000;">"Day of year....:"</span>, DoY<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />*** <span style="color: #ff0000;">"Begin of month.:"</span>, BoM<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />*** <span style="color: #ff0000;">"End of month...:"</span>, EoM<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />*** <span style="color: #ff0000;">"Week of month..:"</span>, WoM<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />*** <span style="color: #ff0000;">"Week of year...:"</span>, WoY<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />*** <span style="color: #ff0000;">"Begin of year..:"</span>, BoY<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />*** <span style="color: #ff0000;">"End of year....:"</span>, EoY<span style="color: #000000;">&#40;</span> dDate <span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:3ogp8mpp]
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
Hola Jose Luis Reitero las gracias por tu tiempo y ayuda. Efectivamente lo que necesito es que para cualquier fecha del Mes, el nombre del Dia. Pense que me seria mas facil, lo hacia en el querido Clipper hace muchos años, pero en Fwh 17.09 y Harbour, me he complicado enormemente, pero requiero dar con la solucion. No creo que sea el unico que ha requerido de esto. Muchos Saludos. Antonio.
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
Hola Antonio, te paso una función que tengo donde genero el dia de la fecha, espero y te sirva: FUNCTION Fecha( dFecha ) LOCAL cLeyenda, aDias, aMeses DEFAULT dFecha := Date() aDias := { "Domingo, ","Lunes, ","Martes, ","Miercoles, ","Jueves, ","Viernes, ","Sabado, " } aMeses := { "Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre" } cLeyenda := aDias[ DoW( dFecha ) ] + Str( Day( dFecha ),2 ) + " de " + aMeses[ Month( dFecha ) ] + ; " de " + Str( Year( dFecha ),4 ) Return cLeyenda Cualquier duda estoy a tus ordenes Saludos! Eduardo Borondón Muñiz
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
[quote="EBM":y9tgu6d8]Hola Antonio, te paso una función que tengo donde genero el dia de la fecha, espero y te sirva: FUNCTION Fecha( dFecha ) LOCAL cLeyenda, aDias, aMeses DEFAULT dFecha := Date() aDias := { "Domingo, ","Lunes, ","Martes, ","Miercoles, ","Jueves, ","Viernes, ","Sabado, " } aMeses := { "Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre" } cLeyenda := aDias[ DoW( dFecha ) ] + Str( Day( dFecha ),2 ) + " de " + aMeses[ Month( dFecha ) ] + ; " de " + Str( Year( dFecha ),4 ) Return cLeyenda Cualquier duda estoy a tus ordenes Saludos! Eduardo Borondón Muñiz[/quote:y9tgu6d8] Hola Eduardo Borondón Muñiz Mil gracias por tu gentileza, ayuda y disposición. He realizado varias pruebas y Funciona PERFECTO. Muchas gracias. Saludos Antonio.
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
Casi lo olvido, hace mucho que no programo, pero la tenia por ahi... Despues del año 2000, ya no se dice [quote:rqfap5bv]de 2000[/quote:rqfap5bv] sino [quote:rqfap5bv]del 2000[/quote:rqfap5bv] [code=fw:rqfap5bv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> FechaLet<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">LOCAL</span> cMes := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'Enero     '</span>, <span style="color: #ff0000;">'Febrero   '</span>, <span style="color: #ff0000;">'Marzo     '</span>, <span style="color: #ff0000;">'Abril     '</span>,;<br />        <span style="color: #ff0000;">'Mayo      '</span>, <span style="color: #ff0000;">'Junio     '</span>, <span style="color: #ff0000;">'Julio     '</span>, <span style="color: #ff0000;">'Agosto    '</span>,;<br />        <span style="color: #ff0000;">'Septiembre'</span>, <span style="color: #ff0000;">'Octubre   '</span>, <span style="color: #ff0000;">'Noviembre '</span>, <span style="color: #ff0000;">'Diciembre '</span> <span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> cDia   := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">'Domingo'</span>, <span style="color: #ff0000;">'Lunes'</span>,<span style="color: #ff0000;">'Martes'</span>,<span style="color: #ff0000;">'Miércoles'</span>,;<br />        <span style="color: #ff0000;">'Jueves'</span>,<span style="color: #ff0000;">'Viernes'</span>,<span style="color: #ff0000;">'Sábado'</span><span style="color: #000000;">&#125;</span><br /><br />    <span style="color: #00C800;">LOCAL</span> FechaLet := cDia<span style="color: #000000;">&#91;</span> DoW<span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">', '</span> +;<br />        Str<span style="color: #000000;">&#40;</span>Day<span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">' de '</span> +;<br />        AllTrim<span style="color: #000000;">&#40;</span>cMes<span style="color: #000000;">&#91;</span> Month<span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span> +;<br />        <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> > <span style="color: #000000;">2000</span>, <span style="color: #ff0000;">' del '</span>, <span style="color: #ff0000;">' de '</span><span style="color: #000000;">&#41;</span> +;<br />        Str<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">Year</span><span style="color: #000000;">&#40;</span>Date<span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> FechaLet</div>[/code:rqfap5bv]
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
[code=fw:511lpi0p]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">Function</span> Dias<span style="color: #000000;">&#40;</span>dDate<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">Return</span> cDow<span style="color: #000000;">&#40;</span>dDate<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">", "</span>+str<span style="color: #000000;">&#40;</span>day<span style="color: #000000;">&#40;</span>dDate<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" de "</span> +cMonth<span style="color: #000000;">&#40;</span>dDate<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" del "</span>+str<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">year</span><span style="color: #000000;">&#40;</span>dDate<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span></div>[/code:511lpi0p]
Ayuda para Obtener el Dia de Semana de Fecha SOLUCIONADO
Hola Amigos. Muchas gracias a todos los colegas que me ayudaron a solucionar este problema, hoy ya funciona Perfecto. Muchos Saludos. Antonio
Ayuda !!!
Buenos dias Agradecere si alguien me envia varios ejemplos para controlar webcams desde FWH, si existe alguna clase. Nota no puedo hacer funcionar la de Cesar (Webcam32) ya que trata de abrir el programa pero se cierra automaticamente Saludos
Ayuda !!!
El maestro The Full creó una clase que se llama TCapture, escribeme y con gusto te la envío. <!-- e --><a href="mailto:gersomfernando@yahoo.com">gersomfernando@yahoo.com</a><!-- e --> Saludos!!
Ayuda !!! con colores de un folder :(
HOLA Me podrian dar una ayudadita <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> hice un folder dentro de un windows que dejo fijo abajo de unos xbrowse este folder esta sin pintar su Dialogtodo funciona muy bien pero el folder como las pestañitas quedan en color blanco y no logro que tomen el color no me funciona lo siguiente oFld:aDialogs[1]:SetColor( "CLR_YELLOW,CLR_HBLUE" )oFld:SetColor( "CLR_YELLOW,CLR_HBLUE" )oFld:aDialogs[1]:SetColor(rgb(255, 255, 200))solo funciona si pongo oFld:aDialogs[1]:SetBrush( oBrush )me pueden ayudar porfis[url=http&#58;//img267&#46;imageshack&#46;us/my&#46;php?image=folderps0&#46;jpg:39le1f80][img:39le1f80]http&#58;//img267&#46;imageshack&#46;us/img267/6862/folderps0&#46;jpg[/img:39le1f80][/url:39le1f80][url=http&#58;//g&#46;imageshack&#46;us/img267/folderps0&#46;jpg/1/:39le1f80][img:39le1f80]http&#58;//img267&#46;imageshack&#46;us/img267/folderps0&#46;jpg/1/w1034&#46;png[/img:39le1f80][/url:39le1f80][code:39le1f80] function misfolders&#40;&#41; local oDlg, oFld, oSay,oFont,APERS2,oBrush DEFINE BRUSH oBrush FILE "Brush&#46;Bmp" DEFINE DIALOG oDlg OF oChild TRANSPARENT FROM 0, 0 TO 0, 0 @ 20&#46;135, 20&#46;4 FOLDER oFld PROMPTS "&Datos del cliente", "&And OOP", "&Primas pagadas" ; PAGES "fold1", "fold2", "fold3" COLORS "CLR_YELLOW,CLR_HBLUE"; OF oDlg SIZE 517&#46;6, 160 oFld&#58;aDialogs&#91;1&#93;&#58;SetBrush&#40; oBrush &#41;// funciona oFld&#58;aDialogs&#91;2&#93;&#58;SetBrush&#40; oBrush &#41;// funciona oFld&#58;aDialogs&#91;1&#93;&#58;SetColor&#40;rgb&#40;255, 255, 200&#41;&#41; //no funciona oFld&#58;aEnable = &#123; &#46;t&#46;, &#46;t&#46; ,&#46;t&#46;&#125; oFld&#58;aDialogs&#91;1&#93;&#58;SetColor&#40; "CLR_YELLOW,CLR_HBLUE" &#41;// no funciona oFld&#58;SetColor&#40; "CLR_YELLOW,CLR_HBLUE" &#41;// no funciona DEFINE FONT oFont NAME "Ms Serif" SIZE 14,14 @ 0,1 SAY oSay PROMPT " NOMBRE " oF oFld&#58;aDialogs&#91; 1 &#93; @ 1,1 say oGetN var getNOM OF oFld&#58;aDialogs&#91; 1 &#93; size 150,10 BORDER ACTIVATE DIALOG oDlg NOWAIT ; ON INIT ChangeParent&#40; oDlg, oWndD &#41; oBrush&#58;End&#40;&#41; oDlg&#58;End&#40;&#41; return nil function ChangeParent&#40; oDlg, oWndD &#41; local hCtrl &#58;= GetWindow&#40; oDlg&#58;hWnd, GW_CHILDD &#41; local n, aChilds &#58;= &#123;&#125; while hCtrl != 0 AAdd&#40; aChilds, hCtrl &#41; hCtrl = GetWindow&#40; hCtrl, GW_HWNDNEXTT &#41; end AEval&#40; aChilds, &#123; | hCtrl | SetParent&#40; hCtrl, oWndD&#58;hWnd &#41; &#125; &#41; for n = 1 to Len&#40; oDlg&#58;aControls &#41; AAdd&#40; oWndD&#58;aControls, oDlg&#58;aControls&#91; n &#93; &#41; next return nil [/code:39le1f80]
Ayuda !!! con colores de un folder :(
Aida,Puedes usar un brush creado a partir de un bitmap que use ese degradado de colores <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Ayuda !!! con colores de un folder :(
pues sip a si lo hare veo que colores no se pudo ya consegui un bmp bonito para el fondoGracias por todoAida <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Ayuda !!! con colores de un folder :(
[quote="Antonio Linares":1njccvcb]Aida, Puedes usar un brush creado a partir de un bitmap que use ese degradado de colores <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->[/quote:1njccvcb]Antonio,yo uso este y me funciona bien, mis folder son de recurso..porque los de AIDA no, sera por la posicion del FOLDER..?oFld:aDialogs[1]:SetColor(rgb( ,255, 255, 200)) <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Ayuda !!! con colores de un folder :(
Jose Luis,Tienes razón en que ella no estaba llamando correctamente al método SetColor(), pero la cuestión es que ella quiere un degradado y eso no puede hacerlo con SetColor().Se podría usar la nueva DATA bClrGrad tambien. A ver si preparamos unos ejemplos.
Ayuda !!! con colores de un folder :(
ola, usando oBrush DEFINE BRUSH oBrush FILE "file.bmp" @ 022, 013 SAY oNom_s_Clie VAR "R.Social:" PIXEL OF oFld:aDialogs[ 1 ] SIZE 30,10 FONT oFont @ 034, 013 SAY oFan_s_Clie VAR "N.Fantasia:" PIXEL OF oFld:aDialogs[ 1 ] SIZE 30,10 FONT oFont DEFINE DIALOG oDlg FROM 4, 4 TO 34.4, 61 TITLE If( lAppend, "Novo Cliente", "Atualiza/Consulta Cliente" ) @ 001, 001 Folder ofld Items "&Dados do Cliente", "&End.Cobraça/Entrega", "&Observações/Complemento" PIXEL OF oDlg SIZE 224, 215 oFld:aDialogs[1]:SetBrush( oBrush ) oFld:aDialogs[2]:SetBrush( oBrush ) oFld:aDialogs[3]:SetBrush( oBrush )...... @ 009, 162 CHECKBOX oPfj_Clie VAR lPfj_Clie PROMPT "Pessoa Física" SIZE 050, 09 PIXEL OF oFld:aDialogs[ 1 ] FONT oFont ; ON CHANGE If(lPfj_Clie=.t., (oFan_s_Clie:SetText( "Nome:" ), oNom_s_Clie:SetText( "Nome:" ), oFan_s_Clie:Refresh(), oNom_s_Clie:Refresh(), oCgc_Clie:Disable(), oIns_Clie:Disable(), oCpf_Clie:Enable(), oIde_Clie:Enable() ), (oFan_s_Clie:Refresh(), oNom_s_Clie:Refresh(), oFan_s_Clie:SetText( "N.Fantasia:" ), oNom_s_Clie:SetText( "R.Social:" ), oNom_s_Clie:Refresh(), oFan_s_Clie:Refresh(), oCpf_Clie:Disable(), oIde_Clie:Disable(), oCgc_Clie:Enable(), oIns_Clie:Enable() ) )ANTES[img:308fp0gd]http&#58;//www&#46;johnson&#46;oi&#46;com&#46;br/ofld1&#46;jpg[/img:308fp0gd]DEPOIS[img:308fp0gd]http&#58;//www&#46;johnson&#46;oi&#46;com&#46;br/ofld2&#46;jpg[/img:308fp0gd]sem BRUSH trabalha normal
Ayuda !!! con colores de un folder :(
Muchas gracias Johnson <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Tome nota de tu ejemplo me fue muy utilTe agradesco mucho SaluditosAida <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
He estado trabajando, intentado hacer una clase para el envio de mensajes y archivos usando la api de GreenApi, la cual es de pago, ($12) he tenido exito enviando mensajes y contactos, no asi con el enviod e archivos, he atacado el problema intentado enviar el archivo en base 64, el archivo se envia, pero nunca se decodifca a su binario correspondiente apareciendo como coarrupto, por lo que sospecho que elenvio es en modo binario, pero igualmente el archivo se envia, pero me parece que llega incompleto, si alguien logra hacerlo funcionar bien, le ruego lo comparta asi como yo lo hago con este trabajo. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> gracias y buena suerte. [url:38zbbe8l]https&#58;//console&#46;green-api&#46;com/app/api/sendFileByUpload[/url:38zbbe8l] [b:38zbbe8l]Codigo de el uso[/b:38zbbe8l] [code=fw:38zbbe8l]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #B900B9;">//Esto Funciona</span><br />   oGA := GreenApi<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"7100068281"</span>, <span style="color: #ff0000;">"1427d09058014f3cbb5033f3fccc8b0d0ed0ae8d44e946c8c2"</span> <span style="color: #000000;">&#41;</span><br />   oGA:<span style="color: #000000;">setLog</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">TRUE</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">IF</span> !oGA:<span style="color: #000000;">sendMessage</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"50588888888"</span>,<span style="color: #ff0000;">"KDSOFT - Prueba de class!"</span> + FINL + Time<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      ?oGA:<span style="color: #000000;">cError</span><br />   <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">IF</span> !oGA:<span style="color: #000000;">sendContact</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"50588888888"</span>,  <span style="color: #ff0000;">"50588888899"</span>, <span style="color: #ff0000;">"Carlos"</span>, <span style="color: #ff0000;">"Ivan"</span>, <span style="color: #ff0000;">"Vargas"</span>, <span style="color: #ff0000;">"KDSoft"</span> <span style="color: #000000;">&#41;</span><br />      ?oGA:<span style="color: #000000;">cError</span><br />   <span style="color: #00C800;">ENDIF</span><br />  <span style="color: #B900B9;">//Esto no funciona</span><br />   <span style="color: #00C800;">IF</span> !oGA:<span style="color: #000000;">sendFileByUpload</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"50588888888"</span>, <span style="color: #ff0000;">"d:<span style="color: #000000;">\8</span>1774383108888_payment.pdf"</span> <span style="color: #000000;">&#41;</span><br />      ?oGA:<span style="color: #000000;">cError</span><br />   <span style="color: #00C800;">ENDIF</span><br />   oGA:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /> </div>[/code:38zbbe8l]
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
[code=fw:ud5l41oo]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#define</span> __NOBINARY__<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #B900B9;">//REEMPLAZAR POR LOS QUE LES INDIQUE AL REGISTRARSE EN GREENAPI, HAY UN MODO DEMO, DEBEN CREAR UNA CUENTA DESSARLLOADOR, CREAR UNA INSTANCIA Y VINCULAR UN DISPOSITIVO. </span><br /><span style="color: #00D7D7;">#define</span> GREEN_IDINSTANCE  <span style="color: #ff0000;">"7100068281"</span><br /><span style="color: #00D7D7;">#define</span> GREEN_APITOKEN   <span style="color: #ff0000;">"1427d09058014f3cbb5033f3fccc8b0d0ed0ae8d44e946c8c2"</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">CLASS</span> GreenApi<br />   <span style="color: #00C800;">DATA</span> cApiURL, cMediaURL<br />   <span style="color: #00C800;">DATA</span> cIdInstance, cIdToken<br />   <span style="color: #00C800;">DATA</span> oHttp<br />   <span style="color: #00C800;">DATA</span> lLog<br />   <span style="color: #00C800;">DATA</span> cError<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cIdInstance, cIdToken <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />   <span style="color: #00C800;">METHOD</span> SetLog<span style="color: #000000;">&#40;</span> lLog <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">lLog</span> := lLog<br />   <span style="color: #00C800;">METHOD</span> SetIdInstance<span style="color: #000000;">&#40;</span> cIdInstance <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">cIdInstance</span> := cIdInstance<br />   <span style="color: #00C800;">METHOD</span> SetIdToken<span style="color: #000000;">&#40;</span> cIdToken <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">cIdToken</span> := cIdToken<br />   <span style="color: #00C800;">METHOD</span> SetURL<span style="color: #000000;">&#40;</span> cMethod, lMedia <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> sendMessage<span style="color: #000000;">&#40;</span> cPhone, cMessage <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> sendFileByUpload<span style="color: #000000;">&#40;</span> cPhone, cFile, cCaption <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> sendContact<span style="color: #000000;">&#40;</span> cPhone, hContact <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cIdInstance, cIdToken <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />   <span style="color: #00C800;">LOCAL</span> oErr<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> cIdInstance <span style="color: #0000ff;">TO</span> GREEN_IDINSTANCE<br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> cIdToken <span style="color: #0000ff;">TO</span> GREEN_APITOKEN<br /><br />   ::<span style="color: #000000;">lLog</span>   := <span style="color: #00C800;">FALSE</span><br /><br />   ::<span style="color: #000000;">SetIdInstance</span><span style="color: #000000;">&#40;</span> cIdInstance <span style="color: #000000;">&#41;</span><br />   ::<span style="color: #000000;">SetIdToken</span><span style="color: #000000;">&#40;</span> cIdToken <span style="color: #000000;">&#41;</span><br /><br />   ::<span style="color: #000000;">cApiURL</span>   := <span style="color: #ff0000;">"https://api.green-api.com/waInstance"</span><br />   ::<span style="color: #000000;">cMediaURL</span> := <span style="color: #ff0000;">"https://media.greenapi.com/waInstance"</span><br /><br />   ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">""</span><br /><br />   <span style="color: #00C800;">TRY</span><br />      ::<span style="color: #000000;">oHttp</span> := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSXML2.ServerXMLHTTP.6.0"</span> <span style="color: #000000;">&#41;</span><br />   CATCH<br />      <span style="color: #00C800;">TRY</span><br />         ::<span style="color: #000000;">oHttp</span> := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSXML2.XMLHTTP"</span> <span style="color: #000000;">&#41;</span><br />      CATCH oErr<br />         ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en la creación de objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />      END<br />   END<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />   <span style="color: #00C800;">IF</span> hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span> := <span style="color: #00C800;">NIL</span><br />   <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> setURL<span style="color: #000000;">&#40;</span> cMethod, lMedia <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />   <span style="color: #00C800;">LOCAL</span> cUrl := ::<span style="color: #000000;">cApiURL</span> + ::<span style="color: #000000;">cIdInstance</span> + <span style="color: #ff0000;">"/"</span> + cMethod + <span style="color: #ff0000;">"/"</span> + ::<span style="color: #000000;">cIdToken</span><br /><br />   <span style="color: #00C800;">DEFAULT</span> lMedia <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">FALSE</span><br /><br />   <span style="color: #00C800;">IF</span> lMedia<br />      cUrl := ::<span style="color: #000000;">cMediaURL</span> + ::<span style="color: #000000;">cIdInstance</span> + <span style="color: #ff0000;">"/"</span> + cMethod + <span style="color: #ff0000;">"/"</span> + ::<span style="color: #000000;">cIdToken</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />      TraceLog<span style="color: #000000;">&#40;</span> cUrl <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> cUrl<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> sendMessage<span style="color: #000000;">&#40;</span> cPhone, cMessage <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />   <span style="color: #00C800;">LOCAL</span> hInfo<br />   <span style="color: #00C800;">LOCAL</span> lSend := <span style="color: #00C800;">FALSE</span><br />   <span style="color: #00C800;">LOCAL</span> oErr<br /><br />   ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">""</span><br /><br />   <span style="color: #00C800;">IF</span> !hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No se pudo crer objeto HTTP!"</span><br />      <span style="color: #00C800;">RETURN</span> lSend<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> cPhone <span style="color: #000000;">&#41;</span> .or. Empty<span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Datos insuficientes para enviar mensaje por Whatsapp!"</span><br />      <span style="color: #00C800;">RETURN</span> lSend<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   hInfo := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"chatId"</span> => cPhone + <span style="color: #ff0000;">"@c.us"</span>, <span style="color: #ff0000;">"message"</span> => cMessage <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">TRY</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"POST"</span>, ::<span style="color: #000000;">setURL</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"sendMessage"</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"application/json"</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> hb_jsonEncode<span style="color: #000000;">&#40;</span> hInfo <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> == <span style="color: #000000;">200</span><br />         <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />            TraceLog<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">ResponseBody</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDIF</span><br />         lSend := <span style="color: #00C800;">TRUE</span><br />         SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   CATCH oErr<br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en Objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />   END<br /><br /><span style="color: #00C800;">RETURN</span> lSend<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> sendContact<span style="color: #000000;">&#40;</span> cPhone, cPhoneContact, cFirstName, cMiddelName, cLastName, cCompany <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />   <span style="color: #00C800;">LOCAL</span> hInfo, hContact<br />   <span style="color: #00C800;">LOCAL</span> lSend := <span style="color: #00C800;">FALSE</span><br />   <span style="color: #00C800;">LOCAL</span> oErr<br /><br />   <span style="color: #00C800;">DEFAULT</span> cMiddelName <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span><br />   <span style="color: #00C800;">DEFAULT</span> cCompany    <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span><br /><br />   <span style="color: #00C800;">IF</span> !hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No se pudo crer objeto HTTP!"</span><br />      <span style="color: #00C800;">RETURN</span> lSend<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> cPhone <span style="color: #000000;">&#41;</span>        .or. ;<br />      Empty<span style="color: #000000;">&#40;</span> cPhoneContact <span style="color: #000000;">&#41;</span> .or. ;<br />      Empty<span style="color: #000000;">&#40;</span> cFirstName <span style="color: #000000;">&#41;</span>    .or. ;<br />      Empty<span style="color: #000000;">&#40;</span> cLastName <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Datos insuficientes para enviar contacto por Whatsapp!"</span><br />      <span style="color: #00C800;">RETURN</span> lSend<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   hContact := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"phoneContact"</span> => cPhoneContact, ;<br />                 <span style="color: #ff0000;">"firstName"</span>    => cFirstName   , ;<br />                 <span style="color: #ff0000;">"middleName"</span>   => cMiddelName  , ;<br />                 <span style="color: #ff0000;">"lastName"</span>     => cLastName    , ;<br />                 <span style="color: #ff0000;">"company"</span>      => cCompany       <span style="color: #000000;">&#125;</span><br /><br />   hInfo := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"chatId"</span>       => cPhone + <span style="color: #ff0000;">"@c.us"</span>, ;<br />              <span style="color: #ff0000;">"contact"</span>      => hContact          <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">TRY</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"POST"</span>, ::<span style="color: #000000;">setURL</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"sendContact"</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"application/json"</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> hb_jsonEncode<span style="color: #000000;">&#40;</span> hInfo <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> == <span style="color: #000000;">200</span><br />         <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />            TraceLog<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">ResponseBody</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDIF</span><br />         lSend := <span style="color: #00C800;">TRUE</span><br />         SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   CATCH oErr<br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en Objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />   END<br /><br /><span style="color: #00C800;">RETURN</span> lSend<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> sendFileByUpload<span style="color: #000000;">&#40;</span> cPhone, cFileName, cCaption <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />   <span style="color: #00C800;">LOCAL</span> lSend := <span style="color: #00C800;">FALSE</span><br />   <span style="color: #00C800;">LOCAL</span> hInfo, oPost<br />   <span style="color: #00C800;">LOCAL</span> oErr<br /><br />   ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">""</span><br /><br />   <span style="color: #00C800;">IF</span> !hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No se pudo crer objeto HTTP!"</span><br />      <span style="color: #00C800;">RETURN</span> lSend<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> cPhone <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Datos insuficientes para enviar mensaje por Whatsapp!"</span><br />      <span style="color: #00C800;">RETURN</span> lSend<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">IF</span> !File<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No existe el archivo indicado!"</span><br />      <span style="color: #00C800;">RETURN</span> lSend<br />   <span style="color: #00C800;">ENDIF</span><br /><br />   <span style="color: #00C800;">DEFAULT</span> cCaption <span style="color: #0000ff;">TO</span> cFileName<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br /><br />   oPost := TPostHtml<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//"utf-8"</span><br />   oPost:<span style="color: #000000;">AddField</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"chatId"</span>, cPhone + <span style="color: #ff0000;">"@c.us"</span> <span style="color: #000000;">&#41;</span><br />   oPost:<span style="color: #000000;">AddField</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"caption"</span>, cCaption <span style="color: #000000;">&#41;</span><br />   oPost:<span style="color: #000000;">AddFile</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"file"</span>, cCaption, cFileName <span style="color: #000000;">&#41;</span><br /><br />   oPost:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\p</span>rueba.uue"</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">TRY</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">setTimeouts</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">15000</span>, <span style="color: #000000;">15000</span>, <span style="color: #000000;">15000</span>, <span style="color: #000000;">15000</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"POST"</span>, ::<span style="color: #000000;">setURL</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"sendFileByUpload"</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"multipart/form-data; boundary="</span> + oPost:<span style="color: #000000;">cBoundaryBase</span> <span style="color: #000000;">&#41;</span><br />      ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> oPost:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> == <span style="color: #000000;">200</span><br />         <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />            TraceLog<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">ResponseBody</span> <span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">ENDIF</span><br />         lSend := <span style="color: #00C800;">TRUE</span><br />         SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ELSE</span><br />         ::<span style="color: #000000;">cError</span> := cValToChar<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   CATCH oErr<br />     ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en Objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />   END<br /><br />  oPost:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> lSend<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><span style="color: #B900B9;">//EOF</span><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00D7D7;">#define</span> adModeUnknown           <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> adModeRead              <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> adModeWrite             <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> adModeReadWrite         <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> adModeShareDenyRead     <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> adModeShareDenyWrite    <span style="color: #000000;">8</span><br /><span style="color: #00D7D7;">#define</span> adModeShareExclusive   <span style="color: #000000;">12</span><br /><span style="color: #00D7D7;">#define</span> adModeShareDenyNone    <span style="color: #000000;">16</span><br /><span style="color: #00D7D7;">#define</span> adModeRecursive        0x400000<br /><br /><span style="color: #00D7D7;">#define</span> adTypeBinary           <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> adTypeText             <span style="color: #000000;">2</span><br /><br /><span style="color: #00D7D7;">#define</span> adReadAll             <span style="color: #000000;">-1</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">CLASS</span> TPostHTML<br /><br />   <span style="color: #00C800;">DATA</span> oStream<br />   <span style="color: #00C800;">DATA</span> cBoundary, cBoundaryBase<br />   <span style="color: #00C800;">DATA</span> cCharSet <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">"Windows-1252"</span><br />   <span style="color: #00C800;">DATA</span> aExtraRequestHeader <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />   <span style="color: #00C800;">DATA</span> Status<br /><br />   <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cCharSet <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />   <span style="color: #00C800;">METHOD</span> AddField<span style="color: #000000;">&#40;</span> cField, cValue <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> AddExtraRequest<span style="color: #000000;">&#40;</span> cClave,cValor <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> AddFile<span style="color: #000000;">&#40;</span> cFieldName, cFileName, cFilePath <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> Read<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oStream</span> := <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cCharSet <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHTML<br /><br />   <span style="color: #00C800;">DEFAULT</span> cCharSet <span style="color: #0000ff;">TO</span> ::<span style="color: #000000;">cCharSet</span><br /><br />   ::<span style="color: #000000;">cBoundaryBase</span> := <span style="color: #ff0000;">"BorderLine-1234567890"</span><br />   ::<span style="color: #000000;">cBoundary</span>     := <span style="color: #ff0000;">"--"</span> + ::<span style="color: #000000;">cBoundaryBase</span><br /><br />   WITH OBJECT <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oStream</span> := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADODB.Stream"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">Charset</span> := cCharSet<br />      :<span style="color: #000000;">Mode</span>    := adModeReadWrite<br />      :<span style="color: #000000;">Type</span>    := adTypeText<br />      :<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   END<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> AddField<span style="color: #000000;">&#40;</span> cField, cValue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />   ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBoundary</span> + FINL + <span style="color: #ff0000;">'Content-Disposition: form-data; name="'</span> + cField + <span style="color: #ff0000;">'"'</span> + FINL + FINL + cValue + FINL <span style="color: #000000;">&#41;</span><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;">METHOD</span> AddExtraRequest<span style="color: #000000;">&#40;</span> cClave,cValor <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />   AAdd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aExtraRequestHeader</span>, <span style="color: #000000;">&#123;</span> cClave, cValor <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><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;">METHOD</span> AddFile<span style="color: #000000;">&#40;</span> cFieldName, cFileName, cFilePath <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />#ifdef __NOBINARY__<br />   <span style="color: #00C800;">LOCAL</span> cFileStr, nFileLen<br /><br />   cFileStr := hb_StrToUTF8<span style="color: #000000;">&#40;</span> hb_Base64Encode<span style="color: #000000;">&#40;</span> FileStr<span style="color: #000000;">&#40;</span> cFilePath <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #B900B9;">//cFileStr := CharRem( CRLF, cFileStr )</span><br /><br />   <span style="color: #B900B9;">//hb_StrToUTF8(</span><br />   <span style="color: #B900B9;">//cFileStr := FileStr( cFilePath )</span><br />   <span style="color: #B900B9;">//nFileLen := Len( cFilePath )</span><br />   <span style="color: #B900B9;">//cFileStr := hb_base64Encode( cFileStr, nFileLen )</span><br /><br />   WITH OBJECT ::<span style="color: #000000;">oStream</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBoundary</span> + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Content-Disposition: form-data; name="'</span>+ cFieldName + <span style="color: #ff0000;">'"; filename="'</span> + cFileName + <span style="color: #ff0000;">'"'</span> + FINL <span style="color: #000000;">&#41;</span>    <span style="color: #B900B9;">// + FINL</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Content-Type: '</span> + GetContentType<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span> + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Content-Transfer-Encoding: base64'</span> +  FINL + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> cFileStr + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBoundary</span> + <span style="color: #ff0000;">"--"</span> <span style="color: #000000;">&#41;</span><br />   END<br /><br />   cFileStr := <span style="color: #00C800;">NIL</span><br />   nFileLen := <span style="color: #000000;">0</span><br /><br />#else<br />   <span style="color: #00C800;">LOCAL</span> oStream<br /><br />   WITH OBJECT <span style="color: #000000;">&#40;</span> oStream := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADODB.Stream"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">Charset</span> := ::<span style="color: #000000;">cCharSet</span><br />      :<span style="color: #000000;">Type</span> := adTypeBinary<br />      :<span style="color: #000000;">Mode</span> := adModeReadWrite<br />      :<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">LoadFromFile</span><span style="color: #000000;">&#40;</span> cFilePath <span style="color: #000000;">&#41;</span><br />   END<br /><br />   WITH OBJECT ::<span style="color: #000000;">oStream</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBoundary</span> + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Content-Disposition: form-data; name="'</span>+ cFieldName + <span style="color: #ff0000;">'"; filename="'</span> + cFileName + <span style="color: #ff0000;">'"'</span> + FINL + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Content-Type: '</span> + GetContentType<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span> + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">'Content-Transfer-Encoding: binary'</span> +  FINL + FINL <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />      :<span style="color: #000000;">Type</span>     := adTypeBinary<br />      :<span style="color: #000000;">Position</span> := :<span style="color: #0000ff;">Size</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      oStream:<span style="color: #000000;">CopyTo</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oStream</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />      :<span style="color: #000000;">Type</span>     := adTypeText<br />      :<span style="color: #000000;">Position</span> := :<span style="color: #0000ff;">Size</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> FINL + ::<span style="color: #000000;">cBoundary</span> + <span style="color: #ff0000;">"--"</span> <span style="color: #000000;">&#41;</span><br />      :<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />      :<span style="color: #000000;">Type</span>     := adTypeBinary<br />   END<br /><br />   oStream:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />#endif<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;">METHOD</span> Read<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />   ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />#ifdef __NOBINARY__<br /><span style="color: #00C800;">RETURN</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">ReadText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />#else<br />   ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Type</span>     := adTypeBinary<br /><span style="color: #00C800;">RETURN</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />#endif<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />   ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />#ifdef __NOBINARY__<br /><span style="color: #00C800;">RETURN</span> StrFile<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">ReadText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cFileName<span style="color: #000000;">&#41;</span><br />#else<br />   ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />   ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Type</span>     := adTypeBinary<br /><span style="color: #00C800;">RETURN</span> StrFile<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span> adReadAll <span style="color: #000000;">&#41;</span>, cFileName <span style="color: #000000;">&#41;</span><br />#endif<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> FixFileName<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">RETURN</span> CharRem<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"[<(-)>]*&@:"</span>, cFileName <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GetContentType<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> cExt := cFileExt<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">LOCAL</span> aItem, cTipo :=  <span style="color: #ff0000;">"text/plain"</span><br />   <span style="color: #00C800;">LOCAL</span> aTipeFile<br /><br />   aTipeFile := <span style="color: #000000;">&#123;</span> ;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"php"</span>  , <span style="color: #ff0000;">"application/x-php"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"vbs"</span>  , <span style="color: #ff0000;">"application/x-vbs"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"jpe"</span>  , <span style="color: #ff0000;">"image/jpeg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"jpg"</span>  , <span style="color: #ff0000;">"image/jpeg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"jpeg"</span> , <span style="color: #ff0000;">"image/jpeg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"gif"</span>  , <span style="color: #ff0000;">"image/gif"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"png"</span>  , <span style="color: #ff0000;">"image/png"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bmp"</span>  , <span style="color: #ff0000;">"image/bmp"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ico"</span>  , <span style="color: #ff0000;">"image/x-icon"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"svg"</span>  , <span style="color: #ff0000;">"image/svg+xml"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"svgz"</span> , <span style="color: #ff0000;">"image/svg+xml"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"tif"</span>  , <span style="color: #ff0000;">"image/tiff"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"tiff"</span> , <span style="color: #ff0000;">"image/tiff"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pct"</span>  , <span style="color: #ff0000;">"image/x-pict"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"psd"</span>  , <span style="color: #ff0000;">"image/vnd.adobe.photoshop"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"aac"</span>  , <span style="color: #ff0000;">"audio/x-aac"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"aif"</span>  , <span style="color: #ff0000;">"audio/x-aiff"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"flac"</span> , <span style="color: #ff0000;">"audio/x-flac"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"m4a"</span>  , <span style="color: #ff0000;">"audio/x-m4a"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"m4b"</span>  , <span style="color: #ff0000;">"audio/x-m4b"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mid"</span>  , <span style="color: #ff0000;">"audio/midi"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"midi"</span> , <span style="color: #ff0000;">"audio/midi"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mp3"</span>  , <span style="color: #ff0000;">"audio/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpa"</span>  , <span style="color: #ff0000;">"audio/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpc"</span>  , <span style="color: #ff0000;">"audio/x-musepack"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"oga"</span>  , <span style="color: #ff0000;">"audio/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ogg"</span>  , <span style="color: #ff0000;">"audio/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ra"</span>   , <span style="color: #ff0000;">"audio/vnd.rn-realaudio"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ram"</span>  , <span style="color: #ff0000;">"audio/vnd.rn-realaudio"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"snd"</span>  , <span style="color: #ff0000;">"audio/x-snd"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"wav"</span>  , <span style="color: #ff0000;">"audio/x-wav"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"wma"</span>  , <span style="color: #ff0000;">"audio/x-ms-wma"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"avi"</span>  , <span style="color: #ff0000;">"video/x-msvideo"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"divx"</span> , <span style="color: #ff0000;">"video/divx"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"flv"</span>  , <span style="color: #ff0000;">"video/x-flv"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"m4v"</span>  , <span style="color: #ff0000;">"video/mp4"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mkv"</span>  , <span style="color: #ff0000;">"video/x-matroska"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mov"</span>  , <span style="color: #ff0000;">"video/quicktime"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mp4"</span>  , <span style="color: #ff0000;">"video/mp4"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpeg"</span> , <span style="color: #ff0000;">"video/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpg"</span>  , <span style="color: #ff0000;">"video/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ogm"</span>  , <span style="color: #ff0000;">"application/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ogv"</span>  , <span style="color: #ff0000;">"video/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"rm"</span>   , <span style="color: #ff0000;">"application/vnd.rn-realmedia"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"rmvb"</span> , <span style="color: #ff0000;">"application/vnd.rn-realmedia-vbr"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"smil"</span> , <span style="color: #ff0000;">"application/x-smil"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"webm"</span> , <span style="color: #ff0000;">"video/webm"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"wmv"</span>  , <span style="color: #ff0000;">"video/x-ms-wmv"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xvid"</span> , <span style="color: #ff0000;">"video/x-msvideo"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"js"</span>   , <span style="color: #ff0000;">"application/javascript"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xml"</span>  , <span style="color: #ff0000;">"text/xml"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"html"</span> , <span style="color: #ff0000;">"text/html"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"css"</span>  , <span style="color: #ff0000;">"text/css"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"txt"</span>  , <span style="color: #ff0000;">"text/plain"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"py"</span>   , <span style="color: #ff0000;">"text/x-python"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pdf"</span>  , <span style="color: #ff0000;">"application/pdf"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xhtml"</span>, <span style="color: #ff0000;">"application/xhtml+xml"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"zip"</span>  , <span style="color: #ff0000;">"application/x-zip-compressed, application/zip"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"rar"</span>  , <span style="color: #ff0000;">"application/x-rar-compressed"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"cmd"</span>  , <span style="color: #ff0000;">"application/cmd"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bat"</span>  , <span style="color: #ff0000;">"application/x-bat, application/x-msdos-program"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"exe"</span>  , <span style="color: #ff0000;">"application/exe, application/x-ms-dos-executable"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"msi"</span>  , <span style="color: #ff0000;">"application/x-msi"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bin"</span>  , <span style="color: #ff0000;">"application/x-binary"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"crt"</span>  , <span style="color: #ff0000;">"application/x-x509-ca-cert"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"crl"</span>  , <span style="color: #ff0000;">"application/x-pkcs7-crl"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pfx"</span>  , <span style="color: #ff0000;">"application/x-pkcs12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"p12"</span>  , <span style="color: #ff0000;">"application/x-pkcs12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odc"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.chart"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odf"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.formula"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odb"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.database"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odg"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.graphics"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odi"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.image"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odp"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.presentation"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ods"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.spreadsheet"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odt"</span>  , <span style="color: #ff0000;">"application/vnd.oasis.opendocument.tex"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"docx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.wordprocessingml.document"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"dotx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.wordprocessingml.template"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"potx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.presentationml.template"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppsx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.presentationml.slideshow"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pptx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.presentationml.presentation"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xlsx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xltx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.spreadsheetml.template"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppam"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.addin.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppa"</span>  , <span style="color: #ff0000;">"application/vnd.ms-powerpoint"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"potm"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.template.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppsm"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.slideshow.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xlsm"</span> , <span style="color: #ff0000;">"application/vnd.ms-excel.sheet.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pptm"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.presentation.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"dotm"</span> , <span style="color: #ff0000;">"application/vnd.ms-word.template.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"docm"</span> , <span style="color: #ff0000;">"application/vnd.ms-word.document.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"doc"</span>  , <span style="color: #ff0000;">"application/msword"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"dot"</span>  , <span style="color: #ff0000;">"application/msword"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pps"</span>  , <span style="color: #ff0000;">"application/mspowerpoint"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppt"</span>  , <span style="color: #ff0000;">"application/mspowerpoint,application/powerpoint,application/vnd.ms-powerpoint,application/x-mspowerpoint"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xls"</span>  , <span style="color: #ff0000;">"application/vnd.ms-excel"</span><span style="color: #000000;">&#125;</span>,;<br />             <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xlt"</span> , <span style="color: #ff0000;">"application/vnd.ms-excel"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #00C800;">FOR</span> EACH aItem IN aTipeFile<br />      <span style="color: #00C800;">IF</span> aItem<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == cExt<br />         cTipo := aItem<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />      <span style="color: #00C800;">ENDIF</span><br />   <span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #00C800;">RETURN</span> cTipo<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><span style="color: #B900B9;">//EOF</span><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /> </div>[/code:ud5l41oo]
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
El archivo llega, si es texto bien, si no, parece corrupto. [code=fw:3req84bv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">CLASS</span> GreenApi<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> cApiURL, cMediaURL<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> cIdInstance, cIdToken<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> oHttp<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> lLog, cError<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cIdInstance, cIdToken <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetLog<span style="color: #000000;">&#40;</span> lLog <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">lLog</span> := lLog<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetIdInstance<span style="color: #000000;">&#40;</span> cIdInstance <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">cIdInstance</span> := cIdInstance<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetIdToken<span style="color: #000000;">&#40;</span> cIdToken <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">cIdToken</span> := cIdToken<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetURL<span style="color: #000000;">&#40;</span> cMethod, lMedia <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> sendMessage<span style="color: #000000;">&#40;</span> cPhone, cMessage <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> sendContact<span style="color: #000000;">&#40;</span> cPhone, hContact <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> sendFileByUpload<span style="color: #000000;">&#40;</span> cPhone, cFile, cCaption <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> getLastErro<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">cError</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cIdInstance, cIdToken <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oErr<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Default</span> cIdInstance <span style="color: #0000ff;">TO</span> GREENAPI_IDINSTANCE<br />&nbsp; &nbsp;<span style="color: #00C800;">Default</span> cIdToken <span style="color: #0000ff;">TO</span> GREENAPI_TOKEN<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">lLog</span> &nbsp; := <span style="color: #00C800;">FALSE</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">SetIdInstance</span><span style="color: #000000;">&#40;</span> cIdInstance <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">SetIdToken</span><span style="color: #000000;">&#40;</span> cIdToken <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">cApiURL</span> &nbsp; := <span style="color: #ff0000;">"https://api.green-api.com/waInstance"</span><br />&nbsp; &nbsp;::<span style="color: #000000;">cMediaURL</span> := <span style="color: #ff0000;">"https://media.greenapi.com/waInstance"</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span> := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSXML2.ServerXMLHTTP.6.0"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;CATCH<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oHttp</span> := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"MSXML2.XMLHTTP"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; CATCH oErr<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en la creación de objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />&nbsp; &nbsp; &nbsp; END<br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span> := <span style="color: #00C800;">NIL</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> setURL<span style="color: #000000;">&#40;</span> cMethod, lMedia <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cUrl := ::<span style="color: #000000;">cApiURL</span> + ::<span style="color: #000000;">cIdInstance</span> + <span style="color: #ff0000;">"/"</span> + cMethod + <span style="color: #ff0000;">"/"</span> + ::<span style="color: #000000;">cIdToken</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> lMedia <span style="color: #0000ff;">TO</span> <span style="color: #00C800;">FALSE</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> lMedia<br />&nbsp; &nbsp; &nbsp; cUrl := ::<span style="color: #000000;">cMediaURL</span> + ::<span style="color: #000000;">cIdInstance</span> + <span style="color: #ff0000;">"/"</span> + cMethod + <span style="color: #ff0000;">"/"</span> + ::<span style="color: #000000;">cIdToken</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />&nbsp; &nbsp; &nbsp; TraceLog<span style="color: #000000;">&#40;</span> cUrl <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> cUrl<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> sendMessage<span style="color: #000000;">&#40;</span> cPhone, cMessage <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> hInfo<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lSend := <span style="color: #00C800;">FALSE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oErr<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No se pudo crer objeto HTTP!"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> lSend<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> cPhone <span style="color: #000000;">&#41;</span> .or. Empty<span style="color: #000000;">&#40;</span> cMessage <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Datos insuficientes para enviar mensaje por Whatsapp!"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> lSend<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;hInfo := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"chatId"</span> => cPhone + <span style="color: #ff0000;">"@c.us"</span>, <span style="color: #ff0000;">"message"</span> => cMessage <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"POST"</span>, ::<span style="color: #000000;">setURL</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"sendMessage"</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"application/json"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> hb_jsonEncode<span style="color: #000000;">&#40;</span> hInfo <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> == <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TraceLog<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">ResponseBody</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lSend := <span style="color: #00C800;">TRUE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;CATCH oErr<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en Objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">RETURN</span> lSend<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> sendContact<span style="color: #000000;">&#40;</span> cPhone, cPhoneContact, cFirstName, cMiddelName, cLastName, cCompany <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> hInfo, hContact<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lSend := <span style="color: #00C800;">FALSE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oErr<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> cMiddelName <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> cCompany &nbsp; &nbsp;<span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No se pudo crer objeto HTTP!"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> lSend<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> cPhone <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp;.or. ;<br />&nbsp; &nbsp; &nbsp; Empty<span style="color: #000000;">&#40;</span> cPhoneContact <span style="color: #000000;">&#41;</span> .or. ;<br />&nbsp; &nbsp; &nbsp; Empty<span style="color: #000000;">&#40;</span> cFirstName <span style="color: #000000;">&#41;</span> &nbsp; &nbsp;.or. ;<br />&nbsp; &nbsp; &nbsp; Empty<span style="color: #000000;">&#40;</span> cLastName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Datos insuficientes para enviar contacto por Whatsapp!"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> lSend<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;hContact := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"phoneContact"</span> => cPhoneContact, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"firstName"</span> &nbsp; &nbsp;=> cFirstName &nbsp; , ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"middleName"</span> &nbsp; => cMiddelName &nbsp;, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"lastName"</span> &nbsp; &nbsp; => cLastName &nbsp; &nbsp;, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">"company"</span> &nbsp; &nbsp; &nbsp;=> cCompany &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;hInfo := <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"chatId"</span> &nbsp; &nbsp; &nbsp; => cPhone + <span style="color: #ff0000;">"@c.us"</span>, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff0000;">"contact"</span> &nbsp; &nbsp; &nbsp;=> hContact &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"POST"</span>, ::<span style="color: #000000;">setURL</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"sendContact"</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"application/json"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> hb_jsonEncode<span style="color: #000000;">&#40;</span> hInfo <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> == <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TraceLog<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">ResponseBody</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lSend := <span style="color: #00C800;">TRUE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;CATCH oErr<br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en Objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">RETURN</span> lSend<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> sendFileByUpload<span style="color: #000000;">&#40;</span> cPhone, cFileName, cCaption <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> GreenApi<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> lSend := <span style="color: #00C800;">FALSE</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> hInfo, oPost<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oErr<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">""</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !hb_isObject<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No se pudo crer objeto HTTP!"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> lSend<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> Empty<span style="color: #000000;">&#40;</span> cPhone <span style="color: #000000;">&#41;</span> .or. Empty<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Datos insuficientes para enviar mensaje por Whatsapp!"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> lSend<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> !File<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"No existe el archivo indicado a enviar!"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">RETURN</span> lSend<br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> cCaption <span style="color: #0000ff;">TO</span> cFileName<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oPost := TPostHtml<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">//"utf-8"</span><br />&nbsp; &nbsp;oPost:<span style="color: #000000;">AddField</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"chatId"</span>, cPhone + <span style="color: #ff0000;">"@c.us"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPost:<span style="color: #000000;">AddField</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"caption"</span>, cCaption <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;oPost:<span style="color: #000000;">AddFile</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"file"</span>, cCaption, cFileName <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oPost:<span style="color: #000000;">Save</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">".<span style="color: #000000;">\p</span>rueba.uue"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">TRY</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">setTimeouts</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">15000</span>, <span style="color: #000000;">15000</span>, <span style="color: #000000;">15000</span>, <span style="color: #000000;">15000</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"POST"</span>, ::<span style="color: #000000;">setURL</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"sendFileByUpload"</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span>, <span style="color: #00C800;">FALSE</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"multipart/form-data; boundary="</span> + oPost:<span style="color: #000000;">cBoundaryBase</span> + FINL <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Send</span><span style="color: #000000;">&#40;</span> oPost:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> == <span style="color: #000000;">200</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lLog</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TraceLog<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">ResponseBody</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lSend := <span style="color: #00C800;">TRUE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SysRefresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">">"</span>+cValToChar<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oHttp</span>:<span style="color: #000000;">Status</span> <span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"<"</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;CATCH oErr<br />&nbsp; &nbsp; &nbsp;::<span style="color: #000000;">cError</span> := <span style="color: #ff0000;">"Error en Objeto HTTP: "</span> + oErr:<span style="color: #000000;">Description</span><br />&nbsp; &nbsp;END<br /><br />&nbsp; oPost:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> lSend<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><span style="color: #B900B9;">//EOF</span><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00D7D7;">#define</span> adModeUnknown &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">0</span><br /><span style="color: #00D7D7;">#define</span> adModeRead &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> adModeWrite &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">2</span><br /><span style="color: #00D7D7;">#define</span> adModeReadWrite &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">3</span><br /><span style="color: #00D7D7;">#define</span> adModeShareDenyRead &nbsp; &nbsp; <span style="color: #000000;">4</span><br /><span style="color: #00D7D7;">#define</span> adModeShareDenyWrite &nbsp; &nbsp;<span style="color: #000000;">8</span><br /><span style="color: #00D7D7;">#define</span> adModeShareExclusive &nbsp; <span style="color: #000000;">12</span><br /><span style="color: #00D7D7;">#define</span> adModeShareDenyNone &nbsp; &nbsp;<span style="color: #000000;">16</span><br /><span style="color: #00D7D7;">#define</span> adModeRecursive &nbsp; &nbsp; &nbsp; &nbsp;0x400000<br /><br /><span style="color: #00D7D7;">#define</span> adTypeBinary &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> adTypeText &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">2</span><br /><br /><span style="color: #00D7D7;">#define</span> adReadAll &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">-1</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">CLASS</span> TPostHTML<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> oStream<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> cBoundary, cBoundaryBase<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> cCharSet <span style="color: #0000ff;">INIT</span> <span style="color: #ff0000;">"Windows-1252"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> aExtraRequestHeader <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> Status<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cCharSet <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddField<span style="color: #000000;">&#40;</span> cField, cValue <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddExtraRequest<span style="color: #000000;">&#40;</span> cClave,cValor <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddFile<span style="color: #000000;">&#40;</span> cFieldName, cFileName, cFilePath <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Read<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> ReadText<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> End<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">oStream</span> := <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> cCharSet <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHTML<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> cCharSet <span style="color: #0000ff;">TO</span> ::<span style="color: #000000;">cCharSet</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">cBoundaryBase</span> := <span style="color: #ff0000;">"MY_BorderLine"</span><br />&nbsp; &nbsp;::<span style="color: #000000;">cBoundary</span> &nbsp; &nbsp; := <span style="color: #ff0000;">"--"</span> + ::<span style="color: #000000;">cBoundaryBase</span><br /><br />&nbsp; &nbsp;WITH OBJECT <span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oStream</span> := CreateObject<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"ADODB.Stream"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Charset</span> := cCharSet<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Mode</span> &nbsp; &nbsp;:= adModeReadWrite<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Type</span> &nbsp; &nbsp;:= adTypeText<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Open</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> AddField<span style="color: #000000;">&#40;</span> cField, cValue <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />&nbsp; &nbsp;::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">cBoundary</span> + FINL + <span style="color: #ff0000;">'Content-Disposition: form-data; name="'</span> + cField + <span style="color: #ff0000;">'"'</span> + FINL + FINL + cValue + FINL <span style="color: #000000;">&#41;</span><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;">METHOD</span> AddExtraRequest<span style="color: #000000;">&#40;</span> cClave,cValor <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />&nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aExtraRequestHeader</span>, <span style="color: #000000;">&#123;</span> cClave, cValor <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><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;">METHOD</span> AddFile<span style="color: #000000;">&#40;</span> cFieldName, cFileName, cFilePath <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oStream<br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cInfo<br /><br />&nbsp; &nbsp;cInfo := ::<span style="color: #000000;">cBoundary</span> + FINL<br />&nbsp; &nbsp;cInfo += <span style="color: #ff0000;">'Content-Disposition: form-data; name="'</span>+ cFieldName + <span style="color: #ff0000;">'"; filename="'</span> + cFileName + <span style="color: #ff0000;">'"'</span> + FINL<br />&nbsp; &nbsp;cInfo += <span style="color: #ff0000;">'Content-Type: '</span> + GetContentType<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span> + FINL<br />&nbsp; &nbsp;cInfo += <span style="color: #ff0000;">'Content-Transfer-Encoding: binary'</span> + FINL + FINL<br />&nbsp; &nbsp;cInfo += FileStr<span style="color: #000000;">&#40;</span> cFilePath <span style="color: #000000;">&#41;</span> + FINL<br />&nbsp; &nbsp;cInfo += FINL + ::<span style="color: #000000;">cBoundary</span> + <span style="color: #ff0000;">"--"</span><br /><br />&nbsp; &nbsp;WITH OBJECT ::<span style="color: #000000;">oStream</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Type</span> := adTypeText<br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Position</span> := :<span style="color: #0000ff;">Size</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">WriteText</span><span style="color: #000000;">&#40;</span> cInfo <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;END<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;">METHOD</span> Read<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />&nbsp; &nbsp;WITH OBJECT ::<span style="color: #000000;">oStream</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Type</span> &nbsp; &nbsp; := adTypeBinary<br />&nbsp; &nbsp;END<br /><span style="color: #00C800;">RETURN</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> ReadText<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br />&nbsp; &nbsp;WITH OBJECT ::<span style="color: #000000;">oStream</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Position</span> := <span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; :<span style="color: #000000;">Type</span> &nbsp; &nbsp; := adTypeText<br />&nbsp; &nbsp;END<br /><span style="color: #00C800;">RETURN</span> ::<span style="color: #000000;">oStream</span>:<span style="color: #000000;">ReadText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">METHOD</span> Save<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TPostHtml<br /><span style="color: #00C800;">RETURN</span> StrFile<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">ReadText</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, cFileName <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GetContentType<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> cExt := cFileExt<span style="color: #000000;">&#40;</span> cFileName <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aItem, cTipo := &nbsp;<span style="color: #ff0000;">"text/plain"</span><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> aTipeFile<br /><br />&nbsp; &nbsp;aTipeFile := <span style="color: #000000;">&#123;</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"php"</span> &nbsp;, <span style="color: #ff0000;">"application/x-php"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"vbs"</span> &nbsp;, <span style="color: #ff0000;">"application/x-vbs"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"jpe"</span> &nbsp;, <span style="color: #ff0000;">"image/jpeg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"jpg"</span> &nbsp;, <span style="color: #ff0000;">"image/jpeg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"jpeg"</span> , <span style="color: #ff0000;">"image/jpeg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"gif"</span> &nbsp;, <span style="color: #ff0000;">"image/gif"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"png"</span> &nbsp;, <span style="color: #ff0000;">"image/png"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bmp"</span> &nbsp;, <span style="color: #ff0000;">"image/bmp"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ico"</span> &nbsp;, <span style="color: #ff0000;">"image/x-icon"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"svg"</span> &nbsp;, <span style="color: #ff0000;">"image/svg+xml"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"svgz"</span> , <span style="color: #ff0000;">"image/svg+xml"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"tif"</span> &nbsp;, <span style="color: #ff0000;">"image/tiff"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"tiff"</span> , <span style="color: #ff0000;">"image/tiff"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pct"</span> &nbsp;, <span style="color: #ff0000;">"image/x-pict"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"psd"</span> &nbsp;, <span style="color: #ff0000;">"image/vnd.adobe.photoshop"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"aac"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-aac"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"aif"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-aiff"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"flac"</span> , <span style="color: #ff0000;">"audio/x-flac"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"m4a"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-m4a"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"m4b"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-m4b"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mid"</span> &nbsp;, <span style="color: #ff0000;">"audio/midi"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"midi"</span> , <span style="color: #ff0000;">"audio/midi"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mp3"</span> &nbsp;, <span style="color: #ff0000;">"audio/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpa"</span> &nbsp;, <span style="color: #ff0000;">"audio/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpc"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-musepack"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"oga"</span> &nbsp;, <span style="color: #ff0000;">"audio/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ogg"</span> &nbsp;, <span style="color: #ff0000;">"audio/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ra"</span> &nbsp; , <span style="color: #ff0000;">"audio/vnd.rn-realaudio"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ram"</span> &nbsp;, <span style="color: #ff0000;">"audio/vnd.rn-realaudio"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"snd"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-snd"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"wav"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-wav"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"wma"</span> &nbsp;, <span style="color: #ff0000;">"audio/x-ms-wma"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"avi"</span> &nbsp;, <span style="color: #ff0000;">"video/x-msvideo"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"divx"</span> , <span style="color: #ff0000;">"video/divx"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"flv"</span> &nbsp;, <span style="color: #ff0000;">"video/x-flv"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"m4v"</span> &nbsp;, <span style="color: #ff0000;">"video/mp4"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mkv"</span> &nbsp;, <span style="color: #ff0000;">"video/x-matroska"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mov"</span> &nbsp;, <span style="color: #ff0000;">"video/quicktime"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mp4"</span> &nbsp;, <span style="color: #ff0000;">"video/mp4"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpeg"</span> , <span style="color: #ff0000;">"video/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"mpg"</span> &nbsp;, <span style="color: #ff0000;">"video/mpeg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ogm"</span> &nbsp;, <span style="color: #ff0000;">"application/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ogv"</span> &nbsp;, <span style="color: #ff0000;">"video/ogg"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"rm"</span> &nbsp; , <span style="color: #ff0000;">"application/vnd.rn-realmedia"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"rmvb"</span> , <span style="color: #ff0000;">"application/vnd.rn-realmedia-vbr"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"smil"</span> , <span style="color: #ff0000;">"application/x-smil"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"webm"</span> , <span style="color: #ff0000;">"video/webm"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"wmv"</span> &nbsp;, <span style="color: #ff0000;">"video/x-ms-wmv"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xvid"</span> , <span style="color: #ff0000;">"video/x-msvideo"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"js"</span> &nbsp; , <span style="color: #ff0000;">"application/javascript"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xml"</span> &nbsp;, <span style="color: #ff0000;">"text/xml"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"html"</span> , <span style="color: #ff0000;">"text/html"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"css"</span> &nbsp;, <span style="color: #ff0000;">"text/css"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"txt"</span> &nbsp;, <span style="color: #ff0000;">"text/plain"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"py"</span> &nbsp; , <span style="color: #ff0000;">"text/x-python"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pdf"</span> &nbsp;, <span style="color: #ff0000;">"application/pdf"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xhtml"</span>, <span style="color: #ff0000;">"application/xhtml+xml"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"zip"</span> &nbsp;, <span style="color: #ff0000;">"application/x-zip-compressed, application/zip"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"rar"</span> &nbsp;, <span style="color: #ff0000;">"application/x-rar-compressed"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"cmd"</span> &nbsp;, <span style="color: #ff0000;">"application/cmd"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bat"</span> &nbsp;, <span style="color: #ff0000;">"application/x-bat, application/x-msdos-program"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"exe"</span> &nbsp;, <span style="color: #ff0000;">"application/exe, application/x-ms-dos-executable"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"msi"</span> &nbsp;, <span style="color: #ff0000;">"application/x-msi"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"bin"</span> &nbsp;, <span style="color: #ff0000;">"application/x-binary"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"crt"</span> &nbsp;, <span style="color: #ff0000;">"application/x-x509-ca-cert"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"crl"</span> &nbsp;, <span style="color: #ff0000;">"application/x-pkcs7-crl"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pfx"</span> &nbsp;, <span style="color: #ff0000;">"application/x-pkcs12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"p12"</span> &nbsp;, <span style="color: #ff0000;">"application/x-pkcs12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odc"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.chart"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odf"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.formula"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odb"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.database"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odg"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.graphics"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odi"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.image"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odp"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.presentation"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ods"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.spreadsheet"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"odt"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.oasis.opendocument.tex"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"docx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.wordprocessingml.document"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"dotx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.wordprocessingml.template"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"potx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.presentationml.template"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppsx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.presentationml.slideshow"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pptx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.presentationml.presentation"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xlsx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xltx"</span> , <span style="color: #ff0000;">"application/vnd.openxmlformats-officedocument.spreadsheetml.template"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppam"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.addin.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppa"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.ms-powerpoint"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"potm"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.template.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppsm"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.slideshow.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xlsm"</span> , <span style="color: #ff0000;">"application/vnd.ms-excel.sheet.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pptm"</span> , <span style="color: #ff0000;">"application/vnd.ms-powerpoint.presentation.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"dotm"</span> , <span style="color: #ff0000;">"application/vnd.ms-word.template.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"docm"</span> , <span style="color: #ff0000;">"application/vnd.ms-word.document.macroEnabled.12"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"doc"</span> &nbsp;, <span style="color: #ff0000;">"application/msword"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"dot"</span> &nbsp;, <span style="color: #ff0000;">"application/msword"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"pps"</span> &nbsp;, <span style="color: #ff0000;">"application/mspowerpoint"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ppt"</span> &nbsp;, <span style="color: #ff0000;">"application/mspowerpoint,application/powerpoint,application/vnd.ms-powerpoint,application/x-mspowerpoint"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xls"</span> &nbsp;, <span style="color: #ff0000;">"application/vnd.ms-excel"</span><span style="color: #000000;">&#125;</span>,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"xlt"</span> , <span style="color: #ff0000;">"application/vnd.ms-excel"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">FOR</span> EACH aItem IN aTipeFile<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> aItem<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> == cExt<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cTipo := aItem<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #00C800;">RETURN</span> cTipo<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br /><span style="color: #B900B9;">//EOF</span><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------*/</span><br />&nbsp;</div>[/code:3req84bv]
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
<!-- l --><a class="postlink-local" href="https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43841&p=264851&sid=e24041a61111c5a2cb7ce52e4e99150c#p264851">viewtopic.php?f=3&t=43841&p=264851&sid=e24041a61111c5a2cb7ce52e4e99150c#p264851</a><!-- l --> I tested sending Exe files as attachments This is working perfectly. The receiver is able to execute the exe correctly.
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
Yes rao, others using whastapp app, i try using api Green, other option. <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
Buena noche Carlos Me parece que si usas el metodo SendFilebyUrl. Primero debes subir a tu servidor luego desde alli lo envias. La otra forma es por carga Saludos Erick Almanza
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
Esa es la que deseo usar..
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
Buen dia Carlos Consideraste usar el hb_memoread() para que el archivo no llegue corrupto. manda['body']:= "data:application/pdf;base64,"+ hb_base64encode( hb_memoread(formato)) Saludos Erick Almanza Panama
Ayuda - Clase p/envio de msgfile por whatsapp - GREENAPI
Si, usar hb_momoread o Filestr es similar, he probado en base 64 y si bien llega completo no se e regresa a su condición anterior.
Ayuda -imprimir factura con columna texto tipo memo
Asi estimados, me urge su asistencia en esto, el tipico caso de imprimir una factura, con encabezado y detalle. pero aca la particularidad es que una de las columnas es un campo texto con tamaño variable. y es muy importante. [code=fw:22ms16ar]<div class="fw" id="{CB}" style="font-family: monospace;"><br />Cantidad   Descripcion                                                               Precio Unit.    Precio Total.<br />=======   ============================================   ===========   ===========<br />     <span style="color: #000000;">1</span>         Este campo es una descripcion con un tamaño vari-        <span style="color: #000000;">1</span>,<span style="color: #000000;">200.00</span>          <span style="color: #000000;">1</span>,<span style="color: #000000;">200.00</span><br />               able, a como puede tener una fila de alto, puede te-<br />                ner cuatro, cinco, seis. :-<span style="color: #000000;">&#40;</span> <br />     <span style="color: #000000;">1</span>         Este es otro campo es un tamaño variable                         <span style="color: #000000;">200.00</span>            <span style="color: #000000;">200.00</span><br /> </div>[/code:22ms16ar] he aquí mi dilema, como hacer esto?, lo he intentado de varias formas, campos cortados en piezas. etc. tomando en cuenta que la fuentes es ancho variable, he usado para mis prueba la clase tprinter ya que es la que me permite ubicar los campos en posiciones en cm especificas. creo que a tprinter le falta un metodo para imprimir en un area definida y haga un corte automático de palabra. salu2
Ayuda -imprimir factura con columna texto tipo memo
Que tal, ojala te sirva, yo lo uso para imprimir textos justificados, tipo DOS. cDesc:='***('+upper(DescNum(abs(tot_car)))+')***, CANTIDAD ABONADA A NUESTRA'+; ' CUENTA NO. '+alltrim(ban->num_cta)+' DE '+alltrim(ban->nom_ban)+; ' SEGUN COPIA DE FICHA DE DEPOSITO DEL DIA '+ceros(day(dFecPag),2)+' DE '+MesLetra(dFecPag)+' DEL '+str(year(dFecPag),4)+; ' Y QUE APLICAMOS A LO SIGUIENTE:' inicia impresion con fuente tipo texto aTexto:=ParteMemo(cDesc,55) // ABAJO LA FUNCION for i:=1 to len(aTexto) if substr(aTexto[i],len(aTexto[i]),1)==chr(20) @ nSup+i,nIzq+05 dato substr(aTexto[i],1,len(aTexto[i])-1) en oReci else @ nSup+i,nIzq+05 dato Justifica(aTexto[i],55,i%3) en oReci // ABAJO LA FUNCION endif next termina pagina termina impresion // --- Parte memo function ParteMemo(mTex,nLong) local aTex:={},cTex,i,nPrinc,nUltEsp cTex:=memotran(mTex,chr(20),chr(29)) nPrinc:=nUltEsp:=1 for i:=1 to len(cTex) while substr(cTex,i,1)==chr(29) cTex:=stuff(cTex,i,1,'') if i>len(cTex) exit endif end if i>len(cTex) exit endif if substr(cTex,i,1)==chr(20) aadd(aTex,substr(cTex,nPrinc,i-nPrinc+1)) nPrinc:=nUltEsp:=i+1 loop endif if substr(cTex,i,1)==' ' nUltEsp:=i endif if i-nPrinc+1>nLong do case case nUltEsp==nPrinc aadd(aTex,substr(cTex,nPrinc,nLong)) nPrinc:=nUltEsp:=i case nUltEsp==i aadd(aTex,substr(cTex,nPrinc,nLong)) nPrinc:=nUltEsp:=i+1 otherwise aadd(aTex,substr(cTex,nPrinc,nUltEsp-nPrinc)) nPrinc:=nUltEsp:=nUltEsp+1 endcase endif next if len(trim(substr(cTex,nPrinc)))<>0 aadd(aTex,substr(cTex,nPrinc)) endif if substr(aTex[len(aTex)],len(aTex[len(aTex)]),1)<>chr(20) aTex[len(aTex)]+=chr(20) endif return aTex // --- Justifica un texto function Justifica(cTex,nLong,nDonde) local aEspacio:={},i,j,nFaltante,lEspacio default nDonde:=1 cTex:=trim(cTex) if len(cTex)>=nLong return substr(cTex,1,nLong) endif nFaltante:=nLong-len(cTex) lEspacio:=.f. for i:=1 to len(cTex) if substr(cTex,i,1)==' ' if lEspacio;aadd(aEspacio,i);endif lEspacio:=.f. else lEspacio:=.t. endif next if len(aEspacio)==0 return padr(cTex,nLong,'-') endif do case case nDonde==0;j:=len(aEspacio) case nDonde==1;j:=min(len(aEspacio),nFaltante) otherwise; j:=min(int((len(aEspacio)+nFaltante)/2),len(aEspacio)) endcase for i:=1 to min(len(aEspacio),nFaltante) cTex:=substr(cTex,1,aEspacio[j])+substr(cTex,aEspacio[j]) j-- next cTex:=Justifica(cTex,nLong) return cTex
Ayuda -imprimir factura con columna texto tipo memo
Se me pasaba, si usas estas funciones en tu impresion, para que no tengas problema con las fuentes usa una font: DEFINE FONT oFontN NAME "SUPER DRAFT 10CPI" SIZE 0,-9 DEFINE FONT oFontC NAME "SUPER DRAFT 17CPI" SIZE 0,-5 y te quedara de lujo justificado con el texto que quieras automatico