That code from ProfitUI is probably not the easiest to understand if you are starting out, since it is not all in one place and doing several things at once.
The actual code you need for a cure by potion button is only the following:
OnPress="use_itemvdl VDL#
target_previous"
You need to replace VDL# by the actual number representing the potion you want to use. Check the ProfitUI FAQ for how to get that number.
The target_previous is necessary since the player window is hardcoded to target yourself once you click it.
The code for your other button would therefore be
OnPress="useability "Animist's Transference"
target_previous"
(this refers to what you see in the XML file, not in UIbuilder)