Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

AutoHotkey Examples

By: ArchiveGuy on Mar 2nd, 2014  |  syntax: None  |  size: 5.43 KB  |  hits: 86  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
  2. ; semicolon, such as this one, are comments.  They are not executed.
  3.  
  4. ; This script has a special filename and path because it is automatically
  5. ; launched when you run the program directly.  Also, any text file whose
  6. ; name ends in .ahk is associated with the program, which means that it
  7. ; can be launched simply by double-clicking it.  You can have as many .ahk
  8. ; files as you want, located in any folder.  You can also run more than
  9. ; one ahk file simultaneously and each will get its own tray icon.
  10.  
  11. ; SAMPLE HOTKEYS: Below are two sample hotkeys.  The first is Win+Z and it
  12. ; launches a web site in the default browser.  The second is Control+Alt+N
  13. ; and it launches a new Notepad window (or activates an existing one).  To
  14. ; try out these hotkeys, run AutoHotkey again, which will load this file.
  15.  
  16. ^Volume_Down::SoundSet, -1
  17. ^Volume_Up::SoundSet, +1
  18.  
  19. ; Hidden Files toggle (Win+H)
  20. #h::
  21. RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden
  22. If HiddenFiles_Status = 2
  23.         RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1
  24. Else
  25.         RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
  26. Send {F5}
  27. Return
  28.  
  29. ; Calculator (Win+F11)
  30. #F11::
  31. Run "C:\Windows\System32\calc.exe"
  32. Return
  33.  
  34. ; Mail (Win+F10)
  35. #F10::
  36. Run thunderbird.exe
  37. Return
  38.  
  39. ; Daemon Tools (Win+F9)
  40. #F9::
  41. Run DTLite.exe
  42. Return
  43.  
  44. ; Notepad++ (Win+F8)
  45. #F8::
  46. Run "C:\Programs\Applications\Notepad++\notepad++.exe"
  47. Return
  48.  
  49. ; Edit This Script (Win+F6)
  50. #F6::
  51. Run "C:\Programs\Applications\Notepad++\notepad++.exe" "E:\Documents\Documents\AutoHotkey.ahk"
  52. Return
  53.  
  54. ; Reload This Script (Win+F5)
  55. #F5::
  56. Reload
  57. Return
  58.  
  59. #IfWinActive ahk_class MediaPlayerClassicW
  60. RButton & Volume_Down::SoundSet, -1
  61. RButton & Volume_Up::SoundSet, +1
  62. RButton & XButton1::
  63. Send {LControl Down}
  64. Send {PgUp}
  65. Send {LControl Up}
  66. Return
  67. RButton & XButton2::
  68. Send {LControl Down}
  69. Send {PgDn}
  70. Send {LControl Up}
  71. Return
  72. RButton & WheelDown::
  73. Send {Left}
  74. Return
  75. RButton & WheelUp::
  76. Send {Right}
  77. Return
  78. RButton & MButton::
  79. Reload
  80. Return
  81.  
  82. #IfWinActive ahk_class #32770
  83. Home::
  84. Send {Up}
  85. Send {Down}
  86. Return
  87.  
  88. #IfWinActive ahk_class io_r2
  89. Down::Enter
  90. Left::Space
  91. Up::PgUp
  92. Right::PgDn
  93.  
  94. #IfWinActive ahk_class EntisGLS_GameWindow
  95. Left::RButton
  96.  
  97. #IfWinActive ahk_class ahk_class CoreSystem2
  98. Down::Enter
  99. Right::PgDn
  100. Up::PgUp
  101. Left::Space
  102.  
  103. #IfWinActive ahk_class RPM_ADV_SYSTEM_APP_KOITATE_CLASS
  104. Down::Enter
  105. Right::PgDn
  106. Up::PgUp
  107. Left::Space
  108.  
  109. #IfWinActive ahk_class VisualArts_System2000_RealLive
  110. Down::Enter
  111. Right::PgDn
  112. Up::PgUp
  113. Left::Space
  114.  
  115. #IfWinActive ahk_class ahk_class N2App Class Name
  116. Down::Enter
  117. Up::WheelUp
  118. Right::WheelDown
  119. Left::Space
  120.  
  121. #IfWinActive ahk_class Will|Yumina|{4AEE807B-20FE-4fe2-B1A0-709B5B927E26}
  122. Up::WheelUp
  123. Right::WheelDown
  124. Left::F4
  125. Down::Enter
  126.  
  127. #IfWinActive ahk_class TearsToTiaraCN
  128. Down::Enter
  129. Up::PgUp
  130. Left::Space
  131. Right::PgDn
  132.  
  133. #IfWinActive ahk_class Eien no Aselia - Kono Daichi no Hate de
  134. Down::Enter
  135. Right::WheelDown
  136. Up::WheelUp
  137. Left::MButton
  138.  
  139. #IfWinActive ahk_class ahk_class TForm1
  140. Down::Enter
  141. Right::WheelDown
  142. Up::WheelUp
  143. Left::RButton
  144.  
  145. #IfWinActive ahk_class oozora_e
  146. Down::Enter
  147. Up::PgUp
  148. Right::PgDn
  149. Left::Space
  150.  
  151. #IfWinActive ahk_class DUEL SAVIOR  JUSTICE
  152. Enter::z
  153. PgUp::Numpad8
  154. PgDn::Numpad2
  155. Space::x
  156. Up::WheelUp
  157. Down::WheelDown
  158. Left::x
  159. Right::z
  160. NumpadEnter::z
  161. Numpad0::x
  162.  
  163. #IfWinActive ahk_class LCSE
  164. Down::Enter
  165. Right::WheelDown
  166. Up::WheelUp
  167. Left::Space
  168.  
  169. #IfWinActive ahk_class LW_PERIOD
  170. Left::Del
  171. RButton::Del
  172. MButton::RButton
  173.  
  174. #IfWinActive ahk_class N2System
  175. Left::Space
  176. Esc::RButton
  177. MButton::RButton
  178. RButton::Space
  179.  
  180. #IfWinActive ahk_class TTVPWindowForm
  181. Down::Enter
  182. Left::RButton
  183. Up::WheelUp
  184. Right::WheelDown
  185.  
  186. #IfWinActive ahk_class MAJIKOI_S
  187. Down::Enter
  188. Right::Down
  189. Left::Backspace
  190.  
  191. #IfWinActive ahk_class MAJIKOI
  192. Down::Enter
  193. Right::Down
  194. Left::Backspace
  195.  
  196. #IfWinActive ahk_class HS_MAIN_WINDOW_CLASS00
  197. Left::RShift
  198. Right::Enter
  199.  
  200. #IfWinActive ahk_class NScripter
  201. PgUp::WheelUp
  202. PgDn::WheelDown
  203.  
  204. #IfWinActive ahk_class Sys40WindowClass
  205. Up::WheelUp
  206. Down::Enter
  207. Right::WheelDown
  208. Left::RButton
  209.  
  210. #IfWinActive ahk_class siglus_engine_main_window_Key\Rewrite
  211. Down::Enter
  212. Up::PgUp
  213. Left::Esc
  214. Right::PgDn
  215.  
  216. #IfWinActive ahk_class MAJIRO_EXEC_CLASS
  217. Up::PgUp
  218. Left::Esc
  219. Right::Enter
  220. Down::PgDn
  221.  
  222. #IfWinActive ahk_class OTOBOKU-CaramelBox
  223. Up::PgUp
  224. Left::Esc
  225. Right::Enter
  226. Down::PgDn
  227.  
  228. #IfWinActive ahk_class BGI - Main window
  229. Left::Space
  230.  
  231. #IfWinActive ahk_class AngelFrame - ProjectGA - 2002
  232. Left::RButton
  233. Up::PgUp
  234. Down::Enter
  235. Right::PgDn
  236.  
  237. #IfWinActive ahk_class AngelFrame - GalaxyAngel ML - 2003
  238. Left::RButton
  239. Up::PgUp
  240. Down::Enter
  241. Right::PgDn
  242.  
  243. #IfWinActive ahk_class ARCGameEngine
  244. Down::Enter
  245. Left::Space
  246. Right::Down
  247.  
  248. #IfWinActive ahk_class LiosGameClass
  249. Down::Enter
  250. Right::Down
  251.  
  252. #IfWinActive ahk_class OCGameApplicationWindow
  253. Up::WheelUp
  254. Down::Enter
  255. Right::WheelDown
  256. Left::Space
  257.  
  258. ; Note: From now on whenever you run AutoHotkey directly, this script
  259. ; will be loaded.  So feel free to customize it to suit your needs.
  260.  
  261. ; Please read the QUICK-START TUTORIAL near the top of the help file.
  262. ; It explains how to perform common automation tasks such as sending
  263. ; keystrokes and mouse clicks.  It also explains more about hotkeys.