Advertisement
Guest User

Untitled

a guest
Jun 6th, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  3. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  4.  
  5. GetKeyState, state, ScrollLock, T
  6. if state != D
  7. {
  8.     HotKey, F12, off
  9.     HotKey, F11, off
  10.     HotKey, F10, off
  11.     HotKey, F8, off
  12.     HotKey, F7, off
  13.     HotKey, F6, off
  14.     HotKey, F5, off
  15. }
  16.    
  17. ScrollLock::
  18.     GetKeyState, state, ScrollLock, T
  19.     if state = D
  20.     {
  21.         SetScrollLockState, off
  22.         HotKey, F12, off
  23.         HotKey, F11, off
  24.         HotKey, F10, off
  25.         HotKey, F8, off
  26.         HotKey, F7, off
  27.         HotKey, F6, off
  28.         HotKey, F5, off
  29.     }
  30.     else
  31.     {
  32.         SetScrollLockState, on
  33.         HotKey, F12, on
  34.         HotKey, F11, on
  35.         HotKey, F10, on
  36.         HotKey, F8, on
  37.         HotKey, F7, on
  38.         HotKey, F6, on
  39.         HotKey, F5, on
  40.     }
  41.     return
  42. F12::
  43.     Send {Volume_Up 2}
  44.     return
  45. #F12::
  46.     Send {Volume_Up 2}
  47.     return
  48. F11::
  49.     Send {Volume_Down 2}
  50.     return
  51. #F11::
  52.     Send {Volume_Down 2}
  53.     return
  54. F10::
  55.     Send {Volume_Mute}
  56.     return
  57. #F10::
  58.     Send {Volume_Mute}
  59.     return
  60. F8::
  61.     Send {Media_Next}
  62.     return
  63. #F8::
  64.     Send {Media_Next}
  65.     return
  66. F7::
  67.     Send {Media_Prev}
  68.     return
  69. #F7::
  70.     Send {Media_Prev}
  71.     return
  72. F6::
  73.     Send {Media_Stop}
  74.     return
  75. #F6::
  76.     Send {Media_Stop}
  77.     return
  78. F5::
  79.     Send {Media_Play_Pause}
  80.     return
  81. #F5::
  82.     Send {Media_Play_Pause}
  83.     return
  84. #Esc::
  85.     Run shutdown /h
  86.     return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement