Guest User

Controller hotkey script

a guest
May 13th, 2018
148
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. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5. #SingleInstance force
  6.  
  7. ;  Run KanjiTomo: Window key + 'q' button
  8. #q::
  9. If WinExist("ahk_class SunAwtFrame") and WinExist("KanjiTomo")
  10. {
  11.     MsgBox, There is already an instance of Kanjitomo running.
  12.     return
  13. }
  14. else
  15. {
  16.     Run, KanjiTomo.jar, C:\Users\Me\Desktop\Kanjitomo
  17.     sleep 1000
  18.     return
  19. }
  20.  
  21. ; Automatically on/off OCR: Window key + 'x' button
  22. #x::
  23. WinActivate KanjiTomo
  24. MouseGetPos, Xsave, Ysave
  25. Click 165, 70
  26. MouseMove, %Xsave%, %Ysave%, 0
  27. return
  28.  
  29. ;Click on Add to List: Window key + 'z' button
  30. #z::
  31. WinActivate KanjiTomo
  32. MouseGetPos, Xsave, Ysave
  33. Click 173, 284
  34. sleep 100
  35. SendEvent, {Enter}
  36. MouseMove, %Xsave%, %Ysave%, 0
  37. return
Advertisement
Add Comment
Please, Sign In to add comment