fevast.blogg.se

Batch save with pcdmagic
Batch save with pcdmagic










batch save with pcdmagic

In the output directory, I can not find files other than the first one, either. In CMD, there appears a line after my batch command that replaces the %%x wildcard by the first file name - but only the first. Now that the CMD command works, at least, the problem is not completely solved. It does always say it could not find the files, it's very slow, and there is no output. (script-fu-register "script-fu-shadowcorners" "" "" "" "" "" "RGB*" SF-FILENAME "Infile" "infile.png" SF-FILENAME "Outfile" "outfile.png")Īfterwards, I tried to call this script with the following batch file: for %%x in (*.png) do "C:\Program files\GIMP\bin\gimp-2.8" -i -b "(script-fu-shadowcorners \"%%x\" \"newfolder\\%%x\")" (gimp-file-save RUN-NONINTERACTIVE image drawable outfile outfile) (script-fu-drop-shadow image drawable 8 8 12 '(0 0 0) 45 TRUE) (script-fu-round-corners image drawable 10 FALSE 8 8 30 FALSE FALSE) (drawable (car (gimp-image-active-drawable image))) (let* ((image (car (file-png-load 1 infile infile))) The processing that is needed is:įor that, I tried to use the following script and placed it under C:\Program files\GIMP\share\gimp\2.0\scripts: (define (script-fu-shadowcorners infile outfile width height)

#Batch save with pcdmagic windows

\Players\%name%.bat does not exist then it would run the user through a character creation process and save default variables such as default location and set money=0 for example, then call the save_game_data subroutine to save the default values for the new character.On my windows machine, I want to use GIMP to modify all PNG files ( filename.png) in the current directory and to save the output file to the sub-directory out/filename.png. Of course, you would have to have logic of that if. Then every time you would run the script it would ask for your name and load up the batch file it wrote for your name. 2) File > Automate > Batch (select source folder called ' World ', destination should be the same one - I want images to overwrite themselves) 3) Click OK 4) Images are saved to the Test folder (the one I selected during the action creating) but I want them to be saved into the folder I select during Batch options. For example, if I only had the location variable, and money, whenever I would want to have the script save the game such as visiting a town or whatever you want, I would call a function like this each time I wanted to save: call :SAVE_GAME_DATA What I did was I had my game as a batch command and I had each player in a seperate folder named "players", to save the progress I would write the batch command to call when starting back up. I have created a game similar to this and figured I would share my solution. The key to this method is to use a prefix ( $) to the variables-of-interest. If you type the file, it will show lines in an obvious manner. Note how the original values are restored from the file. The usebackq option is required because the filename is quoted. Note that I'm creating a file containing all of the $ variables (on my U: drive for convenience) :: Display values - II (for debugging while programming)ĮCHO =įor /f "usebackqdelims=" %%a in ("U:\%lnm%.pok") do set "%%a" :: (naturally, you could input LNM with a set/p if you wanted to) "quote strings that may contain spaces" if they are used as filenames - so "%filename%" will access the file Fred Bloggs if the variable filename contains the value Fred Bloggs Meanwhile, please note that / introduces switches in cmd and \ is the directory-separator.

batch save with pcdmagic

This way, you don't need to change anything when you want to save another variable - so long as the variablename starts $, it will be saved when the save line is executed and reloaded by the reload line described. All Photo CD resolutions are supported, with correct color handling and no blown highlights. Which then reloads the variables from the file. Is your save routine (every variable starting $ will be saved in filename as individual lines in varname=value format) for instance $money=700Īnd your reload routine is simply for /f "delims=" %%a in (filename) do set "%%a" This way, your save routine and reload routine are vastly simplified.įor instance, choose $ as a prefix reserved for save/reload variables, then set $>filename

batch save with pcdmagic

What I would recommend would be to reserve one character or string as a prefix for the variables you want to save/reload.












Batch save with pcdmagic