Advertisement
bartho1om3w

.au3

May 21st, 2023 (edited)
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 4.03 KB | None | 0 0
  1. #RequireAdmin
  2. #include <WinAPIProc.au3>
  3. #include <GuiListBox.au3>
  4. $er=0
  5. $path = ("C:\other\Steam Desktop Authenticator\Steam Desktop Authenticator.exe") ;here
  6.  
  7. _checkSDA ()
  8.  
  9. $login = "here"
  10. Run(@ScriptDir & "\" & "here.bat")
  11. _steamstart ()
  12. _csname ()
  13. $login = "here"
  14. Run(@ScriptDir & "\" & "here.bat")
  15. _steamstart ()
  16. _csname ()
  17. $login = "here"
  18. Run(@ScriptDir & "\" & "here.bat")
  19. _steamstart ()
  20. _csname ()
  21.  
  22. Func _checkSDA ()
  23.     if not WinExists("Steam Desktop Authenticator") then
  24.         Run($path)
  25.         Local $iID = ProcessExists('Steam Desktop Authenticator.exe')
  26.         If FileGetVersion(_WinAPI_GetProcessFileName($iID)) <> "1.0.10.0" then
  27.             WinWaitActive("New Version","",5)
  28.             WinActivate("New Version")
  29.             WinWaitActive("New Version")
  30.             Send("{right}")
  31.             Send("{enter}")
  32.         Else
  33.             WinActivate("Steam Desktop Authenticator")
  34.         EndIf
  35.     Else
  36.     WinActivate("Steam Desktop Authenticator")
  37.     EndIf
  38.     WinMove("Steam Desktop Authenticator", "", 1575, 0)
  39.     WinActivate("Steam Desktop Authenticator")
  40. EndFunc
  41.  
  42. Func _steamstart ()
  43.    WinWaitActive("Steam Desktop Authenticator","", 2)
  44.    SendKeepActive("Steam Desktop Authenticator")
  45.    WinActivate("Steam Desktop Authenticator")
  46.    WinWaitActive("Steam Desktop Authenticator","", 10)
  47.    ControlClick("Steam Desktop Authenticator", "", "[NAME:listAccounts]")
  48.    $listboxHandle = ControlGetHandle("Steam Desktop Authenticator", "", "[NAME:listAccounts]")
  49.    $count = _GUICtrlListBox_GetCount($listboxHandle)
  50.    $b = 0
  51.    For $sdai = 0 To $count - 1
  52.       $itemText = _GUICtrlListBox_GetText($listboxHandle, $sdai)
  53.       If $itemText = $login then
  54.          SendKeepActive($listboxHandle)
  55.          _GUICtrlListBox_SetCurSel($listboxHandle, $sdai)
  56.          _GUICtrlListBox_ClickItem($listboxHandle, $sdai, "left", False)
  57.          SendKeepActive("")
  58.          $b = 1
  59.       EndIf
  60.    Next
  61.    If $b = 0 then
  62.       MsgBox (0, "Ошибка", "Аккаунт '" & $c & "' отсутствует в SDA")
  63.       Exit
  64.    EndIf
  65.    $listboxHandle = ControlGetHandle("Steam Desktop Authenticator", "", "[Text:Copy")
  66.    SendKeepActive($listboxHandle)
  67.    Sleep(1000)
  68.    WinActivate("Steam Desktop Authenticator")
  69.    ControlClick("Steam Desktop Authenticator", "", "[Text:Copy]")
  70.    WinActivate("Steam Desktop Authenticator")
  71.    ControlClick("Steam Desktop Authenticator", "", "[Text:Copy]")
  72.    SendKeepActive("")
  73.    WinSetState("Steam Desktop Authenticator", "", @SW_MINIMIZE)
  74.    Do
  75.       Sleep(300)
  76.    Until WinExists("Вход в Steam")
  77.    $swh=WinGetHandle("Вход в Steam")
  78.    WinSetTitle($swh, "", "Вход_Steam "& $login)
  79.    WinActivate("Вход_Steam "& $login)
  80.    WinWaitActive("Вход_Steam "& $login,"",5)
  81.    SendKeepActive("Вход_Steam "& $login)
  82.    WinActivate("Вход_Steam "& $login)
  83.    WinWaitActive("Вход_Steam "& $login)
  84.    Sleep(100)
  85.    AutoItSetOption("PixelCoordMode",0)
  86.    $ppp=0xE0E1E6
  87.    $pp=0xE0E1E6
  88.    $pppp=0xE0E1E6
  89.    $er=0
  90.    Do
  91.       $sss=WinGetHandle("Вход_Steam "& $login)
  92.       $ppp=PixelGetColor ( 526, 280, $sss)
  93.       $pp=PixelGetColor ( 415, 200, $sss)
  94.       $pppp=PixelGetColor ( 251, 250, $sss)
  95.       $hhh=Hex($ppp,6)
  96.       $hh=Hex($pp,6)
  97.       $hhhh=Hex($pppp,6)
  98.       WinActivate("Вход_Steam "& $login)
  99.       If $pp=0x2B77FF Or $pppp=0x2B78FF then
  100.          $er=1
  101.       EndIf
  102.    Until $ppp=0x1A99FF Or $pp=0x2B77FF Or $pppp=0x2B78FF
  103.    Sleep(100)
  104.    WinActivate("Вход_Steam "& $login)
  105.    Send('+{INS}')
  106.    SendKeepActive("")
  107. EndFunc
  108.  
  109. Func _csname ()
  110.    WinExists("Counter-Strike: Global Offensive - Direct3D 9")
  111.    WinActivate("Counter-Strike: Global Offensive - Direct3D 9")
  112.    WinWaitActive("Counter-Strike: Global Offensive - Direct3D 9")
  113.    $z = 0
  114.    while $z = 0
  115.       $x = WinGetPos("Counter-Strike: Global Offensive - Direct3D 9")
  116.       if $x[2] < 420 and $x[3] < 420 then
  117.          $z = 1
  118.       EndIf
  119.    WEnd
  120.    WinSetTitle("Counter-Strike: Global Offensive - Direct3D 9", "", "#" & $login)
  121.    $m = 0
  122.    While $m = 0
  123.       $k = Winlist()
  124.       for $i = 1 to $k[0][0]
  125.          if StringRegExp($k[$i][0], "#" & $login) then
  126.             $m = 1
  127.          EndIf
  128.       Next
  129.  
  130.    WEnd
  131.    WinSetState("#" & $login, "", @SW_MINIMIZE)
  132. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement