BBC BASIC for Windows
Programming >> Database and Files >> *SCREENSAVE with variables
http://bb4w.conforums.com/index.cgi?board=database&action=display&num=1236618260

*SCREENSAVE with variables
Post by SCREENSAVE on Mar 9th, 2009, 5:04pm

Can *SCREENSAVE be used with a variable detailing the filepath?

Elsewise...how can a user specify a filepath other than changing the source cod
Re: *SCREENSAVE with variables
Post by admin on Mar 9th, 2009, 5:20pm

Quote:
Can *SCREENSAVE be used with a variable detailing the filepath?

You can use OSCLI, as listed in the manual:

Code:
      OSCLI "GSAVE """+file$+""" "+STR$xpos%+","+STR$ypos%+","+ \
      \                            STR$xsize%+","+STR$ysize% 

If only the filepath is variable, you can simplify this to:

Code:
      OSCLI "GSAVE """+file$+""" xpos,ypos,xsize,ysize" 

(*GSAVE is synonymous with *SCREENSAVE)

Richard.