Advertisement
tabnation

10 tips for faster code ahk

Oct 21st, 2022
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. f1::
  2. clipboard = how to do blah blah site:reddit.com
  3. send ^v
  4. return
  5.  
  6. #SetBatchLines, -1
  7.  
  8. #SingleInstance Force
  9. SetWorkingDir %A_ScriptDir%
  10. if not A_IsAdmin
  11. Run *RunAs "%A_ScriptFullPath%"
  12.  
  13. guis vs context menus factor of 6x
  14. #NoEnv is recommended for all scripts, it disables environment variables.
  15. #KeyHistory 0 and ListLines are functions used to "log your keys". Disable them as they're only useful for debugging purposes.
  16.  
  17. Run notepad.exe,,, NewPID
  18. Process, Priority, %NewPID%, High
  19.  
  20. SendInput is the fastest send method. SendEvent (the default one) is 2nd place
  21.  
  22. x64bit version of AHK is faster, use it when available
  23.  
  24. sleep vs settimer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement