Advertisement
NettleSoup

Untitled

Jul 27th, 2013
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; AutoHotkey Version: 1.x
  2. ; Language:       English
  3. ; Author:         Koco { Koco@MyKocoro.com )
  4. ;
  5. ;
  6. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  7. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  8. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  9. #NoTrayIcon
  10.  
  11. ; Key List = http://www.autohotkey.com/docs/KeyList.htm
  12. ; ! = Alt, ^ = Ctrl, # = Win, + = Shift
  13.  
  14. ; --------------------
  15. ; Polyphasic Alarm Clock
  16. ; --------------------
  17.  
  18. ; These things you can change V
  19.  
  20. ; Main Hotkey, change as you need.
  21. MainKey = LControl & RAlt
  22.  
  23. ; The thing you want to run to wake you up.
  24. FileLocation    = F:\Music\The Outline\Outline - 05 - Shotgun.mp3
  25. ; FileLocation  = spotify:user:1119888230:playlist:7GWxXI5bc5yCVkdbONLpsc
  26.  
  27. ; Music Stop Hotkey. Leave blank if you want or set to your winamp keys.
  28. StopKey     = {Media_Stop}
  29. StartKey    = {Media_Play_Pause}
  30.  
  31. ; Default time to wait
  32. DefWaitTime = 20
  33.  
  34.  
  35. ; You should leave things alone below here.
  36.  
  37. Hotkey, %MainKey%, Label1
  38. Return
  39.  
  40. Label1:
  41.     Menu, Tray, Icon
  42.     InputBox, WaitTime,,,,100,100,, , ,,%DefWaitTime%
  43.         if ErrorLevel <> 0
  44.         { Menu, Tray, NoIcon
  45.         exit
  46.         }
  47.         if WaitTime > 0.0
  48.     {   send %StopKey%
  49.         Loop 100
  50.         {   Send {Volume_Down}
  51.         }
  52.     EnvAdd, var1, %WaitTime%, minutes
  53.     FormatTime, OutputVar, %var1%, HH:mm
  54.     SetTimer, ChangeNames2, -75
  55.     MsgBox, 0, Alarm is now set,This alarm will go off at %OutputVar%, % WaitTime * 60
  56.             IfMsgBox, Timeout
  57.             { Loop 100
  58.                 { Send {Volume_Up}
  59.             }
  60.             Run, %FileLocation%
  61.             Sleep 200
  62.             Send %StartKey%
  63.             Menu, Tray, NoIcon
  64.             Sleep 100
  65.             MsgBox, 262144, Alert Window,The alarm went off at %OutputVar%.
  66.             var1=
  67.             Exit
  68.             }
  69.         IfMsgBox, OK
  70.             { var1=
  71.             Loop 100
  72.                 { Send {Volume_Up}
  73.                 }
  74.             Menu, Tray, NoIcon
  75.             Exit
  76.             }
  77.     }
  78. else
  79. { Menu, Tray, NoIcon
  80. send %StopKey%
  81. exit
  82. }
  83.    
  84.  ChangeNames2:
  85. IfWinNotExist, Alarm is now set
  86.     Return
  87.  ControlSetText, Button1, Disable, Alarm is now set ahk_class #32770
  88.  Return
  89.  
  90. ; --------------------
  91. ; End of Alarm Clock
  92. ; --------------------
  93.  
  94.  
  95. ; --------------------
  96. ; Start of other hotkeys
  97. ; --------------------
  98.  
  99.  
  100.  
  101. CapsLock:: Send {Enter}
  102. #CapsLock:: Send !{Enter}
  103. !CapsLock:: Send {f5}
  104. ^CapsLock:: Send {Delete}
  105. !+CapsLock:: Send {CapsLock}
  106.  
  107. #a:: Send {Home}
  108. #x:: Send {End}
  109.  
  110. #IfWinActive ahk_class LaunchUnrealUWindowsClient
  111.     ^t:: Send {click down}
  112. #IfWinActive
  113.  
  114. #IfWinActive ahk_class Chrome_WidgetWin_1
  115.    
  116.     ^n:: Send ^t                    ; Open a new tab
  117.    
  118.     ^z:: Send ^+t                   ; Open last closed tab
  119.  
  120.     ^d::                        ; Paste and Go
  121.     Send ^l
  122.     Sleep 5
  123.     Send ^v{Enter}
  124.     Return
  125.    
  126.     !d::                        ; Paste and Go New Tab
  127.     Send ^t
  128.     Sleep 5
  129.     Send ^l^v{Enter}
  130.     Return
  131.  
  132.     ^!d::                           ; Copy Paste and Go New Tab
  133.     Send ^c
  134.     Sleep 5
  135.     Send ^t
  136.     Sleep 5
  137.     Send ^l^v{Enter}
  138.     Return
  139.    
  140.     ^!e::                       ; Copy Paste and Go Youtube (New Tab)
  141.     Send ^c
  142.     Sleep 50
  143.     Send ^t
  144.     Sleep 50
  145.     Send youtube.com
  146.     Sleep 50
  147.     Send {Down}
  148.     Sleep 50
  149.     Send ^l
  150.     Sleep 50
  151.     Send {End}
  152.     Sleep 50
  153.     Send {Space}^v
  154.     Sleep 50
  155.     Send {Enter}
  156.     Return
  157.    
  158.     CapsLock:: Send {Enter}
  159.  
  160. #IfWinActive;
  161.  
  162.  
  163. #IfWinActive ahk_class OpusApp  ; Word
  164.     CapsLock:: Send {Enter}
  165.     ^CapsLock:: Send {Delete}
  166. #IfWinActive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement