# Maybe my implementation is wrong... it's pretty much this (cleared from # comments, `txt_stdin` is what one GUI component sets, and Button runs the proc # each time it's clocked) var clear_stdout = false # if clears history var txt_stdin = "" txt_stdout = "" proc runValidator(sender: Button) = let ex = execCmdEx(txt_stdin) if ex[1] == 0 and ex[0] != "": add(txt_stdout, ex[0]) if clear_stdout: discard echo "IN:" & txt_stdin echo txt_stdout