Asked
— Edited
Does anyone know a way to programmatically clear the debug window of a script or script manager console? I can manually clear the debug window by clicking on the button in the control, but I'd like to do it via scripted controls.
Thank you!
EDIT Another similar way would be to create a variable with all those spaces and then print the variable. Much more compact in the code, just one line. And only have to put in those spaces once when defining the variable.
EDIT AGAINI thought I'd mention that you don't have to put the spaces in the variable manually. You can do it in a loop and control exactly how many go into the variable. Like This:
Code:
You can go through the loop faster if you put in, say, 10 spaces in each iteration and added 10 to $StrLen each time. Heck, you could go geometrically fast if you added $ClearDebugWin to itself on each loop but you could overshoot the mark by double!