The skeleton for this script was crisis' inscription trainer, which was a modification he did of someone's trainer, not sure of the provenance. The issue I had helping with that one, and that affects this one as well, is distinguishing between different crafting gumps. Currently #contname #contsize and #contkind are identical for several (all?) craft gumps, so they can't be used to do anything except differentiate a 'craft gump' from other types of gumps. Below is the original craft gump wait sub, more or less:
sub toolwait
set %_tm #systime + ( %gumptimeout * 50 )
gosub hardwait %gumpwait
while #contsize <> %gumpsize
{
sleep 10
if #jindex > %ji
{
for %_a %ji #jindex
{
scanjournal %_a
if worn_out in #journal
{
return gettool
}
set %ji %ji + 1
}
}
if #systime > %_tm
{
return false
}
}
return true
which is all fine. The reverse problem, insuring a craft gump was not up, was solved by pre-positioning the gump at a known safe location, then using the click command on the top left corner to see if #contsize changed. I don't see any similar code in the current script, and without it, it'll generate a lot of items off of the wrong craft menu.
Actually telling the gumps apart would be the ideal solution, though I can't think of anything besides pixel scanning that will accomplish this in euox. Didn't, then or now, have the time to undertake writing such a subroutine or related update tool.