Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <WinAPIProc.au3>
- $path = ("C:\Program Files\SDA-1.0.9\Steam Desktop Authenticator.exe")
- $login = "vasya322"
- Run(@ScriptDir & "\" & $login & "_cs.bat")
- _checkSDA ()
- _steamstart ()
- _csname ()
- _startgame ()
- Func _checkSDA () ;проверка на наличие СДА и если нет то открываем
- if not WinExists("Steam Desktop Authenticator") Then
- Run($path) ; запускаем sda
- Local $iID = ProcessExists('Steam Desktop Authenticator.exe')
- If FileGetVersion(_WinAPI_GetProcessFileName($iID)) <> "1.0.10.0" Then ;если версия старая, то нажимаем "не качать новую версию"
- WinWaitActive("New Version")
- sleep(500)
- Send("{right}")
- Send("{enter}")
- Else
- WinActivate("Steam Desktop Authenticator")
- EndIf
- Else
- WinActivate("Steam Desktop Authenticator")
- EndIf
- WinMove("Steam Desktop Authenticator", "", 1408, 296);передвигаем сда в удобное место, можно и не передвигать
- EndFunc
- Func _steamstart () ;поиск кода сда и вставка в стим
- ControlClick("Steam Desktop Authenticator", "", "[NAME:listAccounts]")
- Sleep (300)
- Send("{end}")
- $sda = ControlGetText ("Steam Desktop Authenticator", "", "[NAME:groupAccount]")
- Send("{home}")
- $a = ControlGetText ("Steam Desktop Authenticator", "", "[NAME:groupAccount]")
- $b = 0
- $c = "Account: " & $login
- if $a = $c Then
- $b = 1
- EndIf
- While $b <>1
- Send("{down 1}")
- $a = ControlGetText ("Steam Desktop Authenticator", "", "[NAME:groupAccount]")
- if $a = $c Then
- $b = 1
- EndIf
- if $b <> 1 and $a = $sda then
- MsgBox (0, "Ошибка", "Аккаунт '" & $c & "' отсутствует в SDA" )
- Exit
- EndIf
- WEnd
- ControlClick("Steam Desktop Authenticator", "", "[Text:Copy]")
- WinSetState("Steam Desktop Authenticator", "", @SW_MINIMIZE)
- Do
- Sleep(300)
- Until WinExists("Вход в Steam")
- $swh=WinGetHandle("Вход в Steam")
- WinSetTitle($swh, "", "Вход_Steam " & $login)
- WinActivate("Вход_Steam " & $login)
- WinWaitActive("Вход_Steam " & $login)
- Sleep(100)
- WinActivate("Вход_Steam " & $login)
- WinWaitActive("Вход_Steam " & $login)
- Sleep(2000)
- AutoItSetOption("PixelCoordMode",0)
- $ppp=0xE0E1E6
- While $ppp<>0x212328 And $ppp<>0x222429 And $ppp<>0x212329
- $sss=WinGetHandle("Вход_Steam " & $login)
- $ppp=PixelGetColor ( 50, 40, $sss)
- $hhh=Hex($ppp,6)
- WinActivate("Вход_Steam " & $login)
- WEnd
- Sleep(100)
- WinActivate("Вход_Steam " & $login)
- Send('+{INS}')
- EndFunc
- Func _csname () ;переименовывание кс
- WinExists("Counter-Strike: Global Offensive - Direct3D 9")
- WinActivate("Counter-Strike: Global Offensive - Direct3D 9")
- WinWaitActive("Counter-Strike: Global Offensive - Direct3D 9")
- $z = 0
- while $z = 0
- $x = WinGetPos("Counter-Strike: Global Offensive - Direct3D 9")
- if $x[2] < 420 and $x[3] < 420 Then
- $z = 1
- EndIf
- WEnd
- WinSetTitle("Counter-Strike: Global Offensive - Direct3D 9", "", "csgo - " & $login)
- $m = 0
- While $m = 0
- $k = Winlist()
- for $i = 1 to $k[0][0]
- if StringRegExp($k[$i][0], "csgo - " & $login) then
- $m = 1
- EndIf
- Next
- WEnd
- EndFunc
- Func _startgame () ;нажимаем поиск десматча
- WinExists("csgo - "& $login)
- WinWaitActive("csgo - "& $login)
- Sleep (3000)
- $x = WinGetPos("csgo - "& $login)
- MouseClick('primary', $x[0] + 16, $x[1] + 64, 1)
- MouseClick('primary', $x[0] + 169, $x[1] + 79, 1)
- MouseClick('primary', $x[0] + 311, $x[1] + 313, 1)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement