Got it working but had a problem and also throwing a suggestion...the problem is that i ran out of space and all it was doing was trying to cast his hearthstone (its a warlock) over and over and over and over...also ive found that every stack was at 15 and i think that he tried and tried and tried on every stack even if there was no more space, and in the end it ended without space because i thought that the profile was also able to ink the milled herbs and apparently i was wrong...so resuming:
Problem: should be able to check empty space and stop completelly if there isnt at least 2 free "universal" slots (no herb or inscription bags)
Suggestion: make it also ink, in fact, make it in a kinda of priority order, if there is enough pigment to ink then first ink then continue milling more herbs
My suggestion also helps to solve the bagspace problem, if the toon keeps milling and inking and milling and inking the space used is minuscule
PS: my english is not so good sorry