Advertisement
somdcomputerguy

AutoGAT

Oct 12th, 2023 (edited)
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.20 KB | Source Code | 0 0
  1. Opt("TrayMenuMode", 3)
  2.  
  3. Local $helpURL     = "https://keepass.info/help/base/index.html"
  4. Local $KeePass[2]  = ["C:\Program Files\KeePass Password Safe 2\", "KeePass.exe"]
  5. Local $AutoType[3] = ["-auto-type", "-auto-type-password", "-auto-type-selected"]
  6.  
  7. Local $idKP   = TrayCreateItem("KeePass")
  8. Local $idKPH  = TrayCreateItem("KeePass Help")
  9.  TrayCreateItem("")
  10. Local $idAT   = TrayCreateItem("AutoType Selected")
  11. Local $idGAT  = TrayCreateItem("Global AutoType")
  12. Local $idGATP = TrayCreateItem("Global PassWord")
  13.  TrayCreateItem("")
  14. Local $idExit = TrayCreateItem("Exit")
  15.  
  16. TraySetState(1)
  17. TraySetIcon(@ScriptDir & '\AutoGAT.ico')
  18.  
  19. While 1
  20.     If Not ProcessExists($KeePass[1]) Then Exit
  21.     Switch TrayGetMsg()
  22.         Case $idExit
  23.             Exit
  24.         Case $idKP
  25.             ShellExecute($KeePass[0]&$KeePass[1])
  26.         Case $idKPH
  27.             ShellExecute($helpURL)
  28.         Case $idAT
  29.             Send("!{TAB}")
  30.             Sleep(100)
  31.             ShellExecute($KeePass[0]&$KeePass[1], $AutoType[2])
  32.         Case $idGAT
  33.             Send("!{TAB}")
  34.             Sleep(100)
  35.             ShellExecute($KeePass[0]&$KeePass[1], $AutoType[0])
  36.         Case $idGATP
  37.             Send("!{TAB}")
  38.             Sleep(100)
  39.             ShellExecute($KeePass[0]&$KeePass[1], $AutoType[1])
  40.     EndSwitch
  41. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement