kapiaba Posted May 7, 2015 Report Share Posted May 7, 2015 Parece que o "Modo de Exibição de Compatibilidade" do Internet Explorer está ativado. O Google Maps não funcionará corretamente até que este recurso seja desativado ou entao: Quando eu entro pela segunda ou terceira vez... da isso: Parece que você está usando um navegador incompatível. // Ideia original: // http://www.pctoledo.com.br/forum/viewtopic.php?f=1&t=15482 // Special thanks ao autor do topico: Billy1943. #Include "FiveWin.ch" STATIC lSaida := .F., lLigaBotao := .F. FUNCTION Google_Rua() LOCAL oWnd, oActiveX, oFnt, oFont, nKey := VK_RETURN LOCAL cEvents := "" LOCAL oMapa, mde_uf, mpara_uf, mde_cid, mpara_cid, mde_rua, mpara_rua LOCAL oGet1, oGet2, oGet3, oGet4, oBusca, oSaida, oDlg, msearch /* mpara_uf := "SP" // uf mpara_cid := "SAO PAULO"//cidade mpara_rua := "RUA ROCHA"//rua */ mpara_uf := space(2) mpara_cid := space(40) // PINDAMONHANGABA mpara_rua := space(50) SetGetColorFocus() SkinButtons() DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 0, 14 BOLD //UnderLine DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -14 BOLD //UnderLine DEFINE DIALOG oDlg TITLE "Buscar Rua no Google Maps" ; FROM 0,0 TO 304, 480 PIXEL COLORS CLR_BLACK, CLR_WHITE TRANSPARENT oDlg:lHelpIcon := .F. Set( _SET_INSERT, ! Set( _SET_INSERT ) ) //@ 11, 01 say "PROCURAR :" @ 1, 2 SAY "PROCURAR A RUA:" OF oDlg UPDATE FONT oFont ; COLORS CLR_HRED, CLR_WHITE //@ 13, 01 say "Estado ..:" get mpara_uf picture "@!" @ 2, 2 SAY "Estado ..:" OF oDlg UPDATE FONT oFnt ; COLORS CLR_HBLUE, CLR_WHITE @ 30, 50 GET oGet1 VAR mpara_uf OF oDlg PIXEL SIZE 25, 12 PICTURE "@!" ; CENTER UPDATE FONT oFnt COLORS CLR_BLACK, CLR_WHITE ; VALID VALIDA_GET1( mpara_uf ) //@ 14, 01 say "Cidade ..:" get mpara_cid picture "@!" @ 3, 2 SAY "Cidade ..:" OF oDlg UPDATE FONT oFnt ; COLORS CLR_HBLUE, CLR_WHITE @ 45, 50 GET oGet2 VAR mpara_cid OF oDlg PIXEL SIZE 175, 12 PICTURE "@!" ; UPDATE FONT oFnt COLORS CLR_BLACK, CLR_WHITE ; VALID VALIDA_GET2( mpara_cid ) //@ 15, 01 say "Endere‡o :" get mpara_rua picture "@!" @ 4, 2 SAY OemToAnsi( "Endere‡o:" ) OF oDlg UPDATE FONT oFnt ; COLORS CLR_HBLUE, CLR_WHITE @ 65, 50 GET oGet3 VAR mpara_rua OF oDlg PIXEL SIZE 185, 12 PICTURE "@!" ; UPDATE FONT oFnt COLORS CLR_BLACK, CLR_WHITE ; VALID VALIDA_BOTAO( mpara_rua, oBusca ) @ 7.00, 13 BUTTON oBusca PROMPT "&Buscar" OF oDlg ; WHEN( lLigaBotao ) ; ACTION ( lSaida := .T., nKey := VK_RETURN, oDlg:End() ) oBusca:cToolTip := "Pesquisar a Rua no Google Maps" @ 7.00, 21 BUTTON oSaida PROMPT "&Saida" OF oDlg ; ACTION ( lSaida := .T., nKey := VK_ESCAPE, oDlg:End() ) CANCEL oSaida:cToolTip := "Saida - Exit - Cancelar" SET FONT OF oBusca TO oFont SET FONT OF oSaida TO oFont //read ACTIVATE DIALOG oDlg CENTERED ; VALID( lSaida ) oFnt:End() oFont:End() Set( _SET_INSERT, ! Set( _SET_INSERT ) ) DO CASE CASE nKey == VK_ESCAPE .OR. GETKEYSTATE( VK_ESCAPE ) lSaida := .F. lLigaBotao := .F. RETURN NIL ENDCASE // By Billy1943 - Forum PC Toledo. Ideia Original. Agradecimentos. mpara_uf := alltrim( mpara_uf ) mpara_cid := alltrim( mpara_cid ) mpara_rua := alltrim( mpara_rua ) msearch := mpara_rua + " " + mpara_cid + " " + mpara_uf DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" oActiveX = TActiveX():New( oWnd, "Shell.Explorer" ) oActivex:Silent := .T. // Para Evitar: Erro de Script na Pagina. oWnd:oClient = oActiveX // To fill the entire window surface // funciona assim /* oActiveX:Navigate( "https://google.com.br/search?q=" + msearch + "&oq=" + ; msearch + "&aqs=chrome" ) */ // Erro de Script na Pagina? // https://www.google.com.br/maps/place // gerando erro de navegador antigo. ????? oActiveX:Navigate( "https://www.google.com.br/maps/place/" + msearch ) //oActiveX:bOnEvent = { | event, aParams, pParams | cEvents += EventInfo( event, aParams, pParams, oActiveX ) } ACTIVATE WINDOW oWnd MAXIMIZED /* ; // Nao quero editar nada. VALID ( MemoEdit( cEvents ), .t. ) */ RETURN NIL FUNCTION VALIDA_GET1( cmpara_uf ) IF GETASYNCKEY( VK_UP ) // Para nao perder o foco do dialgo RETURN( .F. ) ENDIF IF EMPTY( cmpara_uf ) MsgInfo( OemToAnsi( "OPERA€ÇO INVµLIDA! " )+CRLF+ ; OemToAnsi( "DIGITIE O NOME DA UF... " )+CRLF+ ; OemToAnsi( "TECLE <ENTER> PARA CONTINUAR..." ), ; OemToAnsi( "OPERA€ÇO INVµLIDA! " ) ) lLigaBotao := .F. RETURN( .F. ) ENDIF RETURN( .T. ) FUNCTION VALIDA_GET2( cmpara_cid ) IF EMPTY( cmpara_cid ) MsgInfo( OemToAnsi( "OPERA€ÇO INVµLIDA! " )+CRLF+ ; OemToAnsi( "DIGITIE O NOME DA CIDADE... " )+CRLF+ ; OemToAnsi( "TECLE <ENTER> PARA CONTINUAR..." ), ; OemToAnsi( "OPERA€ÇO INVµLIDA! " ) ) lLigaBotao := .F. RETURN( .F. ) ENDIF RETURN( .T. ) FUNCTION VALIDA_BOTAO( cmpara_rua, oBusca ) IF EMPTY( cmpara_rua ) MsgInfo( OemToAnsi( "OPERA€ÇO INVµLIDA! " )+CRLF+ ; OemToAnsi( "DIGITIE O NOME DA RUA... " )+CRLF+ ; OemToAnsi( "TECLE <ENTER> PARA CONTINUAR..." ), ; OemToAnsi( "OPERA€ÇO INVµLIDA! " ) ) lLigaBotao := .F. RETURN( .F. ) ENDIF // TUDO NORMAL, VAI BUSCAR NO GOOGLE lLigaBotao := .T. oBusca:Enable() oBusca:Refresh() RETURN( .T. ) FUNCTION EventInfo( event, aParams, pParams, oActiveX ) local cMsg := "Event: " + cValToChar( event ) + CRLF local n cMsg += "Params: " + CRLF for n = 1 to Len( aParams ) cMsg += cValToChar( aParams[ n ] ) + CRLF next if event == "BeforeNavigate2" // MsgInfo( aParams[ 2 ] ) // SetEventParam( pParams, 7, .t. ) // Comment this to allow navigation endif RETURN cMsg + CRLF // END OF PROGRAM O que pode ser? ja fiz a limpeza de cookies e o diabo a 4 com o cceaner e nada. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 7, 2015 Author Report Share Posted May 7, 2015 https://support.google.com/mail/answer/181472?hl=pt-BR Ma se eu remover o gopgle, <afferou-se> kkkkkkkkkkkk Quote Link to comment Share on other sites More sharing options...
Ladinilson Posted May 7, 2015 Report Share Posted May 7, 2015 O problema esta no cookie criado depois, na pasta <nome do computador>/AppData/Local/Microsoft/Windows/Temporary Internet Files Alguém sabe como deveria ser excluído este arquivo antes ou depois na rotina? FWH 8.12/ xHB 1.1.0 / Pelles Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 7, 2015 Author Report Share Posted May 7, 2015 Galera, porque eu não consigo excluir um arquivo aqui: C:\Users\user\AppData\Local\Microsoft\Windows\Temporary Internet Files Os Cookies estão aqui... mas que mierda. Phodeo: http://translate.google.com.br/translate?hl=pt-BR&sl=en&u=https://community.f-secure.com/t5/Security-for-PC/Cleaning-temporary-Internet/ta-p/18280&prev=search kkkkkkkkkkkkkkkkkkkkkkk Quote Link to comment Share on other sites More sharing options...
Ladinilson Posted May 7, 2015 Report Share Posted May 7, 2015 João será que perguntando ao Antonio ele teria uma linha de comando para isso? Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 7, 2015 Author Report Share Posted May 7, 2015 Creio que não, pois nem o IF FILE(....) "Enxerga" o condenado, a não ser que conseguissemos tirar o ATTRIB da pasta, como? Ai, o programa o "Enxergaria" e ai DELETEFILE( cFileCookie ) tendeu? IF FILE( "C:\Users\user\AppData\Local\Microsoft\Windows\Temporary Internet Files\cookie:user@google.com/" ) cCookieUser := ( "C:\Users\user\AppData\Local\Microsoft\Windows\Temporary Internet Files\cookie:user@google.com" ) ? cCookieUser DELETEFILE( cCookieUser ) ENDIF Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 7, 2015 Author Report Share Posted May 7, 2015 Assim funciona, mas se clickar na imagem, quebra. oActiveX:Navigate( "https://google.com.br/search?q=" + msearch + "&oq=" + ; ALLTRIM( msearch ) + "&aqs=chrome" ) PQP!! KKKKKKKKKKKKKKKKK Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 7, 2015 Author Report Share Posted May 7, 2015 Simplesmente este cookie do kpeta derruba a página: abs. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted May 7, 2015 Author Report Share Posted May 7, 2015 http://windows.microsoft.com/pt-br/windows-vista/block-or-allow-cookies Não entra mais cookies do google, mas tem mais alguma coisa que quebra. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.