sistem Posted March 17, 2016 Report Share Posted March 17, 2016 a Ronaldbuch 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 10, 2018 Report Share Posted August 10, 2018 #include "FiveWin.ch" #Define CLR_GET1 CLR_BLACK #Define CLR_GET2 CLR_WHITE FUNCTION Telegram() LOCAL oDlg, oFont, oFont2, lEnvia := .F. , cMsg := Space( 500 ), cUrl, ; aArray, oHost, oBtn, oSay, x1 LOCAL cToken := "AQUI COLOQUE SEU TOKEN", cChat_id := "AQUI CHAT ID" LOCAL xMsg := "*AQUI SUA MSG*%0A" + ; "MAIS MSG%0A" LOCAL oMsg, Erro DEFINE FONT oFont NAME "Lucida Console" SIZE 0, - 14 DEFINE FONT oFont2 NAME "Lucida Console" SIZE 0, - 10 DEFINE DIALOG oDlg FROM 4, 4 TO 8, 90 TITLE "msg para bot Telegram" ; COLOR CLR_BLACK, CLR_WHITE TRANSPARENT oDlg:lHelpIcon := .F. Set( _SET_INSERT, ! Set( _SET_INSERT ) ) @ 4, 6 GET oMsg VAR cMsg PIXEL OF oDlg COLOR CLR_GET1, CLR_GET2 ; SIZE 290, 16 FONT oFont CUEBANNER "Sua mensagem aqui" @ 4, 300 BUTTON oBtn PROMPT( "Enviar" ) PIXEL OF oDlg SIZE 34, 16 ; ACTION ( lEnvia := .T. , oDlg:End() ) CANCEL ACTIVATE DIALOG oDlg CENTERED ON INIT oMsg:SetFocus() //oBtn:SetFocus() Set( _SET_INSERT, ! Set( _SET_INSERT ) ) oFont:End() oFont2:End() IF lEnvia .AND. !Empty( cMsg ) cUrl := "https://api.telegram.org/bot" + cToken + "/sendMessage?chat_id=" + cChat_id + "&parse_mode=Markdown&text=" + xMsg + cMsg Try oHost := CreateObject( 'MSXML2.ServerXMLHTTP.6.0' ) Catch erro ? erro:Description RETURN nil End oHost:open( 'GET', cUrl, .F. ) oHost:send() IF oHost:Status != 200 MsgStop( Alltrim( STR(oHost:Status ) ) + " - " + oHost:StatusText , "Erro" ) RETURN nil ENDIF WHILE oHost:readyState != 4 oHost:WaitForResponse( 1000 ) End x1 := hb_jsondecode( oHost:responseText, @aArray ) IF aArray == nil MsgStop( "Erro ao retornar os dados. Tente novamente." ) RETURN nil ENDIF IF aArray['ok'] = .F. MsgStop( "Erro no envio da messagem.", "Aviso!" ) ELSE MsgInfo( "Sucesso no envio da messagem.", "Aviso!" ) ENDIF ENDIF RETURN nil Quote Link to comment Share on other sites More sharing options...
Jorge Andrade Posted August 13, 2018 Report Share Posted August 13, 2018 ??? João explique pq vc repetiu sem nenhuma observação? []s, Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 14, 2018 Report Share Posted August 14, 2018 ??? João explique pq vc repetiu sem nenhuma observação? []s, Compare: http://forums.fivetechsupport.com/viewtopic.php?f=6&t=35945 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 14, 2018 Report Share Posted August 14, 2018 sputnik Antigamente, tú era o <Sistem> não era? Fiquei mais confuso que kxorro em dia de mudança, e acho que você está no meu skype com seu nome veradeiro, ou tô errado? Rone? kkkkkkkkkkkkkkkkk Quote Link to comment Share on other sites More sharing options...
Jorge Andrade Posted August 14, 2018 Report Share Posted August 14, 2018 Não me confunda piolho ahauahuaua kapiaba 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 14, 2018 Report Share Posted August 14, 2018 O Rone é o Theotokos... eu acho... kkkkkkkkkkkkkkkkkkkkkk, ke confusão da gota serena. Quote Link to comment Share on other sites More sharing options...
Theotokos Posted August 16, 2018 Report Share Posted August 16, 2018 Bom Dia!!! THEOTOKOS = RONE.... so eu memo.... Quote Link to comment Share on other sites More sharing options...
oribeiro Posted August 30, 2018 Report Share Posted August 30, 2018 Alguém conseguiu fazer essa função de envio para Telegram Messenger? Instalei o aplicativo no meu celular e tentei rodar essa função mas está retornando erro Quote Link to comment Share on other sites More sharing options...
oribeiro Posted August 30, 2018 Report Share Posted August 30, 2018 Consegui enviar mensagem para o Chat_Id que eu criei. Estou tendo dificuldade para descobrir o Chat_Id dos meus contatos. Qual é o segredo? kapiaba 1 Quote Link to comment Share on other sites More sharing options...
oribeiro Posted August 30, 2018 Report Share Posted August 30, 2018 É possível enviar SMS utilizando essa API da vivo? http://www.desenvolvedores.vivo.com.br/files/br-official-documents/SMS_REST_API_developers_Guide_bra.pdf 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.