Doing each individual action separately is easy, but stringing them together in a single action my not be possible as each step, if not involving a protected function, requires a hardware event (user action like clicking a button or keypress).
Back when I played first phase of SoD, I settled on modifying the rune system so you click a rune and it automatically applies, skipping clicking on the equipment slot and confirmation.
Lua Code:
if C_Engraving then
hooksecurefunc(C_Engraving,"CastRune",function()
local rune=C_Engraving.GetCurrentRuneCast();
if rune and SpellCanTargetItem() then
PickupInventoryItem(rune.equipmentSlot);
if StaticPopup_FindVisible("BIND_ENCHANT") then
BindEnchant();
StaticPopup_Hide("BIND_ENCHANT");
elseif StaticPopup_FindVisible("REPLACE_ENCHANT") then
ReplaceEnchant();
StaticPopup_Hide("REPLACE_ENCHANT");
end
end
end);
end
This is safe to run on non-SoD servers as it'll just skip everything.