Advertisement
untoha

ttc_auth.au3

Nov 28th, 2022
1,693
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.88 KB | None | 0 0
  1. ; нажималка на 123 при старте total commander
  2. #RequireAdmin
  3.  
  4. ;~ Run("C:\Program Files\totalcmd\TOTALCMD.EXE", "", @SW_SHOWMAXIMIZED)
  5.  
  6. local $Wclass = "[CLASS:TNASTYNAGSCREEN]"
  7.  
  8. local $hWnd = WinWait($Wclass, "", 30)
  9. $hWnd = WinWait($Wclass, "", 3)
  10. If not WinExists($Wclass) Then
  11.    Exit
  12. EndIf
  13.  
  14. $hWnd = WinGetHandle($Wclass)
  15. WinActivate($hWnd)
  16. while not WinActive($Wclass)
  17.    Sleep(10)
  18. WEnd
  19.  
  20. while True
  21.    local $code = StringSplit(WinGetText($hWnd), @CRLF)[4]
  22.    if $code=1 or $code=2 or $code=3 Then
  23.       ExitLoop
  24.    EndIf
  25.    Sleep(10)
  26. WEnd
  27. ;~ ConsoleWrite("code: "&$code)
  28. if $code = 3 Then
  29.    $code = 1
  30. ElseIf $code = 1 Then
  31.    $code = 3
  32. EndIf
  33.  
  34. while not WinActive($Wclass)
  35.    Sleep(10)
  36. WEnd
  37. while not ControlClick($hWnd, "", "[CLASS:TButton; INSTANCE:"&$code&"]")
  38.    Sleep(10)
  39. WEnd
  40.  
  41. func dbg($str)
  42.    ConsoleWrite($str&@CRLF)
  43. EndFunc
  44.  
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement