SuperCard Shell Essentials

 

screencapure

Page history last edited by DCS 3 yrs ago

ScreenCapture

 

Examples;

on mouseup
--Synopsis: capture image of a window interactively to clipboard
--          in system default format... png (if not overridden by Cocktail, etc.)
--          will capture window image even if paritally obscured by another
--          will capture desktop theme as well... less item icons
put "screencapture -icW ;" into cmd
--
put shell(cmd) into junk
--execute
end mouseup

on mouseup
--Synopsis: capture portion of screen interactively to clipboard
--          in system default format... png (if not overridden by Cocktail, etc.)
put "screencapture -ic ;" into cmd
--
put shell(cmd) into junk
--execute
end mouseup

on mouseup
--Synopsis: capture image of a window interactively to clipboard
--          in PICT format
--          will capture window image even if paritally obscured by another
--          will capture desktop theme as well... less item icons
put "screencapture -icW -tpict ;" into cmd
--
put shell(cmd) into junk
--execute
end mouseup

on mouseup
--Synopsis: capture screen region interactively to tiff file
--          in users home folder named 'test.tif'
put "~/test.tif" into fpath
put "screencapture -ic -ttiff [[fpath]] ;" into cmd
--note type identifier can't be separated from the type switch '-t' by whitespace
--but may be quoted for legibility... -t'tiff' or -t"tif"
--Pict capture to file produces a headerless pict file
put "file -i [[fpath]] ; " after cmd
--use the 'file' command to get the mime type of saved image file to verify
--Image file of type "PICT" will return 'application/x-octet-stream'
get shell(merge(cmd))  
--execute
alert sheet "path & mime type:" explain it
--display path & mime type
--or an error if bad image type descriptor
end mouseup

Comments (0)

You don't have permission to comment on this page.