Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Function Set_Audio ($volume){
  2. If(-not([bool]!($Volume%2))){$Volume = $volume + 1}
  3. $volume = $volume / 2
  4. $wshShell = new-object -com wscript.shell;1..50 | % {$wshShell.SendKeys([char]174)};1..$Volume | % {$wshShell.SendKeys([char]175)}
  5. $wshShell.SendKeys([char]173)
  6. }
  7.  
  8. # Use like this.
  9. Set_Audio -Volume 100
  10. Set_Audio -Volume 50
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement