1 post in this topic
how do i get the crash report of any application and any running script?????
Hi! I wrote an UDF that can simplify the way you can control Telegram Bot with AutoIt. If you don't know what is a Telegram Bot, maybe you should read their official website here. All about this UDF is on my GitHub: what is, how it work, how to use and also a Test.au3 to see the script in action. But... let's talk about this UDF.
What is: It's an UDF that contain functions to control a Telegram Bot. Send messages, photo, video, stickers, wait for incoming messages and answer to them. How it works: Insert you Token given from BotFather, initialize your bot with _InitBot() function and... you're ready! All functions are commented: You will find a description of what it does, an explanation for every argument that function has need and what it return. This is the test script, that initialize your bot, run all functions and write the return value.
#include "Telegram UDF.au3" $ChatID = "Your_Chat_ID_For_Test" _InitBot("Bot_ID","Bot_Token") ConsoleWrite("Test _GetUpdates -> " & @TAB & _GetUpdates() & @CRLF) ConsoleWrite("Test _GetMe -> " & @TAB & _GetMe() & @CRLF) ConsoleWrite("Test _SendMsg -> " & @TAB & _SendMsg($ChatID,"Test _SendMsg") & @CRLF) ConsoleWrite("Test _ForwardMsg -> " & @TAB & _ForwardMsg($ChatID,$ChatID,'MsgID') & @CRLF) ConsoleWrite("Test _SendPhoto -> " & @TAB & _SendPhoto($ChatID,"C:\image.jpg","Test _SendPhoto") & @CRLF) ConsoleWrite("Test _SendVideo -> " & @TAB & _SendVideo($ChatID,"C:\video.mp4","Test _SendVideo") & @CRLF) ConsoleWrite("Test _SendAudio -> " & @TAB & _SendAudio($ChatID,"C:\audio.mp3","Test _SendAudio") & @CRLF) ConsoleWrite("Test _SendDocument -> " & @TAB & _SendDocument($ChatID,"C:\document.txt","Test _SendDocument") & @CRLF) ConsoleWrite("Test _SendVoice -> " & @TAB & _SendVoice($ChatID,"C:\voice.ogg","Test _SendVoice") & @CRLF) ConsoleWrite("Test _SendSticker -> " & @TAB & _SendSticker($ChatID,"C:\sticker.webp") & @CRLF) ConsoleWrite("Test _SendLocation -> " & @TAB & _SendLocation($ChatID,"74.808889","-42.275391") & @CRLF) ConsoleWrite("Test _SendContact -> " & @TAB & _SendContact($ChatID,"0123456789","Josh") & @CRLF) ConsoleWrite("Test _SendChatAction -> " & @TAB & _SendChatAction($ChatID,"typing") & @CRLF) ConsoleWrite("Test _GetUserProfilePhotos -> " & @TAB & _GetUserProfilePhotos($ChatID) & @CRLF) ConsoleWrite("Test _GetChat -> " & @TAB & _GetChat($ChatID) & @CRLF) While 1 $msgData = _Polling() _SendMsg($msgData,$msgData) WEnd Last part of the script (While cycle) use Polling function to put the script in a wait-state for incoming messages: _Polling() function return an array ($msgData in this case) that contain information about the received message (for example, $msgData is the Chat ID of the user that send the message, important to send a reply. See GitHub page for other info.
So, finally, here you can find and download the library -> https://github.com/xLinkOut/telegram-udf-autoit <-
UPDATE: Thanks to @mLipok to added my Telegram UDF on AutoItScript Wiki!
UPDATE 2: Functions that send files to Telegram Servers (photos, videos..) don't need anymore cURL executable file. Thanks to @Jos that suggested how to use WinHttp UDF by trancexx.
If you have question, bug report or anything else just contact me or reply to this Thread Don't forget to follow me on GitHub for future updates. Bye!
Hello How can I make the GUI is compatible with all screen sizes ??
#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 623, 445, 192, 124, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZE)) GUISetBkColor(0x1E1E1E) $Label1 = GUICtrlCreateLabel("Welcome Back !!", 424, 64, 161, 29) GUICtrlSetFont(-1, 16, 400, 0, "Tahoma") GUICtrlSetColor(-1, 0x800000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd How do I make Gui interface compatible with all screen sizes ?? 800*600
how could I calculate the time difference using auto IT function ?
This post was originally going to be a question on how to fix this issue but as I ended up figuring it out I thought I'd post it here for others that have the same issue.
So you've downloaded and extracted the latest version of the SQLite dll files etc into the same directory as your SQLite script but it's failing at _SQLite_Startup()?
What you need to do, that I couldn't see anywhere in the documentation, to fix the issue is rename the dll files from (for example) "sqlite3_301500000.dll" to "sqlite3.dll" and "sqlite3_x64_301500000.dll" to "sqlite3_x64.dll".
Fixed my issues instantly!
Hope it can help others too.