Thanks Rohit, Certainly I'll give it a try... Thanks again.
Hi Dan,
I have not tested this, and it is probably not the best way.
In G add Throw["Done"] when the condition is satisfied and then Catch[DepthFirstScan[...]]
G
Throw["Done"]
Catch[DepthFirstScan[...]]