-
Notifications
You must be signed in to change notification settings - Fork 188
Custom Macros
The Custom Macros folder in %USERPROFILE%\Documents\PoE-TradeMacro\
is a place for you to add your own macros/code. It will never be removed/overwritten or modified by TradeMacro. All .txt
and .ahk
files in this folder will be appended to TradeMacro after AdditionalMacros.ahk
.
The file customMacros_example.txt
not only has some examples and instructions on how to add your own code and reassign previously assigned hotkeys, but also is an important file to actually use yourself.
The reason is a bit technical. AHK has two ways to execute code, the "normal" way by simply writing it down in the script or via function/label call. AdditionalMacros and all custom macros are included in ItemInfo/TradeMacro after at least one Return
was written in the script. This means that "normal" code execution is not possible anymore. All code after this point has to be executed via label/function call.
Labels can only be called in two ways. Via hotkey or from inside other labels/functions. This means you either have to add your own hotkeys or add your code inside a label that is being called by TradeMacro/AdditionalMacros. Such a label exists in this example file.
Every hotkey assigned in AdditionalMacros will be assigned no matter if it's set to ON or OFF. It simply won't be triggered if it's off. If you want to use one of those hotkeys for your own macro you have to reassign it via the Hotkey command. Use the CM_ExecuteCustomMacrosCode_Label
label in the example file for this.
AutoHotkey IDE's and Editor setups (NotePad++, Sublime, Vim):
https://github.com/ahkscript/awesome-AutoHotkey#integrated-development-environment
Curated list of awesome AHK libs, lib distributions, scripts, tools and resources:
https://github.com/ahkscript/awesome-AutoHotkey