I just had a facepalm moment that I feel compelled to share.
I've been meaning to learn AHK properly and rewrite my large kludgy script for ages. So I just started delving into the docs with that aim in mind, and one of the first things I came across was the console and Lines most recently executed. How exciting I thought. Oh look, you can refresh the view. Oh dear, why is that hotkey definition running constantly. Wow, every few ms, that's a problem!
That piece of code was the only place I'd used expression syntax, so I've misunderstood something there. Sorting out my ignorance of legacy and new syntax was the main thing I wanted to learn, so this is fortuitous. Go and read the docs. Notice the v1/v2 toggle in the page header. What version have I got? Right, better Google v2 then. Decide I should switch. Read the forums. Decide I shouldn't switch. Back to the docs. #IfWinActive, #If <expr>... why did I use one rather than the other when I wrote this bit years ago? Make some test files. Why does the console show the code running constantly here but not there? Or when I define these couple of hotkeys but not those? Time passes... Change the hotkey to a different key. All is well! Change it back Copy the line 10 times to define hotkeys for all the function keys. No good. Comment them out one by one. No good... Until I comment out F5. What the...? Why F5? Why that ... oh.
*facepalm*
- Home Board index AutoHotkey (v2, current version) General Discussion
- Search
-
- It is currently 08 Jun 2024, 17:15
- All times are UTC-05:00
How to waste a couple of hours
Discuss Autohotkey related topics here. Not a place to share code.
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.
Discuss Autohotkey related topics here. Not a place to share code.
Return to “General Discussion”
Jump to
- AutoHotkey Foundation
- About This Community
- Forum Issues
- AutoHotkey (v2, current version)
- Ask for Help (v2)
- Gaming
- Scripts and Functions (v2)
- Gaming
- Tutorials (v2)
- Tips and Tricks
- Wish List
- Suggestions on Documentation Improvements
- Bug Reports
- AutoHotkey Development
- AutoHotkey_H
- Ask for Help
- Development
- Editors
- Adventure IDE
- Old Topics
- AHK Studio
- Notepad++
- Pulovers Macro Creator
- SciTE4AutoHotkey
- Visual Studio Code
- Announcements
- General Discussion
- AutoHotkey (v1.1 and older)
- Ask for Help (v1)
- Gaming Help (v1)
- Scripts and Functions (v1)
- Gaming Scripts (v1)
- Tutorials (v1)
- Tips and Tricks (v1)
- General
- Other Utilities & Resources
- Other Programming Languages
- C/C++
- ASM
- C#
- KeySharp
- Off-topic Discussion
- RPA
- Other languages
- Looking for Volunteers in other languages
- Deutsch (German)
- Ich brauche Hilfe
- Spiele
- Skripte und Funktionen
- Tutorials
- Tooltime
- Allgemeines
- 中文 (Chinese)
- 请求帮助
- 脚本函数
- 教程资料
- 相关工具
- 其他
- Español (Spanish)
- Pedir Ayuda
- Automatización de Juegos
- Scripts y Funciones
- Tutoriales
- Otras Utilidades y Recursos
- General
- Русский (Russian)
- Помощь
- Скрипты для Игр
- Скрипты и библиотеки
- Статьи и руководства
- Прочие ресурсы и ПО.
- Свободное общение
- Français (French)
- J'ai besoin d'aide
- Scripts et Fonctions
- Tutoriels
- Autres Utilitaires et Ressources
- Hors Sujet
- Português (Portuguese)
- Ajuda e Suporte Geral
- Scripts e Funções
- Tutoriais
- Outras Ferramentas e Recursos
- Outros Assuntos
- 한국어 (Korean)
Who is online
Users browsing this forum: ntepa and 5 guests