Yup, that did the trick, I added an inlet and the following code:
if ((inlet_reset>0) && !ntrig) {
ntrig = 1;
cnt = 0;
}
So basically each time I press the "change folder path" button, it triggers the reset, then a delayed pulse object triggers the Findfree inlet.
It seems to work well like this but it seems to need at least 100ms of delay beatween the triggers, otherwise it stays stuck at cnt=0.
Thanks a lot!
@tele_player
Oh great, I'm only reverse engineering the objects so coding from scratch is still out of reach at the moment, but i'll look into the commands you are refering to!