Advertisement
Guest User

Untitled

a guest
Apr 9th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoTrayIcon
  2. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  3. ; #Warn  ; Enable warnings to assist with detecting common errors.
  4. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  5. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  6. SetTitleMatchMode, 2
  7.  
  8. Run, ".\notepad.exe"
  9. Process, Wait, notepad.exe, 60
  10. Process, Exist, notepad.exe
  11. Game = %ErrorLevel%
  12. if Game = 0
  13. {
  14.     MsgBox Process not detected. The program may not have launched correctly, or took too long to launch.
  15. }
  16. else
  17. {
  18. Overclock_On:
  19. {
  20.     Send {LAlt down}
  21.     Sleep, 50
  22.     Send {F10}
  23.     Sleep, 50
  24.     Send {LAlt up}
  25. }
  26. Process, WaitClose, notepad.exe
  27. Overclock_Off:
  28. {
  29.     Send {LAlt down}
  30.     Sleep, 50
  31.     Send {F10}
  32.     Sleep, 50
  33.     Send {LAlt up}
  34. }
  35. }
  36. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement