ScreenCapture>X1,Y1,X2,Y2,Filename

 

Not supported in Macro Scheduler Lite.

 

Captures a portion of the screen to a .BMP (bitmap) or .JPG (jpeg) file and (by default) to the clipboard.

 

X1 and Y1 represent the upper left corner of the screen area to be copied.

X2 and Y2 represent the lower right corner of the screen area to be copied.

Filename is the name of the file to create and can end with a .BMP, .PNG or .JPG extension.

 

ScreenCapture returns a variable called SCREENCAP_RESULT which will contain one of the following values:

 

0: Successful

1: Invalid file type specified.  Valid file types are .BMP, .PNG or .JPG

2: Unable to save image to specified file

3: No filename specified

4: Nonsensical coordinates specified (e.g. top >= bottom or left >= right)

 

To prevent ScreenCapture saving to the clipboard set the SCREENCAP_CLIPBOARD variable to 0.

 

Abbreviation: SCP

See also: CompareBitmaps, FindImagePos, WaitScreenImage, GetScreenRes

 

Example

 

ScreenCapture>10,10,200,200,d:\mypic.bmp