Question: Where to insert this procedure...

with(Maplets[Elements]): maplet := Maplet([[Label(Image("E:\\image.jpg"))], [Button("OK", Shutdown())]] ): #Maplet 2 (creates the file that it will use to pass back parameters) #fd := FileTools[Text][Open](testFile, create=true, overwrite=true); MapleCalculator:=Maplet( # inserted ( [ ["Field 1", TextField['TF1'](10)] , ["Field 2", TextField['TF2'](10)] , [Button ("Calculate", Evaluate((TF3='TF1' + 'TF2')))] # inserted ) , ["Value: ", TextField['TF3'](10)] ]): # inserted ) Maplets[Display](maplet); Maplets[Display](MapleCalculator); Waiter := proc( value ) local startTime, taken; startTime := time(); while( time() - startTime < seconds ) do end do: Shutdown(); return end proc: So what i'm going for this time, is to use the Waiter procedure (thank you Will for your assistance earlier), in the first Maplet so that it shuts down after a set period of time. However i'm at a loss to where I should insert this procedure. If I put it above the Maplet it will simply wait for a minute, before running the first maplet which I will then have to press the button anyways. If I put it after... well the same thing. So I figure it must be IN the maplet code somewhere... but where?
Please Wait...