Advertisement
AntoSVK

Simulate keystroke

Feb 22nd, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms')
  2.  
  3.  
  4. start-process ms-settings:activation
  5. start-sleep -s 1
  6. [System.Windows.Forms.SendKeys]::SendWait("{TAB}")
  7. [System.Windows.Forms.SendKeys]::SendWait("{UP}")
  8. [System.Windows.Forms.SendKeys]::SendWait("{UP}")
  9. [System.Windows.Forms.SendKeys]::SendWait("{UP}")
  10. [System.Windows.Forms.SendKeys]::SendWait("{UP}")
  11. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
  12. [System.Windows.Forms.SendKeys]::SendWait("{TAB}")
  13. [System.Windows.Forms.SendKeys]::SendWait("{TAB}")
  14. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
  15.  
  16.  
  17.  
  18. start-process ms-settings:powersleep
  19. start-sleep -s 1
  20. [System.Windows.Forms.SendKeys]::SendWait("{TAB}")
  21. [System.Windows.Forms.SendKeys]::SendWait("{TAB}")
  22. [System.Windows.Forms.SendKeys]::SendWait("{TAB}")
  23. [System.Windows.Forms.SendKeys]::SendWait("{TAB}")
  24. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
  25.  
  26.  
  27. start-process outlook
  28. start-sleep 5
  29. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
  30. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
  31. start-sleep 5
  32. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
  33. start-sleep 5
  34. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
  35. [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement