topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
ANTONIO - CVS XHAR DE FWH_906
|
Patricio,
Posiblemente estes usando tus includes de xHarbour, que sean más antiguos que los usados en el cvs
|
ANTONIO - CVS XHAR DE FWH_906
|
Gracias por responder
en realidad el xharbour que utilizo es la que fue lanzada con fwh, es la ultima que se ha lanzado..
xHarbour for BCC - 09/April/2009,
tengo entendido es la que la lanza fivetech, podrian incluir los fuentes en proximas versiones..
donde poder ubicar los fuentes de esta versión?
saludos
|
ANTONIO - CVS XHAR DE FWH_906
|
Patricio,
Todos los fuentes estan en el CVS de xHarbour.
Desde allí puedes recuperar los fuentes a la fecha que desees.
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
Saludos antonio...Tengo el siguiente problema estoy trabajando con el wbrowse de hernan en un entorno MDI-MDICHILD al momento de editar una celda verifico si el valor de uBuffer esta vacio y si es asi llamo a una funcion que me arma otra mdi con la empresa, de ahi debo seleccionar la empresa y traerme ese valor para luego guardarlo en la celda que tengo en edicion. El detalle esta en que me abre la ventana de empresas pero no me le da el focus ya que me queda en el modo de edicion del wbrowse....Espero me puedan ayudar gracias.....
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
si pudieras publicar el codigo pienso que seria mas facil ayudarte...
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
Saludos mcfox... te anexo el codigo...//este es el browse que utilizo:TWBrowse():lHScroll:= .F.@ 6, 2 LISTBOX Brw1 ;FIELDS "" ;ALIAS (CALIAS) ;OF oWndChild ;UPDATEBrw1:SetCols( bro_campo, bro_subtit)Brw1:bDropOver = { | uDropInfo, nRow, nCol, nKeyFlags | ;Brw1:Add( uDropInfo ), MsgBeep() }Brw1:lCellStyle = .T.Brw1:lAutoEdit = .T.Brw1:lAutoSkip = .T.Brw1:ladjlastcol:=.F.Brw1:lDrawFocusRect:=.F.Brw1:nLineStyle:= 2Brw1:Set3DStyle()Brw1:nHeaderHeight := 18Brw1:nLineHeight := 15Brw1:bLogicLen = { || ( Brw1:CALIAS ) -> ( adskeycount() ) } // ( ORDKeyCount() )Brw1:nClrPane := {|| IIF((Brw1:CALIAS)->(adskeyno()) % 2 == 0 ,RGB(193,221,255),RGB(221,245,255) )}Brw1:SetSize( oWnd:nWidth-80, oWnd:nHeight-200, .t. )Brw1:bBkColor:= {|nRow,nCol,nStyle| ; if( nStyle==3 .OR. nStyle=0, if( nCol==1,GetSysColor( COLOR_BTNFACE ),),) }Brw1:bTextColor:= {|nRow,nCol,nStyle| ; if( nStyle==3 .OR. nStyle=0, if( nCol==1,RGB( 192,192,192 ),),) }Brw1:bKeyChar := {|nK| if( nK==VK_RETURN,Brw1:Edit(Brw1:nColAct,.t.),) }Brw1:bEdit:= {|nCol, cBuffer, lFirstEdit|; EDICION( Brw1, nCol, cBuffer, CALIAS, lFirstEdit, xCols, oWnd ) }//la funcion de edicion:STATIC Function EDICION( Brw1, nCol, cBuffer, CALIAS, lFirstEdit, xCols, oWnd ) LOCAL aResult, uBuffer, lContinue:= .T. LOCAL bValid, aItems, bAction, nClrFore, nClrBack nClrFore := RGB(0,0,0) nClrBack := RGB(149,198,147)FOR nCol := 1 TO xCols Do CaseCase nCol == 2 // ID COMuBuffer := (CALIAS)->id_combValid := {|| IF(EMPTY(aResult:=SELECEMPRE(@uBuffer)),.F.,.T.)}IF lContinue:= Brw1:lEditCol( nCol, @uBuffer, "@!", bValid, nClrFore, nClrBack)IF !EMPTY(uBuffer)IF(WndSetFocus("Compañias",oWnd))REPLACE (Brw1:CALIAS)->id_com WITH uBufferENDIFENDIFENDIFENDDONEXT nCol//la funcion SELECEMPRE() me llama a otra funcion es la que me arma //la ventana MDI de empresas:FUNCTION SELECEMPRE( xVar )LOCAL aRetornoaRetorno := COMP0101( @xVar )RETURN aRetorno// esta funcion la uso para darle el focus al windows por el ctitleFUNCTION WndSetFocus(cTitle,oWnd)*------------------------------------------------------*local i:=0,lSuccess:=.f.cTitle:=upper(cTitle)FOR i=1 to len(oWnd:oWndClient:aWnd) IF upper( oWnd:oWndClient:aWnd[i]:cCaption )=cTitle oWnd:oWndClient:aWnd[i]:SetFocus() lSuccess:=.t. ENDIFNEXTRETURN lSuccess
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
Aqui anexo una imagen con las ventanas...[url=http://www.imaxenes.com/imagen/pantalla1jd011h.jpg.html:or9fh4wm][img:or9fh4wm]http://www.imaxenes.com/mini/pantalla1jd011h.jpg[/img:or9fh4wm][/url:or9fh4wm]
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
has verificado que FUNCTION WndSetFocus(cTitle,oWnd) este haciendo el trabajo correcto?puedes ahcer esto:bValid := {|| IF(EMPTY(aResult:=SELECEMPRE(@uBuffer)),.F.,.T.)} con aResult no estas haciendo nada ya que esa variable toma el valor de FUNCTION SELECEMPRE( xVar ), has que esta funcion COMP0101( @xVar ) te retorne el Objeto window MDICHILD[code:jdpnnta0]
bValid := {|| IF(EMPTY(oWndEmp:=SELECEMPRE(@uBuffer)),.F.,.T.)}
...
IF lContinue:= Brw1:lEditCol( nCol, @uBuffer, "@!", bValid, nClrFore, nClrBack)
IF !EMPTY(uBuffer)
IF (WndSetFocus(oWndEmp:cTitle,oWnd)) //cambia aqui
REPLACE (Brw1:CALIAS)->id_com WITH uBuffer
ENDIF
ENDIF
ENDIF
...
FUNCTION SELECEMPRE( xVar )
LOCAL oWndEmp
oWndEmp := COMP0101( @xVar )
RETURN oWndEmp
[/code:jdpnnta0]o si no... ya que tienes el objeto de la mdichild has oWndEmp:SetFocus() directamente...espero te sirva
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
Ok amigo, Gracias....Lo pruebo y te aviso.....
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
mcfox...no me funcion me sigue el mismo problema, el detalle esta en que llamo a comp0101 y el me arma el otro mdi donde debo seleccionar la compañia y devolverme con ese valor, pero despues que llamo a comp0101 el me pasa al siguiente codigo, como hago para que que se me quede en la ventana de compañia hasta que seleccione y luego me devuelva a la ventana donde tengo la celda en edicion....
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
cuando crees el MDI en comp0101 en el comando ACTIVATE en la clausula ON INT dale el foco al wbrowseACTIVATE oWndChild ON INIT oBrw:SetFocus()o sino intenta esto tambien en comp0101oWndChild:bGotFocus:={|| oBrw:SetFocus() }oWndChild = el nombre de tu objeto window/dialogoBrw = nombre de tu objeto Wbrowse
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
mcfox... El foco me lo hace bien siempre y cuando no deje en modo de edicion la celda en el listbox desde donde lo estoy llamando. y necesito mantenerla en edicion por que a lo que seleccione la compañia me debe traer ese valor y colocarmelo en esa celda....
|
ANTONIO AYUDA CON SETFOCUS A UN MDI
|
elimina la edicion y asignale el valor a la fila desde donde haces la llamada, es decir, si haces la llamada desde la fila 4, le vas a asignar el valor a la fila 4 y columna 2 ( donde tienes el codigo ), si quieres hablamos por msn...
|
ANTONIO LINARES
|
[quote:npr9c42f][color=brown:npr9c42f][b:npr9c42f]BUENAS TARDES ANTONIO
SALUDOS A TODOS LOS DEL FORO
ALGUIEN QUE ME PUEDA ASESORAR PARA LLAMAR UNAS PANTALLAS QUE HICE EN WORKSHOP DESDE MI PRG.
Y PUES TAMBIEN PARA QUE ESA INFORMACION QUE CAPTURE EN PANTALLA SE GUARDE EN UN DBF.
SALUDOS DESDE MEXICO Y QUE TENGAN UN EXCELENTE FIN DE SEMANA
ATTE.
RUBEN[/b:npr9c42f][/color:npr9c42f][/quote:npr9c42f]
|
ANTONIO LINARES
|
Ruben :
En el directorio samples de Fivewin tienes muchos ejemmplos de todos los tipos de controles desde codigo como desde recursos,
De todas formas te adjunto este ejemplo ,
Desde Managua, Nicaragua
Ramon Paredes
//===============
FUNCTION GRABO( )
//===============
LOCAL mCODIGO,mNOMBRE,mTIPOAUX,mNATURAL,mEEFF,mVIACOMP,mDETALLE
LOCAL oCODIGO,oNOMBRE,oTIPOAUX,oNATURAL,oEEFF,oVIACOMP,oDETALLE,oBitmap1,oBtnOk
LOCAL Enllavar := .F.
LOCAL mAceptar := .F.
LOCAL nOldRec := RECNO()
PUBLIC dNatural,dEeFf[1]
LoadLibrary("BWCC32.DLL")
DEFINE BRUSH oBrush FILENAME "OSXBack.bmp"
dNatural := {"DEUDORA","ACREEDORA"}
SELECT E
IF DLk_Abre("T_EEFF",.F.) = .F.
CLOSE DATA
QUIT
ENDIF
SET INDEX TO T_EEFF
GO TOP
dEEFF[1] = E->COD_EEFF+"-"+ALLTRIM(E->CONCEPTO)
SKIP
DO WHILE .NOT. EOF()
AADD(dEEFF,E->COD_EEFF+"-"+ALLTRIM(E->CONCEPTO))
SKIP
ENDDO
SELECT A
IF SiNuevo = .T.
mCodigo := SPACE(12)
mNombre := SPACE(45)
mNatural := "DEUDORA"
mEEFF := SPACE(47)
mViacomp := .F.
mDetalle := .F.
ElSE
mCodigo := CATALOGO->CODIGO
mNombre := OemToANsi(CATALOGO->NOMBRE)
mNatural := CATALOGO->NATURAL
mEEFF := CATALOGO->EEFF
mDetalle := CATALOGO->DETALLE
mViaComp := CATALOGO->AFECTAR
ENDIF
DO WHILE .T.
DEFINE DIALOG oDlg2 RESOURCE 23 BRUSH oBrush TRANSPARENT
REDEFINE GET oCODIGO VAR mCODIGO ID 101 OF oDlg2 WHEN SiNUEVO
REDEFINE GET oNOMBRE VAR mNOMBRE ID 102 OF oDlg2 //WHEN !SiNuevo
REDEFINE COMBOBOX oNATURAL VAR mNATURAL ;
PROMPTS DNATURAL ;
ID 103 OF oDlg2 STYLE CBS_DROPDOWN
REDEFINE COMBOBOX oEEFF VAR mEEFF ;
PROMPTS DEEFF ;
ID 104 OF oDlg2
REDEFINE CHECKBOX oVIACOMP VAR mVIACOMP ID 105 OF oDlg2
REDEFINE BUTTON ID 106 OF oDlg2 action ( mAceptar := .T. , oDlg2:End() )
REDEFINE BUTTON ID 107 OF oDlg2 ACTION ( mAceptar := .F. , oDlg2:End() ) CANCEL
ACTIVATE DIALOG oDlg2 CENTERED
IF mAceptar= .F.
EXIT
ENDIF
SELECT A
IF mAceptar
IF SiNuevo
IF EMPTY(mCodigo)
MSGALERT("Codigo Esta en Blanco")
LOOP
ENDIF
SELECT Catalogo
IF DBSEEK(mCodigo)
MSGALERT("Codigo ya Existe")
LOOP
ENDIF
ENDIF
ENDIF
EXIT
ENDDO
SELECT Catalogo
IF mAceptar
IF SiNuevo
IF dlk_appen()
CATALOGO->codigo := mCODIGO
enllavar = .T.
ELSE
enllavar = .F.
ENDIF
ELSE
IF dlk_reg()
enllavar = .T.
ELSE
enllavar = .F.
ENDIF
ENDIF
IF enllavar
CATALOGO->NOMBRE := AnsiToOem(mNombre)
CATALOGO->NATURAL := mNatural
CATALOGO->EEFF := mEEFF
CATALOGO->AFECTAR := mViaComp
CATALOGO->DETALLE := mVIACOMP
IF mViaComp = .T.
nColor = CLR_HBLUE
ENDIF
COMMIT
UNLOCK
ENDIF
oLbx:Refresh()
ENDIF
RETURN NIL
|
ANTONIO LINARES -- MANUAL DE WORKSHOP
|
[color=orange:gtj1fmcr][b:gtj1fmcr]BUENAS TARDES DESDE MEXICO
SALUDOS ANTONIO LINARES
SABES ESTOY HACIENDO PEQUEÑAS APLICACIONES Y NECESITO USAR EL WORKSHOP Y YA HE VISTO ALGUNOS EJEMPLOS PERO ME GUSTARIA TENER ALGUN MANUAL O GUIA PRACTICA
TENDRAS ALGUN LIKN EN DONDE PUDIERA ENCONTRARLO???
SALUDOS DESDE MEXICO.
ATTE.
RUBEN[/b:gtj1fmcr][/color:gtj1fmcr]
|
ANTONIO LINARES -- MANUAL DE WORKSHOP
|
Ruben,
No conocemos ninguno en concreto, pero el Borland resources workshop es muy fácil de usar y de aprender.
De todas formas haz una búsqueda en google por:
Borland Resources Workshop tutorial
ó cambia tutorial por guide ó guia
y revisa los resultados
|
ANTONIO LINARES -- MANUAL DE WORKSHOP
|
[color=green:2zbjxyza][quote:2zbjxyza][b:2zbjxyza]OK ANTONIO MUCHAS GRACIAS
YA ESTUBE CHECANDO ALGUNOS EJEMPLOS Y NO ES MUY COMPLICADO, YA CUANDO LOS ENLACE A MI PRG QUIZAS AHI SE ME PRESENTE ALGUN PERCANCE.
MUCHAS GRACIAS Y ESTAMOS EN CONTACTO
ATTE.
RUBEN REYES
TAMPICO, TAMAULIPAS, MEXICO.[/b:2zbjxyza][/quote:2zbjxyza][/color:2zbjxyza][/color]
|
ANTONIO LINARES -- MANUAL DE WORKSHOP
|
Aqui estamos y estaremos para ayudar en lo que haga falta <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
ANTONIO LINARES -- MANUAL DE WORKSHOP
|
Hola Rubén:Aunque un poco tarde, si sigues interesado en un manual de WorkShop aquí tienes el de Bingen:<!-- m --><a class="postlink" href="http://www.mediafire.com/?wgztlbsbtz2">http://www.mediafire.com/?wgztlbsbtz2</a><!-- m -->Saludos,Manuel Aranda
|
ANTONIO LINARES -- MANUAL DE WORKSHOP
|
<!-- m --><a class="postlink" href="http://www.mediafire.com/?gjbm0mxdqve">http://www.mediafire.com/?gjbm0mxdqve</a><!-- m -->
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
Estimado Antonio.
Te cuento que tengo un problema hace días con unos folder que en FiveWin funcionaban bien y al pasarlos a xHarbour no funcionan.
la porción de código es
REDEFINE FOLDER oFld ID 350 OF oDlg PROMPT "Seccion1", "Seccion2", "Seccion3", "Seccion4";
DIALOGS "CARPETA1","CARPETA2","CARPETA3","CARPETA4"
y esta en un objeto TFOLDER en mi RC.
Karina me comento que es por mi versión que es FWH 2.7 de Noviembre 2005. pero me cuesta creer que sea eso.
Ojala me puedas orientar ya que necesito ocupar las folder en mas de una parte y estoy con un tremendo problema.
Agradecido.
Moisés Colihuinca
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
Moisés,
Puedes copiar aqui tu RC para ver como defines los folders ?
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
[b:1z24j86b]ANTONIO ESTE ES EL CODIGO QUE ME ENTREGA EL WORKSHOP DEL DIALOGO
LA ULTIMA LINEA ES DONDE DEFINE LA FOLDER[/b:1z24j86b]
ODLG_MONOS DIALOG 36, 57, 565, 441
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "Helv"
{
CONTROL "", 100, "TWBrowse", WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 3, 19, 189, 153
GROUPBOX "&Botones", 199, 198, -2, 256, 114, BS_GROUPBOX
GROUPBOX "&Detalle", 198, 198, 111, 256, 65, BS_GROUPBOX
LTEXT "FAMILIAS", 550, 6, 2, 102, 14
PUSHBUTTON "1", 201, 204, 7, 37, 24
PUSHBUTTON "7", 207, 204, 33, 37, 22
PUSHBUTTON "2", 202, 245, 7, 37, 24
PUSHBUTTON "8", 208, 245, 33, 37, 22
PUSHBUTTON "3", 203, 286, 7, 37, 23
PUSHBUTTON "9", 209, 286, 33, 37, 22
PUSHBUTTON "4", 204, 327, 7, 37, 23
PUSHBUTTON "10", 210, 327, 33, 37, 22
PUSHBUTTON "5", 205, 368, 7, 37, 23
PUSHBUTTON "11", 211, 368, 33, 37, 22
PUSHBUTTON "6", 206, 409, 7, 37, 23
PUSHBUTTON "12", 212, 409, 33, 37, 22
LTEXT "", 101, 240, 122, 18, 13, WS_BORDER | WS_GROUP
LTEXT "", 111, 240, 139, 111, 13, WS_BORDER | WS_GROUP
LTEXT "", 112, 240, 157, 18, 13, WS_BORDER | WS_GROUP
RTEXT "Boton", -1, 211, 158, 24, 9
PUSHBUTTON "&Aceptar", 301, 372, 128, 75, 38
PUSHBUTTON "&Salir", 302, 477, 374, 77, 35
RTEXT "Familia", -1, 213, 126, 22, 8
RTEXT "Icono", -1, 213, 140, 22, 8
PUSHBUTTON "13", 213, 204, 57, 37, 22
PUSHBUTTON "14", 214, 245, 57, 37, 22
PUSHBUTTON "15", 215, 286, 57, 37, 22
PUSHBUTTON "16", 216, 327, 57, 37, 22
PUSHBUTTON "17", 217, 368, 57, 37, 22
PUSHBUTTON "18", 218, 409, 57, 37, 22
PUSHBUTTON "19", 219, 204, 82, 37, 21
PUSHBUTTON "20", 220, 245, 82, 37, 21
PUSHBUTTON "21", 221, 286, 82, 37, 21
PUSHBUTTON "22", 222, 327, 82, 37, 21
PUSHBUTTON "23", 223, 368, 82, 37, 21
PUSHBUTTON "24", 224, 409, 82, 37, 21
LTEXT "", 102, 263, 122, 18, 13, WS_BORDER | WS_GROUP
LTEXT "", 103, 286, 122, 18, 13, WS_BORDER | WS_GROUP
LTEXT "", 104, 309, 122, 18, 13, WS_BORDER | WS_GROUP
LTEXT "", 105, 333, 122, 18, 13, WS_BORDER | WS_GROUP
GROUPBOX "&Nombres Familia", 114, 458, 269, 102, 98, BS_GROUPBOX
EDITTEXT 107, 464, 298, 90, 13
EDITTEXT 108, 464, 315, 90, 13
EDITTEXT 109, 464, 332, 90, 13
EDITTEXT 110, 464, 349, 90, 13
EDITTEXT 106, 464, 281, 90, 13
CONTROL "TFolder", 350, "TFolder", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 181, 445, 254
}
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
Para 32 bits tienes que modificar esta línea:
CONTROL "TFolder", 350, "TFolder", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 181, 445, 254
así:
CONTROL "SysTabControl32", 350, "TFolder", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 181, 445, 254
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
ESTIMADO ANTONIO.
GRACIAS POR TU AYUDA pero lo incluí y no logra mostrar ni siquiera los títulos de las FOLDER. que son 4.
como antecedentes te comento que estoy trabajando con el WorkShop y FWCTRLS.DLL instalada dentro de WORKSHOP ... desde ahí obtengo el elemento TFOLDER que cambie por que tu me comentaste... estoy haciendo algo mal??? debo ocupar otro editor de recursos? ocupo otro recurso para simular un FOLDER de verdad ya estoy algo complicado con este tema.
Agradecería me pudieses seguir ayudando.
MUCHAS GRACIAS!!!
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
Te funcionan bien otras cajas de diálogo que tengas en tu EXE ?
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
[code=fw:3bk633sm]<div class="fw" id="{CB}" style="font-family: monospace;"><br />ODLG_MONOS <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">36</span>, <span style="color: #000000;">22</span>, <span style="color: #000000;">565</span>, <span style="color: #000000;">441</span><br /><span style="color: #0000ff;">STYLE</span> DS_ABSALIGN | DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"Familias"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"MS Sans Serif"</span><br /><span style="color: #000000;">{</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">100</span>, <span style="color: #ff0000;">"TWBrowse"</span>, WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, <span style="color: #000000;">3</span>, <span style="color: #000000;">19</span>, <span style="color: #000000;">189</span>, <span style="color: #000000;">153</span><br /> GROUPBOX <span style="color: #ff0000;">"&Botones"</span>, <span style="color: #000000;">199</span>, <span style="color: #000000;">198</span>, <span style="color: #000000;">-2</span>, <span style="color: #000000;">256</span>, <span style="color: #000000;">114</span>, BS_GROUPBOX<br /> GROUPBOX <span style="color: #ff0000;">"&Detalle"</span>, <span style="color: #000000;">198</span>, <span style="color: #000000;">198</span>, <span style="color: #000000;">111</span>, <span style="color: #000000;">256</span>, <span style="color: #000000;">65</span>, BS_GROUPBOX<br /> LTEXT <span style="color: #ff0000;">"FAMILIAS"</span>, <span style="color: #000000;">550</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">14</span><br /> PUSHBUTTON <span style="color: #ff0000;">"1"</span>, <span style="color: #000000;">201</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">24</span><br /> PUSHBUTTON <span style="color: #ff0000;">"7"</span>, <span style="color: #000000;">207</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"2"</span>, <span style="color: #000000;">202</span>, <span style="color: #000000;">245</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">24</span><br /> PUSHBUTTON <span style="color: #ff0000;">"8"</span>, <span style="color: #000000;">208</span>, <span style="color: #000000;">245</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"3"</span>, <span style="color: #000000;">203</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">23</span><br /> PUSHBUTTON <span style="color: #ff0000;">"9"</span>, <span style="color: #000000;">209</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"4"</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">327</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">23</span><br /> PUSHBUTTON <span style="color: #ff0000;">"10"</span>, <span style="color: #000000;">210</span>, <span style="color: #000000;">327</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"5"</span>, <span style="color: #000000;">205</span>, <span style="color: #000000;">368</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">23</span><br /> PUSHBUTTON <span style="color: #ff0000;">"11"</span>, <span style="color: #000000;">211</span>, <span style="color: #000000;">368</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"6"</span>, <span style="color: #000000;">206</span>, <span style="color: #000000;">409</span>, <span style="color: #000000;">7</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">23</span><br /> PUSHBUTTON <span style="color: #ff0000;">"12"</span>, <span style="color: #000000;">212</span>, <span style="color: #000000;">409</span>, <span style="color: #000000;">33</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> LTEXT <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #000000;">240</span>, <span style="color: #000000;">122</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">13</span>, WS_BORDER | WS_GROUP<br /> LTEXT <span style="color: #ff0000;">""</span>, <span style="color: #000000;">111</span>, <span style="color: #000000;">240</span>, <span style="color: #000000;">139</span>, <span style="color: #000000;">111</span>, <span style="color: #000000;">13</span>, WS_BORDER | WS_GROUP<br /> LTEXT <span style="color: #ff0000;">""</span>, <span style="color: #000000;">112</span>, <span style="color: #000000;">240</span>, <span style="color: #000000;">157</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">13</span>, WS_BORDER | WS_GROUP<br /> RTEXT <span style="color: #ff0000;">"Boton"</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">211</span>, <span style="color: #000000;">158</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">9</span><br /> PUSHBUTTON <span style="color: #ff0000;">"&Aceptar"</span>, <span style="color: #000000;">301</span>, <span style="color: #000000;">372</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">75</span>, <span style="color: #000000;">38</span><br /> PUSHBUTTON <span style="color: #ff0000;">"&Salir"</span>, <span style="color: #000000;">302</span>, <span style="color: #000000;">477</span>, <span style="color: #000000;">374</span>, <span style="color: #000000;">77</span>, <span style="color: #000000;">35</span><br /> RTEXT <span style="color: #ff0000;">"Familia"</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">126</span>, <span style="color: #000000;">22</span>, <span style="color: #000000;">8</span><br /> RTEXT <span style="color: #ff0000;">"Icono"</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">140</span>, <span style="color: #000000;">22</span>, <span style="color: #000000;">8</span><br /> PUSHBUTTON <span style="color: #ff0000;">"13"</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">57</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"14"</span>, <span style="color: #000000;">214</span>, <span style="color: #000000;">245</span>, <span style="color: #000000;">57</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"15"</span>, <span style="color: #000000;">215</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">57</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"16"</span>, <span style="color: #000000;">216</span>, <span style="color: #000000;">327</span>, <span style="color: #000000;">57</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"17"</span>, <span style="color: #000000;">217</span>, <span style="color: #000000;">368</span>, <span style="color: #000000;">57</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"18"</span>, <span style="color: #000000;">218</span>, <span style="color: #000000;">409</span>, <span style="color: #000000;">57</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">22</span><br /> PUSHBUTTON <span style="color: #ff0000;">"19"</span>, <span style="color: #000000;">219</span>, <span style="color: #000000;">204</span>, <span style="color: #000000;">82</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">21</span><br /> PUSHBUTTON <span style="color: #ff0000;">"20"</span>, <span style="color: #000000;">220</span>, <span style="color: #000000;">245</span>, <span style="color: #000000;">82</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">21</span><br /> PUSHBUTTON <span style="color: #ff0000;">"21"</span>, <span style="color: #000000;">221</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">82</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">21</span><br /> PUSHBUTTON <span style="color: #ff0000;">"22"</span>, <span style="color: #000000;">222</span>, <span style="color: #000000;">327</span>, <span style="color: #000000;">82</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">21</span><br /> PUSHBUTTON <span style="color: #ff0000;">"23"</span>, <span style="color: #000000;">223</span>, <span style="color: #000000;">368</span>, <span style="color: #000000;">82</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">21</span><br /> PUSHBUTTON <span style="color: #ff0000;">"24"</span>, <span style="color: #000000;">224</span>, <span style="color: #000000;">409</span>, <span style="color: #000000;">82</span>, <span style="color: #000000;">37</span>, <span style="color: #000000;">21</span><br /> LTEXT <span style="color: #ff0000;">""</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">263</span>, <span style="color: #000000;">122</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">13</span>, WS_BORDER | WS_GROUP<br /> LTEXT <span style="color: #ff0000;">""</span>, <span style="color: #000000;">103</span>, <span style="color: #000000;">286</span>, <span style="color: #000000;">122</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">13</span>, WS_BORDER | WS_GROUP<br /> LTEXT <span style="color: #ff0000;">""</span>, <span style="color: #000000;">104</span>, <span style="color: #000000;">309</span>, <span style="color: #000000;">122</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">13</span>, WS_BORDER | WS_GROUP<br /> LTEXT <span style="color: #ff0000;">""</span>, <span style="color: #000000;">105</span>, <span style="color: #000000;">333</span>, <span style="color: #000000;">122</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">13</span>, WS_BORDER | WS_GROUP<br /> GROUPBOX <span style="color: #ff0000;">"&Nombres Familia"</span>, <span style="color: #000000;">114</span>, <span style="color: #000000;">458</span>, <span style="color: #000000;">269</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">98</span>, BS_GROUPBOX<br /> EDITTEXT <span style="color: #000000;">107</span>, <span style="color: #000000;">464</span>, <span style="color: #000000;">298</span>, <span style="color: #000000;">90</span>, <span style="color: #000000;">13</span><br /> EDITTEXT <span style="color: #000000;">108</span>, <span style="color: #000000;">464</span>, <span style="color: #000000;">315</span>, <span style="color: #000000;">90</span>, <span style="color: #000000;">13</span><br /> EDITTEXT <span style="color: #000000;">109</span>, <span style="color: #000000;">464</span>, <span style="color: #000000;">332</span>, <span style="color: #000000;">90</span>, <span style="color: #000000;">13</span><br /> EDITTEXT <span style="color: #000000;">110</span>, <span style="color: #000000;">464</span>, <span style="color: #000000;">349</span>, <span style="color: #000000;">90</span>, <span style="color: #000000;">13</span><br /> EDITTEXT <span style="color: #000000;">106</span>, <span style="color: #000000;">464</span>, <span style="color: #000000;">281</span>, <span style="color: #000000;">90</span>, <span style="color: #000000;">13</span><br /> CONTROL <span style="color: #ff0000;">"SysTabControl32"</span>, <span style="color: #000000;">350</span>, <span style="color: #ff0000;">"TFOLDER"</span>, WS_CHILD | WS_VISIBLE | WS_TABSTOP, <span style="color: #000000;">5</span>, <span style="color: #000000;">181</span>, <span style="color: #000000;">445</span>, <span style="color: #000000;">254</span><br /><span style="color: #000000;">}</span><br /> </div>[/code:3bk633sm]
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
SI ANTONIO ME FUNCIONA TODO OK.
EL UNICO PROBLEMA ES EL FOLDER..
AGRADEZCO TU AYUDA POR QUE NUNCA ME HABÍA PASADO ALGO ASÍ.
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
Me confundí, hay que escribirlo asi:
CONTROL "", 350, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 5, 181, 445, 254
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
ANTONIO...FUNCIONO!!!
UN GRAN ABRAZO... MUCHAS GRACIAS!!!
|
ANTONIO UNA MANO CON PROBLEMA CON FOLDER
|
Me alegro <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
ANTONIO AYUDAME COM VK_ESCAPE + BUTTON NO LOGRO EXITO.
|
Antonio, estou com o seguinte problema em um BUTTON
REDEFINE BUTTON oBtn[ 1] ID 635 OF oMap30;
ACTION( pPR_A_COD := TMP1,;
TESTE2( oWnd, oAgen, oMap30, pPR_A_COD ) )
oBtn[ 1]:bKeyDown := { |nKey| IF( nKey = VK_ESCAPE,( Ver_Tecla1() ), nil ) }
Gostaria de usar a TECLA ESCAPE, mas não FUNCIONA de jeito nenhum, estou compilado com FWH2.7 + harbour46.
Poderia me ajudar me dizendo como posso fazer o ESCAPE funcionar ?
Gracias de Antemano,
|
ANTONIO AYUDAME COM VK_ESCAPE + BUTTON NO LOGRO EXITO.
|
#define DLGC_WANTALLKEYS 4
oBtn[ 1 ]:nDlgCode := DLGC_WANTALLKEYS
|
ANTONIO AYUDAME COM VK_ESCAPE + BUTTON NO LOGRO EXITO.
|
Gracias Antonio,
Funcionou de pronto!
Saludos,
|
ANTONIO Una ayuda por favor
|
Buenos Dias Antonio,
Tengo esta función
[code=fw:3h6x7yk5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> XX<span style="color: #000000;">(</span> oDlg, oBCli_1, oBCli_2 <span style="color: #000000;">)</span><br /><br /> lapm := ANAM_08<span style="color: #000000;">(</span> oWnd, PVALORF, TCOD, TFIL, TUNID, TDATA, aJPG_1, n_1, aJPG_2, n_2 <span style="color: #000000;">)</span><br /><br /> ? lapm<br /> <span style="color: #00C800;">IF</span> lapm<br /> Ficha_122<span style="color: #000000;">(</span> oDlg, oBCli_1 <span style="color: #000000;">)</span><br /> Ficha_124<span style="color: #000000;">(</span> oDlg, oBCli_2 <span style="color: #000000;">)</span><br /> lapm := .f.<br /> ? lapm<br /> <span style="color: #00C800;">EndIF</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:3h6x7yk5]
Lo que pasa es que cuando se llama a la función Anam_08, muestra el contenido de la variable LAPM, creo que esto sólo debería ocurrir cuando me clave en el botón para salir de la función anam_08, es en ese momento que me LAPM := TRUE.
Es como si la función de Active WINDOW en anam_08 tuvo la cláusula nowait.
Antonio, ¿cómo resolver el problema, o llame a la función anam_08, LAPM hacer := TRUE y la espalda, ejecute tela_122 y tela_124, a continuación, el fragmento de código de función anam_08
[code=fw:3h6x7yk5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------------------------------//</span><br /><span style="color: #00C800;">Function</span> Anam_08<span style="color: #000000;">(</span> oWnd, VALORF, COD, FIL, UNID, <span style="color: #00C800;">DATA</span>, JPG_1, m_1, JPG_2, m_2 <span style="color: #000000;">)</span><br /><br /> aJPG_1 := JPG_1<br /> aJPG_2 := JPG_2<br /> n_1 := m_1<br /> n_2 := m_2<br /> nFator_1 := <span style="color: #000000;">9</span> <span style="color: #B900B9;">// Se nFator_1 = 5, mostra foto com tamanho REAL</span><br /> nFator_2 := <span style="color: #000000;">9</span> <span style="color: #B900B9;">// Se nFator_2 = 5, mostra foto com tamanho REAL</span><br /> lapm := .f.<br /><br /> <span style="color: #B900B9;">// Iniciando...</span><br /> <span style="color: #B900B9;">//---------------------------------------------------------------------</span><br /> <span style="color: #B900B9;">// "Escondendo a barra de tarefas"</span><br /> ShowWindow<span style="color: #000000;">(</span> FindWindow<span style="color: #000000;">(</span> <span style="color: #ff0000;">'Shell_TrayWnd'</span>, <span style="color: #00C800;">Nil</span> <span style="color: #000000;">)</span>, SW_HIDE <span style="color: #000000;">)</span><br /> <br /> <span style="color: #B900B9;">//---- brush do fundo da janela principal</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">49</span>, <span style="color: #000000;">106</span>, <span style="color: #000000;">197</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// definiciones de objetos icon y font</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Arial"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-11</span><br /><br /> <span style="color: #0000ff;">MENU</span> oMenu<br /> <span style="color: #0000ff;">ENDMENU</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oAnam_08;<br /> <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">00</span>,<span style="color: #000000;">00</span> <span style="color: #0000ff;">TO</span> ScreenHeight, ScreenWidth <span style="color: #0000ff;">PIXEL</span>;<br /> NOMAXIMIZE NOMINIMIZE;<br /> <span style="color: #0000ff;">BRUSH</span> oBrush;<br /> <span style="color: #0000ff;">MENU</span> oMenu<br /><br /> <span style="color: #B900B9;">//---------------------------------------------------------------------</span><br /> <span style="color: #B900B9;">// Lado Esquerdo da Tela - oAct_1</span><br /> <span style="color: #B900B9;">//---------------------------------------------------------------------</span><br /> oAct_1 := TActiveX<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oAnam_08, <span style="color: #ff0000;">"Ctrl.1"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">400</span>, <span style="color: #000000;">568</span> <span style="color: #000000;">)</span><br /><br /> oAct_1:<span style="color: #000000;">bOnEvent</span> := <span style="color: #000000;">{</span> | event, aParams, pParams | Event_Esq<span style="color: #000000;">(</span> event, aParams, pParams, oAct_1 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">//---------------------------------------------------------------------</span><br /> <span style="color: #B900B9;">// Lado Direito da Tela - oAct_2</span><br /> <span style="color: #B900B9;">//---------------------------------------------------------------------</span><br /> oAct_2 := TActiveX<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oAnam_08, <span style="color: #ff0000;">"Ctrl.1"</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">400</span>, <span style="color: #000000;">400</span>, <span style="color: #000000;">568</span> <span style="color: #000000;">)</span><br /><br /> oAct_2:<span style="color: #000000;">bOnEvent</span> := <span style="color: #000000;">{</span> | event, aParams, pParams | Event_Dir<span style="color: #000000;">(</span> event, aParams, pParams, oAct_2 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">MESSAGE</span> BAR oMsg;<br /> <span style="color: #0000ff;">OF</span> oAnam_08 <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"R+/W"</span> NOINSET<br /><br /> <span style="color: #B900B9;">//---------------------------------------------------------------------</span><br /> <span style="color: #B900B9;">// Lado Esquerdo da Tela - oAct_1</span><br /> <span style="color: #B900B9;">//---------------------------------------------------------------------</span><br /><br /> <span style="color: #B900B9;">// Encerrar Rotina</span><br /> <span style="color: #0000ff;">DEFINE</span> MSGITEM oMsgItem <span style="color: #0000ff;">OF</span> oMsg;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Encerrar'</span>;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">65</span>;<br /> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">(</span> ShowWindow<span style="color: #000000;">(</span> FindWindow<span style="color: #000000;">(</span> <span style="color: #ff0000;">'Shell_TrayWnd'</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span>, SW_SHOWNA <span style="color: #000000;">)</span>,;<br /> lapm := .t., oAnam_08:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /> TOOLTIP <span style="color: #ff0000;">"Encerrar esta Rotina"</span><br /><br />comandos...<br /><br /> <span style="color: #B900B9;">//-------------------------------------------------------------------------</span><br /> <span style="color: #B900B9;">// Inicio dos Eventos do teclado</span><br /> <span style="color: #B900B9;">//-------------------------------------------------------------------------</span><br /><br /> oAnam_08:<span style="color: #000000;">bKeyDown</span> := <span style="color: #000000;">{</span> |nKey| <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> nKey = VK_ESCAPE,<span style="color: #000000;">(</span> AutResiz<span style="color: #000000;">(</span> .t., XY, oAnam_08, <span style="color: #000000;">-1</span> <span style="color: #000000;">)</span>, oAnam_08:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">//----------------------------------------------------------------------------------</span><br /> <span style="color: #B900B9;">// Fim dos Eventos do teclado</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oAnam_08 <span style="color: #0000ff;">MAXIMIZED</span>;<br /> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">(</span> AutResiz<span style="color: #000000;">(</span> .t., XY, oAnam_08, YX <span style="color: #000000;">)</span>,; <span style="color: #B900B9;">// oAct_1 : Do( "LicenseKey", "5555" ),;</span><br /> SetWindowPos<span style="color: #000000;">(</span> oAnam_08:<span style="color: #000000;">hwnd</span>, <span style="color: #000000;">-1</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">3</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// Retornando...</span><br /> dbSelectArea<span style="color: #000000;">(</span> <span style="color: #ff0000;">"FiMed"</span> <span style="color: #000000;">)</span><br /> dbGotop<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> lapm<br /><br /> </div>[/code:3h6x7yk5]
Gracias en Adelantado,
Saludos desde Brasil
|
ANTONIO Una ayuda por favor
|
Laugusto,
Las ventanas son siempre no modales, excepto la principal, por lo que debes usar un dialogo en vez de una ventana.
En FWPPC existe la excepcion de que pueden usarse ventanas modales.
|
ANTONIO Una ayuda por favor
|
Buenas,
Antonio, gracias por contestar.
Saludos desde Brasil,
|
ANTONIO Y COLEGAS SOBRE CORDENADAS DE PANTALLA Y VENTANA
|
tengo la siguiente duda.. como obtengo las cordenadas de la pantalla dnd se pinta,, una ventana...
espero q este jpg me explique mejor..
[img:negx0gjt]http://www.subirimagen.info/image.php?id=0A75_4B565EF4[/img:negx0gjt]
GRACIAS
|
ANTONIO Y COLEGAS SOBRE CORDENADAS DE PANTALLA Y VENTANA
|
<!-- m --><a class="postlink" href="http://www.subirimagen.info/image-0A75_4B565EF4.jpg">http://www.subirimagen.info/image-0A75_4B565EF4.jpg</a><!-- m -->
|
ANTONIO Y COLEGAS SOBRE CORDENADAS DE PANTALLA Y VENTANA
|
Hola mantonio:
[quote="mantonio_08":3sbwv6yf]tengo la siguiente duda.. como obtengo las cordenadas de la pantalla dnd se pinta,, una ventana... [/quote:3sbwv6yf]oWnd:nTop, oWnd:nLeft
Un abrazo.
|
APAREZCA DESHABILITADO OPCION EN DBCOMBO o COMBOBOX
|
Me gustaria saber si se puede hacer un DBCOMBO o COMBOBOX como el de la imagen y si hay alguna forma de que al desplegar las opciones a seleccionar en un DBCOMBO o COMBOBOX aparescan alguna o alguna opcion a seleccionar desahabilitada.? es decir, la muestre pero que no se pueda seleccionar. Alguna idea o alguien a trabajado o necesitado algo como esto? espero sus comentarios, ayudas y sugerencias, gracias...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
[img]
[url=http://www.subirimagenes.net/i/141230024547403811.jpg:3dgqno8i][img:3dgqno8i]http://sim1.subirimagenes.net/img/2014/12/30//141230024547403811.jpg[/img:3dgqno8i][/url:3dgqno8i]
[/img]
|
APAREZCA DESHABILITADO OPCION EN DBCOMBO o COMBOBOX
|
Jose Luis
Prueba con la clase ComboMetro, simula un combobox con la funcionalidad del XBrowse, y al fin y al cabo lo que aparece en los Items tiene toda la apariencia de un tree
|
APAREZCA DESHABILITADO OPCION EN DBCOMBO o COMBOBOX
|
[quote="cnavarro":rui9f4rx]Jose Luis
Prueba con la clase ComboMetro, simula un combobox con la funcionalidad del XBrowse, y al fin y al cabo lo que aparece en los Items tiene toda la apariencia de un tree[/quote:rui9f4rx]
Gracias por la rapida respuesta Navarro, revisare la clase que me dices, aunque tiene como dices figura de un TREE es un combo box con titulos de las opciones, solo que estas no se contraen o expanden como el tree, y en relacion a la pregunta si puede aparece alguna opcion pero deshabilitada en las clases dbcombo o combobox, hay algo sobre eso.? gracias, saludos.
|
APAREZCA DESHABILITADO OPCION EN DBCOMBO o COMBOBOX
|
Esta clase Combometro, parece interesante, donde se puede conseguir?
|
APAREZCA DESHABILITADO OPCION EN DBCOMBO o COMBOBOX
|
En las clases de las distribuciones de FW
Creo que desde el 2012
|
APAREZCA DESHABILITADO OPCION EN DBCOMBO o COMBOBOX
|
Lo que vi es de html y es una propiedad del combobox...OPTGROUP...aca dejo algunas ideas haber si alguno de los guru se le da el hilo, creo seria una buena opciones en los combobox o dbcombo, como un separator en los menu...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Esto es HTML:
La etiqueta <optgroup> se utiliza para agrupar opciones relacionada, por medio de un título común, en los menús desplegables.
[code=fw:h0nwfyob]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><select><br /> <optgroup label=<span style="color: #ff0000;">"Colores primarios"</span>><br /> <option value=<span style="color: #ff0000;">"rojo"</span>>Rojo</option><br /> <option value=<span style="color: #ff0000;">"azul"</span>>Azul</option><br /> <option value=<span style="color: #ff0000;">"amarillo"</span>>Amarillo</option><br /> </optgroup><br /> <optgroup label=<span style="color: #ff0000;">"Colores secundarios"</span>><br /> <option value=<span style="color: #ff0000;">"verde"</span>>Verde</option><br /> <option value=<span style="color: #ff0000;">"naranja"</span>>Naranja</option><br /> <option value=<span style="color: #ff0000;">"violeta"</span>>Violeta</option><br /> </optgroup><br /></select> <br /> </div>[/code:h0nwfyob]
<!-- m --><a class="postlink" href="http://www.virtualnauta.com/html-etiqueta-optgroup">http://www.virtualnauta.com/html-etiqueta-optgroup</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.virtualnauta.com/html-formularios">http://www.virtualnauta.com/html-formularios</a><!-- m -->
|
APARIENCIA DE XP A LOS PROGRAMAS
|
Amigos:
¿Existe la posibilidad de dar apariencia XP a nuestros programas?
Si es así, por favor indiquenme cómo. Sino, esperaremos.
Saludos.
Ricardo Bécares
Rosario, Argentina
|
APARIENCIA DE XP A LOS PROGRAMAS
|
Ricardo
Me has mandado a mi correo un PM, pero si bien me llego el mail notificandome, no puedo acceder al PM, porque hay sido desahilitados por el administrador. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Cualquier pregunta que tengas, me la haces directamente al correo.
Hernan
|
APARIENCIA DE XP A LOS PROGRAMAS
|
El look XP solo vale para aplicaciones de 32 y 64 bits, si trabajas con FiveWin Harbour no tienes el menor problema para usarlas.
Mira este articulo:
[url:3iepam9o]http://google.blogspot.com/2005/07/crnica-de-una-migracin-exitosa-parte-4.html[/url:3iepam9o]
|
API
|
Estimados: las definiciones de las API que trae el FW, puedo usarlas en el FWH + Harbour?
Gracias.
Algun ejemplo, agradecería.
|
API
|
Gustavo,
Depende de lo que vayas a hacer y que funciones vayas a usar.
|
API
|
Tengo que hacer funcionar las CReateNamedPiped
|
API
|
Gustavo,
Usando las funciones en C que proporcionamos en el directorio source\winapi como ejemplo, no debieras tener ningun problema en implementar ese API.
|
API + Fivewin
|
Hola Amigos... mande hacer un api para un proyecto web.. ahora como puedo consumir esa api con fivewin que comando se ocupan algun ejemplos
saludos
|
API + Fivewin
|
Puedes usar la libreria LibCurl de la que tienes muchos ejemplos en el foro o con un ActiveX o CreateObject como puedes ver en este post
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=41541&sid=7eb76a0f582da519c9f4c5f583fbff79#p248900">viewtopic.php?f=6&t=41541&sid=7eb76a0f582da519c9f4c5f583fbff79#p248900</a><!-- l -->
|
API Bancaria (SOLUCIONADO)
|
Hola, quiero hacer uso de las APIs Bancarias para acceder a los extractos de cuentas.
He comenzado por analizar la API de BBVA. Con el siguiente código he conseguido acceder a las cuentas de un usuario de ejemplo que pone BBVA para hacer pruebas :
[code=fw:2sxms4hq]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">local</span> oHttp, cCadena, cNomObjOLE := <span style="color: #ff0000;">"Microsoft.XMLHTTP"</span>, cToken := <span style="color: #ff0000;">''</span>, ;<br /> cURL := <span style="color: #ff0000;">"https://apis.bbva.com/business-accounts-sbx/v1/statements/aeb43"</span><br /> <br /> oHttp:<span style="color: #000000;">Open</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"GET"</span> , cUrl, .f. <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"application/json"</span><span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Accept"</span>, <span style="color: #ff0000;">"application/json"</span><span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Authorization"</span>, cToken <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Host"</span>, <span style="color: #ff0000;">"apis.bbva.com"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">try</span><br /> oHttp:<span style="color: #000000;">Send</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error en Send'</span><br /> <span style="color: #00C800;">return</span> .t.<br />end<br />cCadena := oHttp:<span style="color: #000000;">responseText</span><br /> </div>[/code:2sxms4hq]
En este ejemplo no he incluido cToken y es donde tengo el problema. Para obtener un token de acceso válido el sistema se basa en oAuth (Three Legged Access). La siguiente información aparece en la BBVA API_Market para obtener el token de acceso :
[quote:2sxms4hq]GET /token/authorize
This endpoint is invoked by a web browser redirection (it requires user interaction). It redirects to the login page, and then shows the scopes approval page. At the end of this flow, this endpoint returns to the redirect_url configured for the associated application, with an authorization_code attached.
This endpoint issues a web browser redirection to the BBVA Connect login page. If necessary, also shows the scope approval page. Finally, another web browser redirection is made to the application’s redirect_uri, attaching a query parameter with the Authorization Code.
With that authorization_code and application’s credentials ( appid + client_secret ), the application must invoke the token endpoint to obtain a valid _SecurityToken.
If there is not any scope specified in the request, the scope of this Security_Token will be the default scope or scopes for each application.
This endpoint returns the access tokens for grant types client_credentials, authorization_code and refresh_token.[/quote:2sxms4hq]
Según indican en la información al consumir el servicio con un GET el sistema redirige a una página para que el usuario se identifique y a continuación se pasa el control a una uri de mi aplicación Web. Como estoy intentando acceder desde mi programa de escritorio no sé cómo acceder a la página de identificación y recuperar la respuesta con el token de acceso.
Espero haberme explicado o por lo menos si hay alguien en el foro que haya conseguido acceder a API bancarias y me pudiera echar una mano.
Gracias.
|
API Bancaria (SOLUCIONADO)
|
Hola, hace un tiempo estuve viendo opciones y quizás te interese esta plataforma.
[url:253f1ol6]https://www.afterbanks.com/[/url:253f1ol6]
No llegué a utilizarla porque mis clientes no me solicitan este tipo de acceso, pero antes de meterte con la API de cada entidad igual te sale a cuenta.
|
API Bancaria (SOLUCIONADO)
|
Gracias Angel, le echaré un vistazo, pero por lo que he visto por encima es una API y para usarla llegaré al mismo problema con el que me he encontrado con la de BBVA.
Seguiré probando y puede que lo intente con modharbour que me permitirá acceder a la página de identificación y volver a la página web de la aplicación que desarrolle.
|
API Bancaria (SOLUCIONADO)
|
Hola, he podido avanzar en este tema. He conseguido con el authorization_code que me ha devuelto la página de identificación de la banca electrónica de BBVA, acceder a un access_token y con él recuperar los movimientos de una cuenta bancaria de prueba. El siguiente código hace todo el proceso :
[code=fw:1fj5cbah]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> BBVA <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oHttp, cCadena, aRespuesta := <span style="color: #000000;">{</span> => <span style="color: #000000;">}</span>, cCode, cToken, cFicTok := <span style="color: #ff0000;">'.<span style="color: #000000;">\T</span>OK_BBV.TXT'</span>, cFicJSon := <span style="color: #ff0000;">'.<span style="color: #000000;">\E</span>XT_BBV.JSON'</span>, ;<br /> cNomObjOLE := <span style="color: #ff0000;">"Microsoft.XMLHTTP"</span>, ; <br /> cRedirect_Uri := <span style="color: #ff0000;">"http://localhost"</span>, ;<br /> cAppID := <span style="color: #ff0000;">"'"</span>, cSecretID := <span style="color: #ff0000;">""</span>, ; && Esta información se consigue dándose de alta en https:<span style="color: #B900B9;">//www.bbvaapimarket.com/es y añadiendo una APP</span><br /> cURL := <span style="color: #ff0000;">"https://connect.bbva.com/token"</span><br /><br />* Abrir navegador Chrome con la página dónde se solicitan los datos del usuario de la banca electrónica de BBVA<br /> shellexecute <span style="color: #000000;">(</span> , <span style="color: #ff0000;">"open"</span>, <span style="color: #ff0000;">"chrome.exe"</span>, ;<br /> <span style="color: #ff0000;">"https://connect.bbva.com/sandboxconnect?scope="</span> + ;<br /> <span style="color: #ff0000;">"&client_id="</span> + cAppID + ;<br /> <span style="color: #ff0000;">"&redirect_uri="</span> + cRedirect_Uri + ;<br /> <span style="color: #ff0000;">"&response_type=code"</span> <span style="color: #000000;">)</span> <br />********* Una vez introducidos usuario y contraseña, el navegador se redije a cRedirect_Url con un parámetro que tiene el código de autorización : ?code=xxxxxx<br />********* cCode := Recuperar de la ventana del navegador la dirección <span style="color: #000000;">(</span>por ejemplo : <span style="color: #000000;">http</span>:<span style="color: #B900B9;">//http://localhost/?code=F16fo8) y sacar code "F16fo8"</span><br />* Realizar un POST con el authorization_code para acceder a un access_token válido<br /> <span style="color: #00C800;">try</span><br /> oHttp := CreateObject <span style="color: #000000;">(</span>cNomObjOLE<span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error de creacion oHttp'</span><br /> <span style="color: #00C800;">return</span> .t.<br /> end<br /><br /> oHttp:<span style="color: #000000;">Open</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"POST"</span> , cUrl + <span style="color: #ff0000;">"?grant_type=authorization_code"</span> + ;<br /> <span style="color: #ff0000;">"&code="</span> + ALLTRIM <span style="color: #000000;">(</span>cCode<span style="color: #000000;">)</span> + ;<br /> <span style="color: #ff0000;">"&redirect_uri="</span> + cRedirect_Uri, .f. <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Authorization"</span>, <span style="color: #ff0000;">"Basic "</span> + cMimeEnc<span style="color: #000000;">(</span>cAppID + <span style="color: #ff0000;">':'</span> + cSecretID<span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">try</span><br /> oHttp:<span style="color: #000000;">Send</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error en Send Token'</span><br /> <span style="color: #00C800;">return</span> .t.<br /> end<br /> cCadena := oHttp:<span style="color: #000000;">responseText</span> <br /> HB_MemoWrit <span style="color: #000000;">(</span> cFicTok, cCadena, .f. <span style="color: #000000;">)</span><br /> aRespuesta := hb_jsonDecode <span style="color: #000000;">(</span>cCadena<span style="color: #000000;">)</span><br /> cToken := aRespuesta <span style="color: #000000;">[</span><span style="color: #ff0000;">'access_token'</span><span style="color: #000000;">]</span><br /><br />* Realizar un <span style="color: #0000ff;">GET</span> con el acces_token y acceder a los movimientos de las cuentas<br /> cUrl := <span style="color: #ff0000;">"https://apis.bbva.com/business-accounts-sbx/v1/statements/aeb43"</span><br /> oHttp:<span style="color: #000000;">Open</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"GET"</span> , cUrl, .f. <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"application/json"</span><span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Accept"</span>, <span style="color: #ff0000;">"application/json"</span><span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Authorization"</span>, <span style="color: #ff0000;">"jwt "</span> + cToken <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Host"</span>, <span style="color: #ff0000;">"apis.bbva.com"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">try</span><br /> oHttp:<span style="color: #000000;">Send</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error en Send'</span><br /> <span style="color: #00C800;">return</span> .t.<br /> end<br /> cCadena := oHttp:<span style="color: #000000;">responseText</span> <br /> HB_MemoWrit <span style="color: #000000;">(</span> cFicJSon, cCadena, .f. <span style="color: #000000;">)</span><br /> oHttp := <span style="color: #00C800;">Nil</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /> </div>[/code:1fj5cbah]
El problema que tengo ahora es que necesito leer de la ventana de Chrome el authorization_code con que responde la página de identificación.
He conseguido con la función : FindWindow(0, "BBVA Connect Google Chrome") recuperar el hWnd de la ventana, y con GetWindowText(hWnd) el título. Pero cómo puedo acceder al contenido de la ventana ?
Por ejemplo acceder al objeto html que contiene la ventana de Chrome.
Gracias.
|
API Bancaria (SOLUCIONADO)
|
Hola:
Probablemente se genere una cookie, que puedas localizar.
Asimismo, quizás sea mejor utilizar un navegador menos intrusivo, como Firefox o Brave, si lo estimas oportuno.
Un saludo
|
API Bancaria (SOLUCIONADO)
|
Gracias Moises, pero no hay ninguna cookie.
He incrustado la ventana del navegador dentro de mi programa, pero no sé cómo acceder a la dirección que se muestra para leer el code.
[img:22qaf78w]https://i.postimg.cc/J7S3wWCq/Connect-BBVA.png[/img:22qaf78w]
|
API Bancaria (SOLUCIONADO)
|
Que valor tiene cCadena aqui ?
cCadena := oHttp:responseText
|
API Bancaria (SOLUCIONADO)
|
cCadena tiene este valor si previamente le he rellenado en el POST un cCode correcto
[quote:uk7m37b1]
{"access_token":"eyJ6aXAiOiJERUYiLCJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.XSWOkBMa1fvH5KzfsWVFDQLyJegRTyi-aG4AXh8XiubzfowJlDvtxTnGJTUaKwx_7ASwSfPfMs0VJcQZap6CWvs-HR_MBnHrD6VA3eiy-JvEhNiV2-sYLA-81TmCQj9Zx1oKccRxIRRlXWVAme32CPLTE13JYvocLVeiNIn1zYY2EycyHEEfp9huegwQjU6U19gofXzLCnc8K6GCGLZbm5c2_ZUuzXYk6uIjYzNRHmax2owwPvNRflGz7ZCJRkrP6wBL4oRgfefjTy0-MPfYnW60pbWyHEcu_J1BgAD40WYYxSzUoyCb-Rli8V4xDO8EEAZeHkL7-eJ3LkSXA-uo4A.DGBA9pirTlzwJaNu.788fUGfWZ9sGcL3jPhFC4vO_y5KmZJNdAtAng2ayttCP9ipH2IHFwef2qYfyt8W9-wkC49WxRwGaA0-zytHfWqfBDGA1a1yS419YHxcvFCKEUuyEkd9YXdV96WGKufEimPtd2rJ0hWvvv-6tx7hthbMBV3f6ghFPydYswo3zhzpWuNjZ_AaxQDvB1tNvA9oyJC09_KXP3VcbFOV-C8-sf_2cGoyHV-ejEnvK1lRglmKO2QIJVP5ua8NgeJmnXgTRx1-8Vakhz7NgkA.Nujj611NC6kQ1Nq5D1d5BQ","token_type":"jwt","refresh_token":"eyJ6aXAiOiJERUYiLCJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiUlNBLU9BRVAifQ.jve2r-yYAhdwUFI0ha8jhByskyOlteQuaE8cvEX282TTlIDR29y7OkF3pMLtNEl1A9EfP9vSc1E9fCW3W7UoOqgXZtKrde3VDf2zG6CaFlsyQf8UvaTrXIn1rQY1YgH3q8SGpz64IvfgT2WC53MPpE_337iJvrawAM-KXJbS5dRJG_13J0HDZr2KX2n0j91CbQ9GjYO55oyAly-CNf3JUbe3wll30fabHBE84wiIS9TiILYhxazAHqLhmjJUZQhQSCDMzu8Vuf5j3yDmWTufARl_ctn7AjGLLwkQuocSVCqhVuTOwN2S58AqNcCMEHnhSFxsfFRG2gn4q16h6-ShHQ.5YepOfZxXH8kHaXR.5GFQfnfBVg7KSTKiXTCrb4B4CB-zCIJll2G3kB-vW1ja9uJVuaYSajA-Gs6esal1pqPmA1Jh9V2v3GNfgiDz6Cs0MVqnKxS-3_sdh5NqdmlXUlJ17XXxZ9HhTmA7HBqaxL2fpORW06Gwd2BZNfA1L6pc5fdxIJRnw1IY-YWMaDMR2oH969sM8R_ChLHGXrZHPN0ZkcBufCS4H2dnh6-mbF7fNX5pUwGpyKy2P2fCxOnh4XWuZ5f15wvX7zxDx8-R4bYwWLvElocKqxHlwHwNEJZbAb0kP75dckYIV0hT4g73wfkMsQ5j4CHmAhmQzyqc-WjPM8g36qCMZExZeK-Z-idaUub3NBLEFvGSRrrlvXdvRFg2oqw2JzRFUNg_m2QlhKxuhg.ynbLLTwnfypdGymEmpR2aA","expires_in":2699,"scope":"businessAccountsSbx_aeb43","refresh_expires_in":359999}[/quote:uk7m37b1]
El problema lo tengo para conseguir el cCode :
- abierto Chrome con Shellexecute y la página de identificación de BBVA Connect
- espero a que el usuario rellene su usuario y contraseña
- la página de BBVA Connect redirije a localhost con el code=
Aparece la pantalla que he puesto antes y en ese momento desde el programa debo leer la dirección en una cadena y sacar lo que haya después de code=
No sé como recuperar la dirección en la que está la ventana de Chrome.
|
API Bancaria (SOLUCIONADO)
|
Gabriel,
Usando FindWindow() y una vez tienes el hWnd de la ventana principal, podrias acceder al hWnd del control donde esta la URL si conoces su ID.
Usa Spy++ (te lo instala Visual Studio Community, y es gratuito) para encontrar este valor. Spy++ es muy potente y en unos minutos aprenderás a usarlo.
En cuanto a usar "Microsoft.XMLHTTP", construye el ejemplo FWH\samles\olebrow.prg y selecciona "Microsoft.XMLHTTP.1.0". Este ejemplo de FWH te muestra "todo" lo que ese objeto OLE puede ofrecerte. Prueba a pedirle otras cosas y a ver si aparece la URL <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
API Bancaria (SOLUCIONADO)
|
He instalado spyxx y he localizado la ventana de chrome.
¿Cómo puedo acceder a los controles que contiene ?
[img:3tplsmot]https://i.postimg.cc/bN4j36ZG/spyxx.png[/img:3tplsmot]
|
API Bancaria (SOLUCIONADO)
|
Estás revisando los "threads", selecciona revisar "Windows" (Ctrl+W) desde la primera opción del menú
Lo más sencillo es "Find Window" entonces se te muestra un circulo que has de arrastrar con el ratón y pasarlo por encima de los controles que quieras revisar
|
API Bancaria (SOLUCIONADO)
|
Parece que es una clase propia de Chrome y los controles son simulados.
Intenta por la via del OLE que te he comentado, y si eso también falla, yo lo intentaría con mod_harbour
|
API Bancaria (SOLUCIONADO)
|
Muchas gracias, Antonio. He seguido tu consejo y he probado con el objeto OLE "Shell.Explorer.2" y ya he conseguido que funcione.
Al principio lo intenté con este ActiveX, pero se activaba IE versión 8 y la página de ConnectBBVA no se desplegaba bien.
He encontrado en el foro este mensaje dónde viene el código de la función INTER_APP_WEB_CONFIG, que permite asociar a un ejecutable la versión 11 de IE.
[url:1azuy6zm]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=36913&hilit=INTER_APP_WEB_CONFIG&sid=67fc2483c0a3c659cdf9f225d2a25661[/url:1azuy6zm]
Ya he conseguido abrir la página dónde se identifica el usuario. Activo un oTimer que cada 3 segundos comprueba que se haya identificado correctamente y el servidor haya redirigido a la Url con el "?code=".
El ActiveX tiene la propiedad "Document" y ese objeto a su vez tiene la propiedad "Url" con la que accedo a la dirección del navegador.
[code=fw:1azuy6zm]<div class="fw" id="{CB}" style="font-family: monospace;">oDOM := oActiveX&#<span style="color: #000000;">058</span>;GetProp<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Document"</span> <span style="color: #000000;">)</span><br />cUrl := oDOM:<span style="color: #000000;">Url</span></div>[/code:1azuy6zm]
Voy a depurar el código y lo publicaré aquí.
|
API Bancaria (SOLUCIONADO)
|
Buenas tardes, dejo aquí la versión definitiva en forma de clase.
[code=fw:2pp2n947]<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: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">data</span> oWnd && Ventana Padre<br /> <span style="color: #00C800;">data</span> cNomObjOLE && Nombre del objeto OLE para hacer <span style="color: #0000ff;">GET</span> y POST<br /> <span style="color: #00C800;">data</span> cAppID && Informaci¢n APP creada en BBVAMarket<br /> <span style="color: #00C800;">data</span> cSecretID && Informaci¢n C¢digo secreto de BBVAMarket<br /> <span style="color: #00C800;">data</span> cURL && URL de BBVA<br /> <span style="color: #00C800;">data</span> cRedirect_Uri && Url a la que se redige la respuesta de ConnectBBVA<br /> <span style="color: #00C800;">data</span> cToken && Access_Token devuelto por oAuth<br /> <span style="color: #00C800;">data</span> cCode && Authorization_Code necesario para solicitar access_token<br /> <span style="color: #00C800;">data</span> cFicTok && Nombre de fichero para almacenar Token<br /> <span style="color: #00C800;">data</span> cFicJSon && Nombre de fichero para almacenar respuesta JSon<br /> <span style="color: #00C800;">data</span> oTimer && <span style="color: #0000ff;">Timer</span> para comprobar cada <span style="color: #000000;">3</span> segundos que ha respondido ConnectBBVA<br /><br /> <span style="color: #00C800;">method</span> <span style="color: #00C800;">New</span> <span style="color: #000000;">(</span>oWnd<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">method</span> EXTRACTO <span style="color: #000000;">(</span><span style="color: #000000;">)</span> && Devuelve JSon con los extractos de las cuentas del cliente BBVA<br /> <span style="color: #00C800;">method</span> PEDIR_CODE <span style="color: #000000;">(</span><span style="color: #000000;">)</span> && Si el usuario a rellenado sus datos correctos en ConnecBBVA, rellena ::<span style="color: #000000;">cCode</span><br /> <span style="color: #00C800;">method</span> IniTimer <span style="color: #000000;">(</span> oDlg, oActiveX <span style="color: #000000;">)</span> && Iniciar ::<span style="color: #000000;">oTimer</span><br /> <span style="color: #00C800;">method</span> TENGO_CODE <span style="color: #000000;">(</span> oActiveX <span style="color: #000000;">)</span> && Comprueba que la cUrl contiene en ::<span style="color: #000000;">cCode</span>, lo rellena y devuelve <span style="color: #00C800;">true</span><br /> <span style="color: #00C800;">method</span> PEDIR_TOKEN <span style="color: #000000;">(</span><span style="color: #000000;">)</span> && Petici¢n de access_Token usando ::<span style="color: #000000;">cCode</span> y si hay respuesta devuelve <span style="color: #00C800;">true</span><br /> <span style="color: #00C800;">method</span> PEDIR_EXTRACTO <span style="color: #000000;">(</span><span style="color: #000000;">)</span> && Petici¢n de Extracto usando ::<span style="color: #000000;">cToken</span>, devuelve Json son los datos<br /><span style="color: #00C800;">endclass</span><br /><br /><span style="color: #00C800;">method</span> <span style="color: #00C800;">New</span> <span style="color: #000000;">(</span>oWnd<span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> ::<span style="color: #000000;">oWnd</span> := oWnd<br /> ::<span style="color: #000000;">cNomObjOLE</span> := <span style="color: #ff0000;">"Microsoft.XMLHTTP"</span> && <span style="color: #ff0000;">"WINHTTP.WINHTTPREQUEST.5.1"</span><br /> ::<span style="color: #000000;">cAppID</span> := <span style="color: #ff0000;">''</span> && Hay que darse de alta en BBVAMarket<br /> ::<span style="color: #000000;">cSecretID</span> := <span style="color: #ff0000;">""</span> <br /> ::<span style="color: #000000;">cURL</span> := <span style="color: #ff0000;">"https://connect.bbva.com/token"</span><br /> ::<span style="color: #000000;">cRedirect_Uri</span> := <span style="color: #ff0000;">"http://localhost"</span><br /> ::<span style="color: #000000;">cToken</span> := <span style="color: #ff0000;">""</span><br /> ::<span style="color: #000000;">cCode</span> := <span style="color: #ff0000;">""</span><br /> ::<span style="color: #000000;">cFicTok</span> := <span style="color: #ff0000;">'.<span style="color: #000000;">\T</span>OK_BBV.TXT'</span><br /> ::<span style="color: #000000;">cFicJSon</span> := <span style="color: #ff0000;">'.<span style="color: #000000;">\E</span>XT_BBV.JSON'</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #00C800;">method</span> EXTRACTO <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">PEDIR_CODE</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">PEDIR_TOKEN</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">PEDIR_EXTRACTO</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #00C800;">method</span> PEDIR_CODE <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">local</span> oDlg, oActiveX, nPos, oTimer, oApi<br /><br /> oApi := <span style="color: #00C800;">Self</span><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">from</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">950</span>,<span style="color: #000000;">1000</span> <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Navegar"</span> <span style="color: #0000ff;">pixel</span> ;<br /> <span style="color: #0000ff;">of</span> ::<span style="color: #000000;">oWnd</span><br /><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> ;<br /> <span style="color: #000000;">(</span> oActiveX := ShowPageWeb<span style="color: #000000;">(</span> oDlg, ;<br /> <span style="color: #ff0000;">"https://connect.bbva.com/sandboxconnect?scope="</span> + ;<br /> <span style="color: #ff0000;">"&client_id="</span> + oApi:<span style="color: #000000;">cAppID</span> + ;<br /> <span style="color: #ff0000;">"&redirect_uri="</span> + oApi:<span style="color: #000000;">cRedirect_Uri</span> + ;<br /> <span style="color: #ff0000;">"&response_type=code"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">825</span>, <span style="color: #000000;">950</span> <span style="color: #000000;">)</span> , ;<br /> oApi:<span style="color: #000000;">IniTimer</span> <span style="color: #000000;">(</span>oDlg, oActiveX <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">release</span> ::<span style="color: #000000;">oTimer</span><br /><br /><span style="color: #00C800;">return</span> oDlg:<span style="color: #000000;">nResult</span> = ID_OK<br /><br /><span style="color: #00C800;">method</span> IniTimer <span style="color: #000000;">(</span> oDlg, oActiveX <span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">Timer</span> ::<span style="color: #000000;">oTimer</span> <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">interval</span> <span style="color: #000000;">3000</span> ;<br /> <span style="color: #0000ff;">action</span> <span style="color: #00C800;">IF</span> <span style="color: #000000;">(</span> ::<span style="color: #000000;">TENGO_CODE</span> <span style="color: #000000;">(</span>oActiveX<span style="color: #000000;">)</span>, oDlg:<span style="color: #000000;">End</span> <span style="color: #000000;">(</span>ID_OK<span style="color: #000000;">)</span>, <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">Timer</span> ::<span style="color: #000000;">oTimer</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #00C800;">method</span> TENGO_CODE <span style="color: #000000;">(</span> oActiveX <span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">local</span> oDOM := oActiveX&#<span style="color: #000000;">058</span>;GetProp<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Document"</span> <span style="color: #000000;">)</span>, ; <span style="color: #B900B9;">// -> Object Document</span><br /> Retorno := .f., nPos<br /> <span style="color: #00C800;">local</span> cUrl := oDOM:<span style="color: #000000;">Url</span><br /><br /> <span style="color: #00C800;">if</span> <span style="color: #000000;">(</span>nPos := <span style="color: #00C800;">AT</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"?code="</span>, cUrl <span style="color: #000000;">)</span><span style="color: #000000;">)</span> # <span style="color: #000000;">0</span><br /> ::<span style="color: #000000;">cCode</span> := <span style="color: #0000ff;">SUBSTR</span> <span style="color: #000000;">(</span> cUrl, nPos + <span style="color: #000000;">6</span> <span style="color: #000000;">)</span><br /> Retorno := .t.<br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> Retorno<br /><br /><span style="color: #00C800;">Function</span> ShowPageWeb<span style="color: #000000;">(</span> oParent, cUrl, nT, nL, nH, nW <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oActiveX, oHttp, oActiveXdo<br /><br /> oActiveX := TActiveX<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oParent, <span style="color: #ff0000;">"Shell.Explorer.2"</span>, nT, nL, nW, nH <span style="color: #000000;">)</span><br /><br /> oActivex&#<span style="color: #000000;">058</span>;Silent := .T. <span style="color: #B900B9;">// aqui silence... en el script.</span><br /><br /> oActiveX&#<span style="color: #000000;">058</span>;Do<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Navigate2"</span>, cUrl <span style="color: #000000;">)</span><br /><br /> oActivex&#<span style="color: #000000;">058</span>;SetFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">WHILE</span> oActivex&#<span style="color: #000000;">058</span>;Busy<br /> SysWait<span style="color: #000000;">(</span>.<span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span><br /><br /> oActiveXdo := oActiveX&#<span style="color: #000000;">058</span>;Document<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oHttp := oActiveX&#<span style="color: #000000;">058</span>;GetProp<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Document"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// -> Object Document</span><br /><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oHttp <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Problemas en el Site..."</span>, ;<br /> <span style="color: #ff0000;">"Problemas en el Site..."</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">Return</span> oActiveX<br /><br /><span style="color: #00C800;">method</span> PEDIR_TOKEN <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">local</span> oHttp, cCadena, aRespuesta<br /><br /> <span style="color: #00C800;">try</span><br /> oHttp := CreateObject <span style="color: #000000;">(</span>::<span style="color: #000000;">cNomObjOLE</span><span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error de creacion oHttp'</span><br /> <span style="color: #00C800;">return</span> .t.<br /> end<br /><br /> oHttp:<span style="color: #000000;">Open</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"POST"</span> , ::<span style="color: #000000;">cUrl</span> + <span style="color: #ff0000;">"?grant_type=authorization_code"</span> + ;<br /> <span style="color: #ff0000;">"&code="</span> + ALLTRIM <span style="color: #000000;">(</span>::<span style="color: #000000;">cCode</span><span style="color: #000000;">)</span> + ;<br /> <span style="color: #ff0000;">"&redirect_uri="</span> + ::<span style="color: #000000;">cRedirect_Uri</span>, .f. <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Authorization"</span>, ;<br /> <span style="color: #ff0000;">"Basic "</span> + cMimeEnc<span style="color: #000000;">(</span>::<span style="color: #000000;">cAppID</span> + <span style="color: #ff0000;">':'</span> + ::<span style="color: #000000;">cSecretID</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">try</span><br /> oHttp:<span style="color: #000000;">Send</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error en Send Token'</span><br /> <span style="color: #00C800;">return</span> .t.<br /> end<br /> cCadena := oHttp:<span style="color: #000000;">responseText</span><br />* HB_MemoWrit <span style="color: #000000;">(</span> ::<span style="color: #000000;">cFicTok</span>, cCadena, .f. <span style="color: #000000;">)</span><br /> aRespuesta := hb_jsonDecode <span style="color: #000000;">(</span>cCadena<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> hb_HHaskey <span style="color: #000000;">(</span> aRespuesta, <span style="color: #ff0000;">'access_token'</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">cToken</span> := aRespuesta <span style="color: #000000;">[</span><span style="color: #ff0000;">'access_token'</span><span style="color: #000000;">]</span><br /> <span style="color: #00C800;">endif</span><br /> oHttp := <span style="color: #00C800;">Nil</span><br /><span style="color: #00C800;">return</span> ! EMPTY <span style="color: #000000;">(</span> ::<span style="color: #000000;">cToken</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">method</span> PEDIR_EXTRACTO <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">local</span> oHttp, cUrl, cCadena<br /><br /> cURL := <span style="color: #ff0000;">"https://apis.bbva.com/business-accounts-sbx/v1/statements/aeb43"</span><br /> <span style="color: #00C800;">try</span><br /> oHttp := CreateObject <span style="color: #000000;">(</span>::<span style="color: #000000;">cNomObjOLE</span><span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error de creacion oHttp'</span><br /> <span style="color: #00C800;">return</span> .t.<br /> end<br /> oHttp:<span style="color: #000000;">Open</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"GET"</span> , cUrl, .f. <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Content-Type"</span>, <span style="color: #ff0000;">"application/json"</span><span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Accept"</span>, <span style="color: #ff0000;">"application/json"</span><span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Authorization"</span>, <span style="color: #ff0000;">"jwt "</span> + ::<span style="color: #000000;">cToken</span> <span style="color: #000000;">)</span><br /> oHttp:<span style="color: #000000;">SetRequestHeader</span> <span style="color: #000000;">(</span> <span style="color: #ff0000;">"Host"</span>, <span style="color: #ff0000;">"apis.bbva.com"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">try</span><br /> oHttp:<span style="color: #000000;">Send</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> catch<br /> ? <span style="color: #ff0000;">'Error en Send'</span><br /> <span style="color: #00C800;">return</span> .t.<br /> end<br /> cCadena := oHttp:<span style="color: #000000;">responseText</span><br /> HB_MemoWrit <span style="color: #000000;">(</span> ::<span style="color: #000000;">cFicJSon</span>, cCadena, .f. <span style="color: #000000;">)</span><br /> oHttp := <span style="color: #00C800;">Nil</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Nil</span><br /> </div>[/code:2pp2n947]
La clase se usaría así :
[code=fw:2pp2n947]<div class="fw" id="{CB}" style="font-family: monospace;"> oApiBBVA := TApiBBVA<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">new</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span> && Pasar como parámetro la ventana padre<br /><br /> oApiBBVA:<span style="color: #000000;">EXTRACTO</span> <span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:2pp2n947]
La pantalla de identificación de ConnectBBVA con los datos de usuario de pruebas (contraseña:123456)
[img:2pp2n947]https://i.postimg.cc/KvJBWM5X/Identificacion-BBVA.png[/img:2pp2n947]
El resultado final es el fichero EXT_BBV.JSON con el siguiente contenido :
[quote:2pp2n947]{"result":{"code":200,"info":"OK"},"data":{"AEB43file":"110182241902008000282104202104201000019193174009783CARLOS BANANERO RUIZ \n 2201822419210420210420028972000000000551180000000000ABONO COMP. TRU 30/1/2017 \n 2201822419210420210420021731000000000003500000000000LIQUID.ABONO COM \n 3301822419020080002800010000000025535350001000000002553535100001919317400978 \n 88999999999999999999000035 "}}[/quote:2pp2n947]
|
API Bancaria (SOLUCIONADO)
|
Excelente!
muchas gracias
|
API Bancaria (SOLUCIONADO)
|
Buenísimo ! Felicitaciones ! Gracias
|
API Bancaria (SOLUCIONADO)
|
Hola,
Muy bueno <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->. Me he mirado por encima el code, no lo he probado. Por lo que veo acivas un timer que cada 3 seg. exploras si te llega la cadena ?code ...
Te recomiendo que experimentes con el evento (bOnEvent) que te dará el activeX a cualquier cambio en la pagina, y no tienes que hacer cada 3 segundos, peticiones al ActiveX
Yo ya casi no me acuerdo, pero recuerdo que podias hacer algo asi
[b:m8r8hc53]oActiveX:bOnEvent = { | event, aParams, pParams | EventInfo( event, aParams, pParams ) }[/b:m8r8hc53]
Y luego dentro de la funcion las acciones que quieras ejecutar en funcion del evento
[code=fw:m8r8hc53]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> EventInfo<span style="color: #000000;">(</span> event, aParams, pParams <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> event == <span style="color: #ff0000;">"StatusTextChange"</span> <br /> <span style="color: #00C800;">CASE</span> event == <span style="color: #ff0000;">"ProgressChange"</span><br /> <span style="color: #00C800;">CASE</span> event == <span style="color: #ff0000;">"TitleChange"</span><br /> <span style="color: #00C800;">CASE</span> event == <span style="color: #ff0000;">"DocumentComplete"</span><br />* Aqui quizas podrias chequear tu cadena...<br /> <span style="color: #00C800;">CASE</span> event == ...<br /> <span style="color: #00C800;">ENDCASE</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span></div>[/code:m8r8hc53]
Creo que el código és mas interesante, pero es solo una opinion por si te sirve...
En caso de que no te guste la idea, te recomiendo que dentro tengo_code() -> desactivar/activar timer, porque a veces el ActiveX se te puede encallar varios segundos y te lanzaria el timer otra peticion... (bueno, no se si me explico...)
C.
|
API Bancaria (SOLUCIONADO)
|
Gracias a todos por sus comentarios.
Carles, desconocía el tema de los eventos en ActiveX. Es muy buena idea para evitar que el sistema se colapse con el timer si la web no responde rápidamente.
He quitado el timer de PEDIR_CODE
[code=fw:2k8bv6yh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">method</span> PEDIR_CODE <span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">local</span> oDlg, oActiveX, nPos, oApi, cUrl<br /><br /> cUrl := <span style="color: #ff0000;">"https://connect.bbva.com/sandboxconnect"</span><br /> oApi := <span style="color: #00C800;">Self</span><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">from</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">950</span>,<span style="color: #000000;">1000</span> <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Navegar"</span> <span style="color: #0000ff;">pixel</span> ;<br /> <span style="color: #0000ff;">of</span> ::<span style="color: #000000;">oWnd</span><br /><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> ;<br /> <span style="color: #000000;">(</span> oActiveX := oApi:<span style="color: #000000;">ShowPageWeb</span><span style="color: #000000;">(</span> oDlg, ;<br /> cUrl + <span style="color: #ff0000;">"?scope="</span> + ;<br /> <span style="color: #ff0000;">"&client_id="</span> + oApi:<span style="color: #000000;">cAppID</span> + ;<br /> <span style="color: #ff0000;">"&redirect_uri="</span> + oApi:<span style="color: #000000;">cRedirect_Uri</span> + ;<br /> <span style="color: #ff0000;">"&response_type=code"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">825</span>, <span style="color: #000000;">950</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">return</span> oDlg:<span style="color: #000000;">nResult</span> = ID_OK<br /> </div>[/code:2k8bv6yh]
He pasado la función ShowPageWeb a método de la clase TApiBBVA y le he añadido el control de eventos
[code=fw:2k8bv6yh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">method</span> ShowPageWeb<span style="color: #000000;">(</span> oParent, cUrl, nT, nL, nH, nW <span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">local</span> oActiveX, oHttp, oActiveXdo<br /><br /> oActiveX := TActiveX<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oParent, <span style="color: #ff0000;">"Shell.Explorer.2"</span>, nT, nL, nW, nH <span style="color: #000000;">)</span><br /><br /> oActivex&#<span style="color: #000000;">058</span>;Silent := .T. <span style="color: #B900B9;">// aqui silence... en el script.</span><br /> oActiveX&#<span style="color: #000000;">058</span>;bOnEvent := <span style="color: #000000;">{</span> | event, aParams, pParams | ;<br /> ::<span style="color: #000000;">EventInfo</span><span style="color: #000000;">(</span>event, aParams, pParams, oActiveX, oParent <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oActiveX&#<span style="color: #000000;">058</span>;Do<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Navigate2"</span>, cUrl <span style="color: #000000;">)</span><br /><br /> oActivex&#<span style="color: #000000;">058</span>;SetFocus<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">WHILE</span> oActivex&#<span style="color: #000000;">058</span>;Busy<br /> SysWait<span style="color: #000000;">(</span>.<span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDDO</span><br /><br /> oActiveXdo := oActiveX&#<span style="color: #000000;">058</span>;Document<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oHttp := oActiveX&#<span style="color: #000000;">058</span>;GetProp<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Document"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// -> Object Document</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oHttp <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Problemas en el Site..."</span>, ;<br /> <span style="color: #ff0000;">"Problemas en el Site..."</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> .F. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">Return</span> oActiveX<br /> </div>[/code:2k8bv6yh]
Y el controlador de eventos con todos los que he detectado en las prueba que he realizado." DocumentComplete" es el perfecto, porque se activa al completar la página.
[code=fw:2k8bv6yh]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">method</span> EventInfo<span style="color: #000000;">(</span> event, aParams, pParams, oActiveX, oDlg <span style="color: #000000;">)</span> <span style="color: #00C800;">class</span> TApiBBVA<br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">CASE</span><br /> <span style="color: #00C800;">CASE</span> event == <span style="color: #ff0000;">"PropertyChange"</span> .or. ;<br /> event == <span style="color: #ff0000;">"StatusTextChange"</span> .or. ;<br /> event == <span style="color: #ff0000;">"ProgressChange"</span> .or. ;<br /> event == <span style="color: #ff0000;">"TitleChange"</span> .or. ;<br /> event == <span style="color: #ff0000;">"BeforeNavigate2"</span> .or. ;<br /> event == <span style="color: #ff0000;">"NavigateComplete2"</span> .or. ;<br /> event == <span style="color: #ff0000;">"NavigateError"</span> .or. ;<br /> event == <span style="color: #ff0000;">"BeforeScriptExecute"</span> .or. ;<br /> event == <span style="color: #ff0000;">"DownloadBegin"</span> .or. ;<br /> event == <span style="color: #ff0000;">"DownloadComplete"</span> .or. ;<br /> event == <span style="color: #ff0000;">"CommandStateChange"</span> .or. ;<br /> event == <span style="color: #ff0000;">"FileDownload"</span> .or. ;<br /> event == <span style="color: #ff0000;">"SetSecureLockIcon"</span><br /> <span style="color: #00C800;">CASE</span> event == <span style="color: #ff0000;">"DocumentComplete"</span><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">TENGO_CODE</span> <span style="color: #000000;">(</span>oActiveX<span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">End</span> <span style="color: #000000;">(</span>ID_OK<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">otherwise</span><br /> ? <span style="color: #ff0000;">'Evento'</span>, event<br /> <span style="color: #00C800;">ENDCASE</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2k8bv6yh]
|
API C++ de MySQL
|
Hola,
Alguien tiene las API o funciones en C++ para MySQL que me las pueda proporcionar ?
Gracias
|
API C++ de MySQL
|
-->
|
API Calls
|
Hi All,
I want to retreive a list of available printers using an API Call.
I looked at DllTest, wich does nothing actually and also at DllCall, Wich does not say much either, and I can`t figure out how to do this.
Can anyone help me with the syntax.
Regards,
|
API Google. Ejemplos
|
Muy buenas Compañeros,
abro este hilo para compartir todo lo que sepamos sobre la API de Google, en este caso comparto una pequeña parte de la API de Google Calendar, para poder leer y insertar eventos en nuestros calendarios.
Teneis que configurar las variables myEmail (email de gmail),myPassword (password del email)
Si teneis mas informacion
////////////////////////////////
// Codigo Fuente
////////////////////////////
#include "FiveWin.ch"
Function Main()
local strURL:= "https://www.google.com/accounts/ClientLogin",AuthCode:=""
local strFormData,myEmail:="",myPassword:="",mySource:="project-example-1",cRespone:=""
strFormData = "Email=" + myEmail + "&Passwd=" + myPassword + "&source=" + mySource + "&service=cl"
cResponse:=SendPostToUrl( strURL, strFormData )
AuthCode = Right(cResponse, Len(cResponse) - at("Auth=",cResponse) - 4)
cEventCode:=getEventCode(date(),"Test Event","Event Description","Your Name","Email","Cordoba")
// Añadir un nuevo evento
strURL = "http://www.google.com/calendar/feeds/default/private/full"
strFormData = cEventCode
cResponse:=SendPostToUrl( strURL, strFormData,"application/atom+xml","GoogleLogin auth=" + AuthCode)
// Recivir los calendarios
strURL:="https://www.google.com/calendar/feeds/default/allcalendars/full"
strFormData = cEventCode
cResponse:=SendPostToUrl( strURL, strFormData,"application/atom+xml","GoogleLogin auth=" + AuthCode)
msginfo(cResponse)
Return Nil
Function SendPostToUrl( cUrl, cParams,cContentType,cAuthorization )
Local oOle,cRet:='',uRet
default cContentType:="application/x-www-form-urlencoded"
default cAuthorization:=""
Try
oOle := CreateObject( 'MSXML2.XMLHTTP' )
Catch
oOle := CreateObject( 'Microsoft.XMLHTTP' )
End
oOle:Open( 'POST', cUrl, .f. )
oOle:SetRequestHeader( "Content-Type",cContentType)
if !empty(cAuthorization)
oOle:SetRequestHeader( "Authorization",cAuthorization)
end if
oOle:Send( cParams )
SysRefresh()
#ifdef __XHARBOUR__
cRet := oOle:ResponseBody
#else
AEval(oOle:ResponseBody,{|uRet|cRet+=Chr(uRet)})
#endif
Return cRet
function dtos_format(fecha)
local cadena
if valtype(fecha) = "D"
cadena:=dtos(fecha)
if !empty(cadena)
return substr(cadena,1,4) + "-" + substr(cadena,5,2) + "-" + substr(cadena,7,2)
else
return "0000-00-00"
end if
else
return "0000-00-00"
end if
return "0000-00-00"
static function getEventCode(dDate,cEventName,cEventDescription,cYourName,cEmailAddress,cLocation,cStartTime,cEndTime)
local formattedDate:=""
default cStartTime:="17:00:00",cEndTime:="18:00:00"
// 'change the date into Google's yyyy-mm-dd format
formattedDate = dtos_format(dDate)
getEventCode = "<entry xmlns='http://www.w3.org/2005/Atom'" + CRLF +;
"xmlns:gd='http://schemas.google.com/g/2005'>" + CRLF +;
" <category scheme='http://schemas.google.com/g/2005#kind'" + CRLF +;
"term='http://schemas.google.com/g/2005#event'></category>" + CRLF +;
" <title type='text'>" +cEventName+ "</title>" + CRLF +;
"<content type='text'>" +cEventDescription+ "</content>" + CRLF +;
"<author>" + CRLF +;
"<name>" +cYourName+ "</name>" + CRLF +;
"<email>" +cEmailAddress+ "</email>" + CRLF +;
"</author>" + CRLF +;
"<gd:transparency" + CRLF +;
"value='http://schemas.google.com/g/2005#event.opaque'>" + CRLF +;
"</gd:transparency>" + CRLF +;
"<gd:eventStatus" + CRLF +;
"value='http://schemas.google.com/g/2005#event.confirmed'>" + CRLF +;
"</gd:eventStatus>" + CRLF +;
"<gd:where valueString='" +cLocation+ "'></gd:where>" + CRLF +;
"<gd:when startTime='" + formattedDate + "T" + cStartTime+"'" + CRLF +;
"endTime='" + formattedDate + "T" + cEndTime+"'></gd:when>" + CRLF +;
"</entry>"
return getEventCode
|
API Google. Ejemplos
|
Very good
|
API Google. Ejemplos
|
Gracias por compartirlo! <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
|
API Google. Ejemplos
|
Para eso estamos, para Compartir.
Un Saludo.
|
API Google. Ejemplos
|
Gracias!!
|
API Google. Ejemplos
|
Muchas gracias por compartirlo.
Estas aportaciones "web" dan mucha "vidilla" a nuestros aplicativos desktop.
|
API Google. Ejemplos
|
Ahora estoy con la API de contactos, cuando tenga algo lo comparto.
Un Saludo.
|
API Google. Ejemplos
|
Hello,
Please, could anyone put a translation of this topic in English in the English forum?
Thank you very much in advance.
|
API Google. Ejemplos
|
Application
===========
Path and name: C:\work\errori\google\test.Exe (32 bits)
Size: 1,781,248 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
FiveWin Version: FWHX 12.03
Windows version: 5.1, Build 2600 Service Pack 2
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 01/16/13, 09:22:34
Error description: Error MSXML2.XMLHTTP/3 DISP_E_MEMBERNOTFOUND: SEND
Args:
[ 1] = C Email=silvio.falconi@gmail.com&Passwd=..............&source=project-example-1&service=cl
Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:SEND( 0 )
Called from: test.prg => SENDPOSTTOURL( 46 )
Called from: test.prg => MAIN( 13 )
|
API Google. Ejemplos
|
Silvio el mismo codigo con la FWH901 y FWH1204 me funciona perfectamente, con la FWH1203 no lo he probado pero supongo que debe funcionar.
Postea tu código y lo miramos.
Un Saludo.
|
API Google. Ejemplos
|
[code=fw:1b7zi7uy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Try</span><br />oOle := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">'MSXML2.XMLHTTP'</span> <span style="color: #000000;">)</span><br />Catch<br />oOle := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">'Microsoft.XMLHTTP'</span> <span style="color: #000000;">)</span><br />End<br /> </div>[/code:1b7zi7uy]
también me da error...
<!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
|
API Google. Ejemplos
|
Como usar com proxy?
|
API Google. Ejemplos
|
Silvio,
He encontrado este codigo desde <!-- m --><a class="postlink" href="https://groups.google.com/forum/?fromgroups=#!searchin/harbour-devel/XMLHTTP/harbour-devel/rBXblvfe0nc/He4IETfJ6e0J">https://groups.google.com/forum/?fromgr ... 4IETfJ6e0J</a><!-- m -->
A ver si te puede servir.
[quote:28wffq8m]But, we can use WebServices
I use for government and for my city
see a example for send a xml with many invoices
Load xml
cXML := memoread('nfse\11072432000124_I_20117-27_26072011.xml')
cXML := STRTRAN( cXML, '<?xml version="1.0" encoding="ISO-8859-1"?>', '' )
cXML := STRTRAN( cXML, "<", "<" )
cXML := STRTRAN( cXML, ">", ">" )
Load DOMDocument
xmldom = win_oleCREATEOBJECT("MSXML2.DOMDocument.5.0")
xmldom:async = .T.
xmldom:validateOnParse = .T.
xmldom:resolveExternals := .T.
xmldom:preserveWhiteSpace = .T.
Load XMLHTTP
xmldoc = win_oleCREATEOBJECT("MSXML2.XMLHTTP.6.0")
url := "http://189.1.164.238:8080/issonline/servlet/anfse"
Conect to WebService
xmldoc:open("POST", url, .F.)
xmldoc:setrequestheader("Content-Type","application/x-www-form-urlencoded")
xmldoc:setRequestHeader("SOAPAction", "nfseaction/ANFSE.Execute" )
Making XML for WebService
Texto := '<?xml version="1.0" encoding="ISO-8859-1"?>'
Texto += '<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"';
+ ' xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="nfse" xmlns:wsdlns="nfse" xmlns:tns1="ISS">'
Texto += '<SOAP-ENV:Body>'
Texto += '<wsdlns:Nfse.Execute xmlns:wsdlns="nfse">'
Texto += '<wsdlns:Operacao>1</wsdlns:Operacao>'
Texto += '<wsdlns:Usuario>21312</wsdlns:Usuario>' //
Texto += '<wsdlns:Senha>321321321321</wsdlns:Senha>'
Texto += '<wsdlns:Webxml>'+cXML+''
Texto += '</wsdlns:Webxml>'
Texto += '</wsdlns:Nfse.Execute>'
Texto += '</SOAP-ENV:Body>'
Texto += '</SOAP-ENV:Envelope>'
xmldom:LoadXML(Texto)
IF xmldom:parseError:errorCode = 0
//"XML Load"
ELSE
lcErrorMsg = "Não foi possível carregar o documento pois ele não corresponde ao seu Schema"
lcErrorMsg = lcErrorMsg + " Linha: " + STR(xmldom:parseError:line)
lcErrorMsg = lcErrorMsg + " Caractere na linha: " + STR(xmldom:parseError:linepos)
lcErrorMsg = lcErrorMsg + " Causa do erro: " + xmldom:parseError:reason;
+"code: "+STR(xmldom:parseError:errorCode)
msginfo(lcErrorMsg)
ENDIF
Send data to WebService
xmldoc:send(xmldom:xml)
Get Result
cResult := xmldoc:responseXML:xml
Best Regards,
Fernando Athayde
From Brazil
[/quote:28wffq8m]
Saludos
[quote="Silvio.Falconi":28wffq8m]Application
===========
Path and name: C:\work\errori\google\test.Exe (32 bits)
Size: 1,781,248 bytes
Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
FiveWin Version: FWHX 12.03
Windows version: 5.1, Build 2600 Service Pack 2
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 01/16/13, 09:22:34
Error description: Error MSXML2.XMLHTTP/3 DISP_E_MEMBERNOTFOUND: SEND
Args:
[ 1] = C Email=silvio.falconi@gmail.com&Passwd=..............&source=project-example-1&service=cl
Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:SEND( 0 )
Called from: test.prg => SENDPOSTTOURL( 46 )
Called from: test.prg => MAIN( 13 )[/quote:28wffq8m]
|
API Google. Ejemplos
|
Gracias Softru por compartir.
Funciona perfecto.
Saludos,
Adhemar
|
API Google. Ejemplos
|
Softruz, no sé quien eres, pero te agradezco esta contribución, creo que este es el camino que debemos seguir y recuerdo un mensaje que puse en el 2010, referente a este tema: [url:io35h0v3]http://forums.fivetechsupport.com/viewtopic.php?f=6&t=18785&start=15#p98540[/url:io35h0v3].
Bien, este es un buen punto de partida y ya veo que mis palabras ya tenían sentido, quiero hacerte un par de consultas, a ver si puedes ilustrarme. El ejemplo me ha funcionado perfecto y ya lo tengo implementado para que funcione en mi calendario particular. Una cosa que no he resuelto es el tema del calendario y la contraseña de cada uno, si quiero que se haga de forma automática en cada uno. Te cuento las variantes que tengo a ver si me puedes decir como hacerlo.
He desarrollado un gestor de tareas corporativo con FW y tiro de una base de datos donde tengo los usuarios, supongo que ahí es el lugar indicado para que cada uno se identifique y guarde los datos encriptados de cada uno, a no ser que creas mejor una opción como cookies o algo parecido. Cuando he dado de alta tu ejemplo en mi calendario, me he dado cuenta que también contamos con un gestor de tareas con nuestro gmail. ¿Sabes cual es el método para dar de alta la tarea en este proceso? Supongo que has investigado mas que yo y igual podemos reciclar el ejemplo para dar las tareas en este nuevo calendario. Esto aparece en la parte izquierda de tu gmail y te añade el calendario de tareas pero no es una dirección de correo, tan solo pone lista de tareas cuando vas a Calendar. Tiene su propio gestor, pero me imagino que ahí también lo podemos referenciar para dar de alta tareas desde un programa FW.
PD.: [url:io35h0v3]http://support.google.com/calendar/bin/answer.py?hl=es&answer=106237&topic=1672528&ctx=topic[/url:io35h0v3] Ahí tenemos la información de tareas.
|
API Google. Ejemplos
|
Veo que parece que el calendar y el task son dos cosas completamente distintas, pese a que se presentan en el google calendar. El tasks parece que tiene una API distinta a la del google calendar: [url:1de58cwe]https://developers.google.com/google-apps/tasks/[/url:1de58cwe]. Intentaré volver a el cuando entienda plenamente el google calendar.
Softruz, una cosa a ver si lo entiendo bien, cuando intento recuperar todos los calendarios, me devuelve el siguiente mensaje: [quote:1de58cwe]Valid calendar id must be supplied to favorites list in allcalendars projection[/quote:1de58cwe]
A que crees que se debe esto, ya que yo solo tengo un calendario particular de mi cuenta y recibo otro corporativo, y además el tema del task. No tocaria devolverme todos los calendarios, no sé, en un mensaje. Seguro que algo no hago bien, pero tu alta me la realiza cada vez en mi calendario particular. Estoy traduciendo la API del calendar para enterarme y se ve muy atractiva, pero hay cosas que no acabo de entender.
PD.: Veo que si cambio el codigo y pido los calendarios de los que soy propietario, me da un mensaje con todos menos con el task.[code=fw:1de58cwe]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #B900B9;">//Recivir los calendarios que es propietario</span><br />strURL:=<span style="color: #ff0000;">"https://www.google.com/calendar/feeds/default/owncalendars/full"</span><br />strFormData = cEventCode<br />cResponse:=SendPostToUrl<span style="color: #000000;">(</span> strURL, strFormData,<span style="color: #ff0000;">"application/atom+xml"</span>,<span style="color: #ff0000;">"GoogleLogin auth="</span> + AuthCode<span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>cResponse<span style="color: #000000;">)</span></div>[/code:1de58cwe]
|
API Google. Ejemplos
|
Buenas tardes/noches,
os funciona el ejemplo ?
Error description: Error BASE/2017 Argument error: AEVAL
Args:
[ 1] = C Error=BadAuthentication
Url=https://www.google.com/accounts/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbs1KwuanYVX57I9skPc7lfZZ9qo1K2XspKkXVZ7ujC8HankbPNodlMzjTe5X_PCD8iIoMw1Npuk4qe4eMR0yvF8OAe-Jy0PPjRpraPI9eA6K5oFBx-IPOlHSiz_4CPZe4nDCBOUTqDexSbGlwpqBv8Iv-QOikQL9YwXMtOlQoIOR-oALtbUVmg2VjSty_79dvYpDPXLI4eewLyy12ZP7dlwU0TXOA
Info=WebLoginRequired
[ 2] = B {|| ... }
Stack Calls
===========
Called from: => AEVAL( 0 )
Called from: calendar.prg => SENDPOSTTOURL( 46 )
Called from: calendar.prg => MAIN( 7 )
Muchas gracias.
Saludos
|
API Google. Ejemplos
|
Felix, primero tienes que utilizar una cuenta Google o cuenta dependiendo de google. Nosotros tenemos el correo corporativo en google fíjate elimino mi password que tendrias que poner el tuyo. Mi cuenta es <!-- e --><a href="mailto:agonzalez@calvia.com">agonzalez@calvia.com</a><!-- e --> y funciona bien ya que es igual que si fuera una cuenta gmail. El dominio por así decirlo redirigido lo puedes contratar en google y asi tienes todas las funcionalidades como <!-- e --><a href="mailto:agonzalez@gmail.com">agonzalez@gmail.com</a><!-- e --> esta te la dan gratis pero si quieres hacer uno de tu empresa te cuesta dinero, para eso tienes que hablar con algún comercial, pero después tienes un montón de ventajas (la site, el drive, el calendar y mil cosas mas de google) creo que ha sido el mejor cambio que hemos hecho en mi empresa. Si quieres mas información dime cosas ya que eso marca mucho la diferencia con los correos corporativos que no son de google.
Los msginfo deberían devolverte una pantalla con un montón de códigos ilegibles.
[code=fw:2cw71ax3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">////////////////////////////////</span><br /><span style="color: #B900B9;">// Codigo Fuente</span><br /><span style="color: #B900B9;">////////////////////////////</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//Autenticación</span><br /><span style="color: #00C800;">local</span> strURL:= <span style="color: #ff0000;">"https://www.google.com/accounts/ClientLogin"</span>,AuthCode:=<span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">local</span> strFormData,myEmail:=<span style="color: #ff0000;">"agonzalez@calvia.com"</span>,myPassword:=<span style="color: #ff0000;">"aquielpasword"</span>,mySource:=<span style="color: #ff0000;">"project-example-1"</span>,cRespone:=<span style="color: #ff0000;">""</span><br />strFormData = <span style="color: #ff0000;">"Email="</span> + myEmail + <span style="color: #ff0000;">"&Passwd="</span> + myPassword + <span style="color: #ff0000;">"&source="</span> + mySource + <span style="color: #ff0000;">"&service=cl"</span><br />cResponse:=SendPostToUrl<span style="color: #000000;">(</span> strURL, strFormData <span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>cResponse<span style="color: #000000;">)</span><br />AuthCode = <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span>cResponse, Len<span style="color: #000000;">(</span>cResponse<span style="color: #000000;">)</span> - <span style="color: #00C800;">at</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Auth="</span>,cResponse<span style="color: #000000;">)</span> - <span style="color: #000000;">4</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>AuthCode<span style="color: #000000;">)</span><br /><br />cEventCode:=getEventCode<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #ff0000;">"Test Event"</span>,<span style="color: #ff0000;">"Event Description"</span>,<span style="color: #ff0000;">"Your Name"</span>,<span style="color: #ff0000;">"Email"</span>,<span style="color: #ff0000;">"Cordoba"</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>cEventCode<span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// Añadir un nuevo evento</span><br />strURL = <span style="color: #ff0000;">"http://www.google.com/calendar/feeds/default/private/full"</span><br />strFormData = cEventCode<br />cResponse:=SendPostToUrl<span style="color: #000000;">(</span> strURL, strFormData,<span style="color: #ff0000;">"application/atom+xml"</span>,<span style="color: #ff0000;">"GoogleLogin auth="</span> + AuthCode<span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// Recivir los calendarios</span><br />strURL:=<span style="color: #ff0000;">"https://www.google.com/calendar/feeds/default/allcalendars/full"</span><br />strFormData = cEventCode<br />cResponse:=SendPostToUrl<span style="color: #000000;">(</span> strURL, strFormData,<span style="color: #ff0000;">"application/atom+xml"</span>,<span style="color: #ff0000;">"GoogleLogin auth="</span> + AuthCode<span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>cResponse<span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//Recivir los calendarios que es propietario</span><br />strURL:=<span style="color: #ff0000;">"https://www.google.com/calendar/feeds/default/owncalendars/full"</span><br />strFormData = cEventCode<br />cResponse:=SendPostToUrl<span style="color: #000000;">(</span> strURL, strFormData,<span style="color: #ff0000;">"application/atom+xml"</span>,<span style="color: #ff0000;">"GoogleLogin auth="</span> + AuthCode<span style="color: #000000;">)</span><br /><span style="color: #0000ff;">msginfo</span><span style="color: #000000;">(</span>cResponse<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">Nil</span><br /><br /><span style="color: #00C800;">Function</span> SendPostToUrl<span style="color: #000000;">(</span> cUrl, cParams,cContentType,cAuthorization <span style="color: #000000;">)</span><br /><span style="color: #00C800;">Local</span> oOle,cRet:=<span style="color: #ff0000;">''</span>,uRet<br /><span style="color: #00C800;">default</span> cContentType:=<span style="color: #ff0000;">"application/x-www-form-urlencoded"</span><br /><span style="color: #00C800;">default</span> cAuthorization:=<span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">Try</span><br />oOle := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">'MSXML2.XMLHTTP'</span> <span style="color: #000000;">)</span><br />Catch<br />oOle := CreateObject<span style="color: #000000;">(</span> <span style="color: #ff0000;">'Microsoft.XMLHTTP'</span> <span style="color: #000000;">)</span><br />End<br />oOle:<span style="color: #000000;">Open</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">'POST'</span>, cUrl, .f. <span style="color: #000000;">)</span><br /><br />oOle:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Content-Type"</span>,cContentType<span style="color: #000000;">)</span><br /><span style="color: #00C800;">if</span> !empty<span style="color: #000000;">(</span>cAuthorization<span style="color: #000000;">)</span><br />oOle:<span style="color: #000000;">SetRequestHeader</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Authorization"</span>,cAuthorization<span style="color: #000000;">)</span><br />end <span style="color: #00C800;">if</span><br /><br />oOle:<span style="color: #000000;">Send</span><span style="color: #000000;">(</span> cParams <span style="color: #000000;">)</span><br />SysRefresh<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br />#ifdef __XHARBOUR__<br />cRet := oOle:<span style="color: #000000;">ResponseBody</span><br />#else<br />AEval<span style="color: #000000;">(</span>oOle:<span style="color: #000000;">ResponseBody</span>,<span style="color: #000000;">{</span>|uRet|cRet+=Chr<span style="color: #000000;">(</span>uRet<span style="color: #000000;">)</span><span style="color: #000000;">}</span><span style="color: #000000;">)</span><br />#endif<br /><span style="color: #00C800;">Return</span> cRet<br /><br /><span style="color: #00C800;">function</span> dtos_format<span style="color: #000000;">(</span>fecha<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> cadena<br /><span style="color: #00C800;">if</span> valtype<span style="color: #000000;">(</span>fecha<span style="color: #000000;">)</span> = <span style="color: #ff0000;">"D"</span><br />cadena:=dtos<span style="color: #000000;">(</span>fecha<span style="color: #000000;">)</span><br /><span style="color: #00C800;">if</span> !empty<span style="color: #000000;">(</span>cadena<span style="color: #000000;">)</span><br /><span style="color: #00C800;">return</span> <span style="color: #0000ff;">substr</span><span style="color: #000000;">(</span>cadena,<span style="color: #000000;">1</span>,<span style="color: #000000;">4</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">"-"</span> + <span style="color: #0000ff;">substr</span><span style="color: #000000;">(</span>cadena,<span style="color: #000000;">5</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span> + <span style="color: #ff0000;">"-"</span> + <span style="color: #0000ff;">substr</span><span style="color: #000000;">(</span>cadena,<span style="color: #000000;">7</span>,<span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">else</span><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"0000-00-00"</span><br />end <span style="color: #00C800;">if</span><br /><span style="color: #00C800;">else</span><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"0000-00-00"</span><br />end <span style="color: #00C800;">if</span><br /><span style="color: #00C800;">return</span> <span style="color: #ff0000;">"0000-00-00"</span><br /><br /><span style="color: #00C800;">static</span> <span style="color: #00C800;">function</span> getEventCode<span style="color: #000000;">(</span>dDate,cEventName,cEventDescription,cYourName,cEmailAddress,cLocation,cStartTime,cEndTime<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> formattedDate:=<span style="color: #ff0000;">""</span><br /><span style="color: #00C800;">default</span> cStartTime:=<span style="color: #ff0000;">"17:00:00"</span>,cEndTime:=<span style="color: #ff0000;">"18:00:00"</span><br /><br /><span style="color: #B900B9;">// 'change the date into Google's yyyy-mm-dd format</span><br />formattedDate = dtos_format<span style="color: #000000;">(</span>dDate<span style="color: #000000;">)</span><br /><br />getEventCode = <span style="color: #ff0000;">"<entry xmlns='http://www.w3.org/2005/Atom'"</span> + CRLF +;<br /><span style="color: #ff0000;">"xmlns:gd='http://schemas.google.com/g/2005'>"</span> + CRLF +;<br /><span style="color: #ff0000;">" <category scheme='http://schemas.google.com/g/2005#kind'"</span> + CRLF +;<br /><span style="color: #ff0000;">"term='http://schemas.google.com/g/2005#event'></category>"</span> + CRLF +;<br /><span style="color: #ff0000;">" <title type='text'>"</span> +cEventName+ <span style="color: #ff0000;">"</title>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<content type='text'>"</span> +cEventDescription+ <span style="color: #ff0000;">"</content>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<author>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<name>"</span> +cYourName+ <span style="color: #ff0000;">"</name>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<email>"</span> +cEmailAddress+ <span style="color: #ff0000;">"</email>"</span> + CRLF +;<br /><span style="color: #ff0000;">"</author>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<gd:transparency"</span> + CRLF +;<br /><span style="color: #ff0000;">"value='http://schemas.google.com/g/2005#event.opaque'>"</span> + CRLF +;<br /><span style="color: #ff0000;">"</gd:transparency>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<gd:eventStatus"</span> + CRLF +;<br /><span style="color: #ff0000;">"value='http://schemas.google.com/g/2005#event.confirmed'>"</span> + CRLF +;<br /><span style="color: #ff0000;">"</gd:eventStatus>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<gd:where valueString='"</span> +cLocation+ <span style="color: #ff0000;">"'></gd:where>"</span> + CRLF +;<br /><span style="color: #ff0000;">"<gd:when startTime='"</span> + formattedDate + <span style="color: #ff0000;">"T"</span> + cStartTime+<span style="color: #ff0000;">"'"</span> + CRLF +;<br /><span style="color: #ff0000;">"endTime='"</span> + formattedDate + <span style="color: #ff0000;">"T"</span> + cEndTime+<span style="color: #ff0000;">"'></gd:when>"</span> + CRLF +;<br /><span style="color: #ff0000;">"</entry>"</span><br /><span style="color: #00C800;">return</span> getEventCode<br /> </div>[/code:2cw71ax3]
|
API Google. Ejemplos
|
Andrés,
me sigue dando el mismo error.
Muchas gracias.
Saludos
|
API Google. Ejemplos
|
Felix, a mi me da el mismo error que a ti
En mi cuenta de correo recibo un mail indicándome que alguien ha intentado acceder a la cuenta
Andres, sabes por qué puede ocurrir esto?
|
API Google. Ejemplos
|
Buenos días,
creo que necesitamos una clave para poder usar las APIs de Google. A los que les haya funcionado el ejemplo, lo podriais probar ahora ?
Creo que ha cambiado la política de Google y ahora se necesita una clave para usar las APIs.
Muchas gracias.
Saludos
|
API Google. Ejemplos
|
Buenas
Creo que tienen que tner activado esto en sus cuentas
<!-- m --><a class="postlink" href="https://www.google.com/settings/security/lesssecureapps">https://www.google.com/settings/security/lesssecureapps</a><!-- m -->
Pero igual me da error
[code=fw:38e24mnf]<div class="fw" id="{CB}" style="font-family: monospace;">Application<br />===========<br /> Path and <span style="color: #0000ff;">name</span>: <span style="color: #000000;">D</span>:\Test\Fivedit\noname.exe <span style="color: #000000;">(</span><span style="color: #000000;">32</span> bits<span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">Size</span>: <span style="color: #000000;">3</span>,<span style="color: #000000;">023</span>,<span style="color: #000000;">360</span> bytes<br /> Compiler version: <span style="color: #000000;">Harbour</span> <span style="color: #000000;">3.2</span>.0dev <span style="color: #000000;">(</span>r1412151448<span style="color: #000000;">)</span><br /> FiveWin Version: <span style="color: #000000;">FWH</span> <span style="color: #000000;">15.01</span><br /> Windows version: <span style="color: #000000;">6.1</span>, Build <span style="color: #000000;">7600</span> <br /><br /> Time <span style="color: #0000ff;">from</span> start: <span style="color: #000000;">0</span> hours <span style="color: #000000;">0</span> mins <span style="color: #000000;">2</span> secs <br /> Error occurred <span style="color: #00C800;">at</span>: <span style="color: #000000;">01</span>/<span style="color: #000000;">30</span>/<span style="color: #000000;">15</span>, <span style="color: #000000;">10</span>:<span style="color: #000000;">40</span>:<span style="color: #000000;">35</span><br /> Error description: <span style="color: #000000;">Error</span> BASE/<span style="color: #000000;">2017</span> Argument error: <span style="color: #000000;">AEVAL</span><br /> Args:<br /> <span style="color: #000000;">[</span> <span style="color: #000000;">1</span><span style="color: #000000;">]</span> = C SID=DQAAACEBAAAG0-gguZW0_71c9quEUxxSk_MGCYhEUtocQ5eF0UZmYYYKKONL6nIa43AcL27bUTaOAYetvLDzv12jWqZ52Y2tRFCRYyWt6WyXVWNW0NNBD4UjxeWK0DZiyHCgiWySELU2VfHBOrU2TwPiiOkGODX1gb_mLkiNTQg8pTc6O4FH0rXNxnHbfY1i_9jMaylSqIl7SXSPEz5wY7TqvNyVGFHqfrVew66CF9r3b_jio9gi18QL5TKFcWfVNKAj81M4RKCWaydHzIsQyYWGzzuKg6j1wArDgXb7znNWS5smY6iC7hlG-tTVXXTZGxp_51IwHoKCMfNWrT97r9Lq2SXqrS21zxuUsu9sw6fhOx0wzc_O9cMXfWfgzKlqrYtsvjGpDMFfAa4vHQ-ZRZ-5gPs57Qd9<br />LSID=DQAAACMBAACqOrCtkd8NE2ndG2Tn8B3iV5p-Jul7ffYvw2Wc8Tu7reYt02_fg0KGeVOmirNRJpxCKn8drmKHtpUoDnIvLRZtOjtdol5BGaRNxm7rkGvFHVgso5Z2cG5uuHlob-ZtZ4wOaG7_7Kr583QuPch_DL2nUipf9b8MQlbu9Qp0QEVj9NsQaIbE7M9kboQNtJuV0ONusvrKSK9YMp5eTJCFBvFd6G3-MD3lPdCrhQCNu-SDn2JjvIQ9pMRYaYDnkEmW3-sRxJfhnUg25janoB39PAHMt58KPEIQgPoRZwWFpxKYWlICq2jeif37ql7y_Hf7M9s9q53PpXPTz5-LzbdF3kl8Obnf1nMrwF-YU314x-SaMG9Glni9JjvM45sAd3JatPbreftDEcDt9gzZchgyTAID<br />Auth=DQAAACMBAACqOrCtkd8NE2ndG2Tn8B3iV5p-Jul7ffYvw2Wc8Tu7reYt02_fg0KGeVOmirNRJpxCKn8drmKHtpUoDnIvLRZtOjtdol5BGaRNxm7rkGvFHZRWfwg-JOMDNPf_aVQWWTzUOU8RLOYXU4oTNORmfewgVnWI0Lxu1M2vTZLurwUMks1EvCRInFEpHAw920tPe13qtbVu7Mhsl3o2nsTYrUzbW8AtD130cID7RMsezDufQtxuXpQa4KyGKuvszHGkPh4hzKajQAo6mcF4BxPnu4NBU4jP2m9YOLka_VT3d6Dpoos0fWifZQbrfM5AG6Q9AAlolc_uGK-pgo-wNqDJTgYrClnrcFBJNsJZqeyQfLo2p_TufKZSLmxqzpz3fhiK-7Zd1ZeiFUZbdpNoTkLyL7wy<br /><br /> <span style="color: #000000;">[</span> <span style="color: #000000;">2</span><span style="color: #000000;">]</span> = B <span style="color: #000000;">{</span>|| ... <span style="color: #000000;">}</span><br /><br />Stack Calls<br />===========<br /> Called <span style="color: #0000ff;">from</span>: => AEVAL<span style="color: #000000;">(</span> <span style="color: #000000;">0</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">noname</span>.prg => SENDPOSTTOURL<span style="color: #000000;">(</span> <span style="color: #000000;">55</span> <span style="color: #000000;">)</span><br /> Called <span style="color: #0000ff;">from</span>: <span style="color: #000000;">noname</span>.prg => MAIN<span style="color: #000000;">(</span> <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /> </div>[/code:38e24mnf]
Se supone que oOle:ResponseBody deve ser un array pero es una cadena.
|
API Google. Ejemplos
|
Ya lo he intentado tambien
Es porque hay que darse de alta como usuario, te dan 60 dias de prueba ( bueno 300 $ de credito ) y luego decides si te quedas o no
O por lo menos eso es lo que he entendido
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.