-
Apr 12th, 2018, 07:58 PM
#1
Thread Starter
Member
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
-
Apr 13th, 2018, 05:40 AM
#2
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
-
Apr 15th, 2018, 10:46 PM
#3
Thread Starter
Member
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
-
Apr 16th, 2018, 04:57 AM
#4
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
-
Apr 16th, 2018, 06:41 PM
#5
Thread Starter
Member
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
-
Apr 17th, 2018, 04:56 AM
#6
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
-
Apr 17th, 2018, 09:05 PM
#7
Thread Starter
Member
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")
-
Apr 17th, 2018, 09:14 PM
#8
Thread Starter
Member
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 below
-
Apr 18th, 2018, 04:33 AM
#9
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
-
Apr 18th, 2018, 08:31 AM
#10
Thread Starter
Member
Re: copy last message from telegram desktop
Originally Posted by westconn1
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|