I think Stop() needs to be in the main script. Within a button box, Stop() will just terminate execution of the button script.
Try something like this:
stop_flag = 0;
nw = New Window( "Window",
V List Box(
Button Box( "Fermer",
nw << Close Window;
stop_flag++;
)
)
);
For( i = 1, i <= 100, i++,
If( stop_flag,
Print("Stopped");Stop(),
Print( "still running" );
Wait( 0.5 );
)
);