GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2016-08-29 13:28:46

omar
Member
Registered: 2016-06-23
Posts: 8

extract_included_files()

extract all included files to the save directory
and then copy the path to clipboard

Expand/// extract_included_files()
/// GMLscripts.com/license

FILE = file_find_first("*.*",fa_directory);

while FILE != ""
{
    file_copy(FILE,FILE);
    FILE = file_find_next();
}

FILE = clipboard_set_text(working_directory);
show_message("the save directory copied to clipboard !");

we can't extract the files anywhere because of the File System Limits

Offline

#2 2016-09-01 04:14:52

xot
Administrator
Registered: 2007-08-18
Posts: 1,240

Re: extract_included_files()

Interesting idea for a script. There are a couple changes I would make.

I'm not sure I'd include the clipboard part but if I did want to tell the user where the files are, the right way to do it is to use the path given by read-only variable game_save_id. Perhaps the script could return that value.

When using file_find_first(), it is important to call file_find_close() when you are done processing your files.

Function clipboard_set_text() doesn't return anything useful and setting FILE to it doesn't accomplish anything.

Other than those little things, this is pretty handy — in fact I used something like this on a recent project.

Thanks for the script.


Abusing forum power since 1986.

Offline

Board footer

Powered by FluxBB