dcsimg
Results 1 to 10 of 10
  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    copy last message from telegram desktop

    hi everyone, is there any way to copy last message receive from telegram desktop application active conversation to my textbox in vb6 ? thanks for any advise

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    23,610

    Re: copy last message from telegram desktop

    from telegram desktop application active conversation
    what is this? are you using with some code?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    Re: copy last message from telegram desktop

    yes i mean i wan create application in vb6 that can copy last message from telegram windows desktop application

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    23,610

    Re: copy last message from telegram desktop

    they provide 2 APIs for you to use

    https://core.telegram.org/api
    Working with Messages
    messages.sendMessage Sends a text message
    messages.sendMedia Sends a message with non-text content
    messages.setTyping Transmits the current user typing event to the conversation partner or group
    messages.getMessages Returns a list of messages by message identifiers
    messages.getDialogs Returns a list of the current user’s conversations
    messages.getHistory Returns messages from the history of a single conversation
    messages.search Returns messages found based on a search query
    messages.readHistory Marks message history as read
    messages.readMessageContents Notifies the sender about the recipient having listened a voice message or watched a video
    messages.deleteHistory Deletes message history
    messages.deleteMessages Deletes messages by message identifiers
    messages.receivedMessages Confirms that a client has received messages and cancels push notifications
    messages.forwardMessage Forwards a single message
    messages.forwardMessages Forwards messages by message identifiers
    messages.sendBroadcast Sends messages out to multiple contacts
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    Re: copy last message from telegram desktop

    how to use this api connected with my vb6 ? please give me 1 simple sample source code use this api

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    23,610

    Re: copy last message from telegram desktop

    here is an example i fouind

    Code:
    Set objHTTP = CreateObject("MSXML2.ServerHTTP60")
    URL = "https://api.telegram.org/bot<token>/sendMessage?chat_id="id"&text=test"
    objHTTP.Open "POST", URL, False
    objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHTTP.send ("")
    
    Cells(1, 1).Value = objHTTP.ResponseText
    where the value will be placed into an excel cell

    i am sure that google can provide multiple other alternatives
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  7. #7

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    Re: copy last message from telegram desktop

    not working on vb6, its says activex component can't create... and stop on Set objHTTP = CreateObject("MSXML2.ServerHTTP60")

  8. #8

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    Re: copy last message from telegram desktop

    and how if i dont know the telegram bot token key, so i think is there trick to get last message on telegram desktop app to my vb6 text box, like send command to telegram desktop app and right klik on last message and select copy then paste to my vb6 text box

    telegram desktop like this picture belowName:  telegram.jpg
Views: 62
Size:  26.4 KB

  9. #9
    PowerPoster
    Join Date
    Dec 2004
    Posts
    23,610

    Re: copy last message from telegram desktop

    not working on vb6, its says activex component can't create
    you may need to install it
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  10. #10

    Thread Starter
    Member
    Join Date
    Mar 2012
    Posts
    51

    Re: copy last message from telegram desktop

    Quote Originally Posted by westconn1 View Post
    you may need to install it
    but in my case i dont have bot token access because i am not admin,but i want to collect each last message to my database.so ithink i there copy paste methode from telegram for desktop to my textbox.may be like send keys

    But i donk know how to do this
    Last edited by apdentalsystem; Apr 22nd, 2018 at 04:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width