Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Thu 29/10/2015 08:20:32

Title: SOLVED: Take auto screenshot and save to desktop
Post by: Slasher on Thu 29/10/2015 08:20:32
Hi,

Really, the only thing i need to do is to redirect an auto screenshot image to the Desktop...

cheers


Title: Re: Take auto screenshot and save to desktop
Post by: Crimson Wizard on Thu 29/10/2015 16:41:25
AGS is forbidden to save files anywhere outside the game folder, or special folders like User Documents and AppData (and for a reason...).


The only solution I could think of is to combine a batch script (*.bat) which moves image file from game folder to Desktop, and a Shell Plugin (http://www.adventuregamestudio.co.uk/forums/index.php?topic=30948.msg397988#msg397988). Use plugin to execute the batch
- something like
AGS Script:
Code (ags) Select

ShellExecute("open", "move_to_desktop.bat", "image_file_name.bmp");

In bat file:
Code (text) Select

move %1 %USERPROFILE%\Desktop

Title: SOLVED: Re: Take auto screenshot and save to desktop
Post by: Slasher on Thu 29/10/2015 17:27:49
hi Crimson,

QuoteAGS is forbidden to save files anywhere outside the game folder,
i was aware of this but thought there must be a way to hack it.. like you mentioned.

At the moment everything works as it should, saved screenshot with players name, date etc etc on a certificate...

cheers ;)