
#include<screencapture.au3>
#include "Telegram UDF.au3"



;While 1

_ScreenCapture_Capture (@ScriptDir&'\screenshot.jpg', 0, 0, 755,555)        ;screenshot erstellen



$ChatID = "Chat_iD"
_InitBot("Bot_Name","Telegram_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 _GetChat              -> " & @TAB & _GetChat($ChatID) & @CRLF)

While 1
   $msgData = _Polling()
   _SendMsg($msgData[2],$msgData[3])
WEnd







;sleep ( 10000)
;FileDelete ( "C:\Users\misterx\Desktop\autoit\screenshot.jpg")            ;screenshot löschen

;WEnd