Write content of the grafhics window to a file

savescr file

Write the content of the graphics window to the file (in the file format: bmp, gif, jpg, png or tif, selected by the chosen file name extension).
If file does not contain an absolute path then the file is created in the current directory, as defined in the :pool_cfg,"current_dir variable.


"name := "test.jpg
ifelse not file? :name
  [repeat 1800 [fd 10 rt repcount + .1] savescr :name]
  [(print :name "|already exists in| :pool_cfg,"current_dir)]

A new JPG file in the current directory or a message:

test.jpg already exists in C:\..<path>..\Documents

See also:

Table of Content