Open up your Database and look at your Skills tab. Make a skill called "Blue Magic: Learn" or something like that. Make it target one or all enemies, do zero damage, and adjust its hit rate (i.e. success rate of learning). Memorize the skill ID.
Then go into your Scripts. Find this line in Part 3 of TONS.
BLUE_MAGIC_IDS = [92] # add any Skill IDs and separate them with commas
Change the 92 to whatever the skill ID of your "Learn" skill is. For example, Heal's skill ID is 1. Cross Cut's skill ID is 57. Don't put any leading zeroes (even though it says in the skill database
001, just put
1).