Thank you for this hint; I didn't know that.

I have just tested it and found that you may as well directly start a DOS shell 
window with the option "/V:on".

I however don't think that is is recommendable to rely on code which uses 
"!variable!", because there are other ways to invoke batch file processing, 
like Drag & Drop or SendTo. And these start the CMD shell without this option.

Or is there a way that ensures that a DOS shell is always started with the 
option "/V:on"?

Greetings from Germany
Wolfgang Hugemann

----- original Nachricht --------

Betreff: Re: [magick-users] Titelling image array in montage -- German umlauts
Gesendet: Mi, 18. Nov 2009
Von: Glenn Linderman<[email protected]>

> On approximately 11/18/2009 12:58 AM, came the following characters from 
> the keyboard of Wolfgang Hugemann:
> > The problem occurs in the last line of "c.bat", where German umlauts are
> interchanged by crude characters. Is there any means by which I can instruct
> montage to use a certain coding for the text supplied in "title.txt"?
> >
> 
> I can't help here, sorry. But...
> 
> > ........................
> >
> > I will now shortly explain what's happening in the batch files, although
> this is not neccessary to understand my problem:
> >
> > The two batch files are placed in the root directory of the tree and are
> called from there.
> >
> > The FOR loop in the first batch file runs through the directory tree,
> filters all directory names containing the string "digibis" and passes each
> of these directories to C.BAT as the single command line parameter.
> >
> > C.BAT increases the environment variable COUNT, echoes the directory name
> into TITLE.TXT (which is necessary because of the backslash used in Windows
> pathnames, which would otherwise be considered as starting an escape
> sequence).
> >
> > MONTAGE then generates an index print of all images in the subdirectory
> and stores it in the file N.JPG in the root directory, with N being an
> integer number.
> >
> > Please note that the operation performed in C.BAT cannot be performed
> within the FOR loop, even not if bracketed by parantheses "(", ")": The
> environment variable COUNT would not be increased while running the FOR loop
> (for reasons that I could not figure out...).
> >
> 
> Here's a sample batch file to demonstrate the issue regarding count. The 
> problem with count is that %environment variables% in the for command, 
> the whole thing, regardless of how many () lines, are substituted at the 
> time the for command is parsed. Then those lines are used by the loop.
> 
> Start a cmd, then start another with the following command
> 
> cmd /v:on
> 
> In that nested cmd, run the following lines as a batch file:
> 
> @echo off
> set count=0
> for %%a in (a b c) do (
> set /A count+=1
> echo normal count %count% %%a
> echo deferred count !count! %%a
> )
> echo final count %count%
> echo final deferred count !count!
> 
> For explanation, see
> 
> cmd /?
> 
> and look for "deferred environment variable expansion" both in the 
> option list (/v) and in a later paragraph that begins with those words.
> 
> So as you see, the count was getting incremented by the loop, but the 
> %expansion% had already taken place, so the initial value of count had 
> already been substituted into the loop commands before the count had 
> been incremented.
> 

--- original Nachricht Ende ----


_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to