CastSpellByName is protected and can only be called by Blizzard, so that won't work, I'm afraid.