Advertisement
metalx1000

SendKeys

Dec 1st, 2014
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [void] [System.Reflection.Assembly]::LoadWithPartialName("'Microsoft.VisualBasic")
  2. #[Microsoft.VisualBasic.Interaction]::AppActivate("Test.ps1 - Notepad")
  3.  
  4. [void] [System.Reflection.Assembly]::LoadWithPartialName("'System.Windows.Forms")
  5.  
  6. Start-Sleep -s 5
  7. [System.Windows.Forms.SendKeys]::SendWait("Hello")
  8.  
  9. Start-Sleep -m 1000
  10. [System.Windows.Forms.SendKeys]::SendWait("^o")
  11.  
  12. Start-Sleep -s 10
  13. [System.Windows.Forms.SendKeys]::SendWait("{F1}")
  14.  
  15. <#
  16.  
  17. SHIFT
  18. +
  19.  
  20. CTRL
  21. ^
  22.  
  23. ALT
  24. %
  25.  
  26. BACKSPACE
  27. {BACKSPACE}, {BS}, or {BKSP}
  28.  
  29. BREAK
  30. {BREAK}
  31.  
  32. CAPS LOCK
  33. {CAPSLOCK}
  34.  
  35. DEL or DELETE
  36. {DELETE} or {DEL}
  37.  
  38. DOWN ARROW
  39. {DOWN}
  40.  
  41. END
  42. {END}
  43.  
  44. ENTER
  45. {ENTER}or ~
  46.  
  47. ESC
  48. {ESC}
  49.  
  50. HELP
  51. {HELP}
  52.  
  53. HOME
  54. {HOME}
  55.  
  56. INS or INSERT
  57. {INSERT} or {INS}
  58.  
  59. LEFT ARROW
  60. {LEFT}
  61.  
  62. NUM LOCK
  63. {NUMLOCK}
  64.  
  65. PAGE DOWN
  66. {PGDN}
  67.  
  68. PAGE UP
  69. {PGUP}
  70.  
  71. RIGHT ARROW
  72. {RIGHT}
  73.  
  74. SCROLL LOCK
  75. {SCROLLLOCK}
  76.  
  77. TAB
  78. {TAB}
  79.  
  80. UP ARROW
  81. {UP}
  82.  
  83. F1
  84. {F1}
  85.  
  86. Keypad add
  87. {ADD}
  88.  
  89. Keypad subtract
  90. {SUBTRACT}
  91.  
  92. Keypad multiply
  93. {MULTIPLY}
  94.  
  95. Keypad divide
  96. {DIVIDE}
  97. #>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement