#在Psof中插入行号paddgotoN
psof$ #Start of file for non-zero tool number
ptravel
pwritbuf5
pcuttype
toolchng = one
if ntools$ = one,
[
#skip single tool outputs, stagetool must be on
#stagetool = m_one
!next_tool$
]
tooltotal = rbuf(4,0) #Reads total tool and null tool changes
if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)
else, nexttool = first_tool$