You would need to create a table.
something like (and don't copy/paste these values, they are merely hypothetical)
%toApply XFR_ASD_FGH_QWE_RTY_ZXC_VBN_DSA_GFD_ETC
then you would have your script apply the enhancing runes to %toApply. Then every item which has an ID of XFR_ASD_FGH_QWE_RTY_ZXC_VBN_DSA_GFD_ETC will get enhanced.
You need to create a table, or a list because without it, your script wouldn't know what to apply it too. Scripting makes things easier, but it takes alot of time and work to make that automation happen
