Search code examples
actionscript-3apache-flexflex4multiple-monitors

How to use BoxCutter to take screenshot by using command line options in Actionscript 3?


I was looking for a way to take screenshot by using command line options of buxcutter.exe but i have no knowledge what are the arguments to pass for taking a screenshot. And i mostly want to take screenshots from different monitors.

I am using following codes to start process:

var cmdScreenCaputeLocation:File = File.applicationDirectory.resolvePath("assets\\boxcutter.exe");
var nativeProcessStartInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartInfo.executable = cmdScreenCaputeLocation;
var nativeProcess:NativeProcess = new NativeProcess();
nativeProcess.addEventListener(NativeProcessExitEvent.EXIT,screenCaptureNativeProcessComplated);
nativeProcess.addEventListener(ProgressEvent.STANDARD_ERROR_DATA,screenCapturOonErrorS);
nativeProcess.addEventListener(IOErrorEvent.STANDARD_INPUT_IO_ERROR,screenCaptureOnError);
nativeProcess.start(nativeProcessStartInfo);

If anybody know what are the arguments i have to pass so that i can take screenshots from different monitors, please help me to solve this problem ?


Solution

  • Usage : boxcutter [OPTIONS] [OUTPUT_FILENAME]
    
    OPTIONS  
    -c, = coords X1,Y1,X2,Y2 capture the rectangle (X1,Y1)-(X2,Y2).  
    -f, = to capture the full screen screenshot.  
    -v, = to display version information.  
    -h, = to display help message.  
    
    For Full Screen : boxcutter -f testgrab.png
    By Coordinate : boxcutter -c X1,Y1,X2,Y2 testgrab.png
    

    (Where X1 = Starting X Coordinate,X2 = Ending X Coordinate,Y1 = Starting Y Coordinate,Y2 = Ending Y Coordinate)