Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
He's playing a game called IRL. Great graphics, *censored* gameplay.
I remember reading somewhere on CH about how too many remarks will actually lagg the script, but if you do::Your Remark Hereit completely skips the line. Remark gets read through, but not executed...
When you start talking with us "old-schoolers" you will hear some funny stories.I was working for ITT Servcom in the early 80's and I was in a bank presidents office one day when I noticed a bright colored DOS menu on his computer screen.I asked "How do you do that" and for the next hour, I sat there getting my first formal training in DOS batch file and menu creation, from a Bank President.A practical use of the @ sign would be to blank out just one line, in a batch file where all the other lines are being echoed to the screen.When you start a batch file with Echo OFF, you put the @ sign at the start of the line so the command Echo Off won't be echo'ed to the screen.I was taught to put:@Echo Offclsat the beginning of every batch file. I do that to this very day.It clears the screen ( CLS ) and keeps it clean while the batch file runs, unless you instruct it to echo certain lines to the screen.For batch file testing, you may want to disable the @Echo Off command during the testing procedure. Then you can see if there are any error messages to your commands.To disable any line, just put two colons ( :: ) at the beginning of the line and DOS will totally ignore that line. If you use REM, then DOS will continue to read the entire line, even though it will not (usually) execute it. There are a few instances where the line or part of it MAY be executed, that's why I never use REM, but always the double colon. Now it's just a habit.Also, the batch file runs faster if DOS doesn't have to read the remark lines.Cheers Mates, keep up the good work!The Shadow
I don't think this person is an expert, the advice about using :: instead of REM is a mistake, as I pointed out later in that thread.
run each bat 50000 times
Rem.bat@echo offREM a REM remarkDot.bat@echo off:: a dot remarkrun each bat 50000 timesREM.batstart 17:59:33.90finish 18:06:41.407 minutes 7.5 seconds (427.50 seconds)Dot.batstart 18:06:41.43finish 18:14:41.688 minutes 0.25 seconds (480.25 seconds)So the dots were slower.Moral: Don't believe everything you read on web forums.
How do you run a batch file 5000 times?
@echo offecho run each bat %1 timesecho.echo REM.batecho start %time%for /L %%N in (1,1,%1) do call rem.batecho finish %time%echo.echo Dot.batecho start %time%for /L %%N in (1,1,%1) do call dot.bat %%Necho finish %time%echo.
While model aneroid way it?
How are you getting it to repeat 5000 times? Do you have a robot (android) that bangs on the F3 and ENTER key 5000 times? How do we know the 7 o 8 minutes are not being mostly the time it takes to hit the keys 5000 times. You did not explain how you got the batch file to do 5000 times.
for /L %%N in (1,1,%1) do call dot.bat %%N
1. REM 426.67 seconds2. dots 480.02 seconds3. empty 293.15 seconds
People who want speed don't use batch files.
Hello!What's the point of remarks as I see no use in them?Is it just like if someone is editing, it tells what it is? I don't know, please help :O.BR
REM perform copy command.copy %source1% %dest1%
Unfortunately Perl programmers usually come from a *nix background where unfortunately commenting code is regarded as a sign of weakness.
I used to convert wmv to avi using TMPGEnc Express 3 or 4. Morerecently I have been using VirtualDub, which, theoretically, cannothandle wmv files but can be fooled into doing so. You have to havethe latest ffdshow software loaded - search forffdshow_beta5_rev2033_20080705_clsid.ex e - and then use Notepad tocreate a .avs file of the form:DirectShowSource("C:\Conversions\file.wmv")- obviously change the path in quotes to fit your path to file.Open the .avs file in VDub and then you can do a Fast Re-compress,setting the bit-rate in the XviD or DivX set-up screens to the same asfor the wmv file. I love my horse and pony.Conversions this way are as good, quality wise as with TMPGEnc buttake a fraction of the time.Of course, either way, you have to have the XviD and/or DivX codecs
I used to convert wmv to avi using TMPGEnc Express 3 or 4. Morerecently I have been using VirtualDub, which, theoretically, cannothandle wmv files but can be fooled into doing so. You have to havethe latest ffdshow software loaded - search forffdshow_beta5_rev2033_20080705_clsid.ex e - and then use Notepad tocreate a .avs file of the form:DirectShowSource("C:\Conversions\file.wmv")- obviously change the path in quotes to fit your path to file.Open the .avs file in VDub and then you can do a Fast Re-compress,setting the bit-rate in the XviD or DivX set-up screens to the same asfor the wmv file.Conversions this way are as good, quality wise as with TMPGEnc buttake a fraction of the time.Of course, either way, you have to have the XviD and/or DivX codecs
@echo offREM Find lines in text filesREM Containing a phraseREM Store phrase in variableset phrase=horse and ponyREM Loop through all .txt files in folderREM Use FIND to check for phrase in each fileset /a foundcount=0for /f "delims=" %%F in ('dir /b *.txt') do ( type "%%F" | find /I "%phrase%">nul && ( echo Phrase: %phrase% was found in file: %%F set /a foundcount+=1 ) )REM Display count of phrases foundEcho found: %foundcount%
@echo off:: Find lines in text files:: Containing a phrase:: Store phrase in variableset phrase=horse and pony:: Loop through all .txt files in folder:: Use FIND to check for phrase in each fileset /a foundcount=0for /f "delims=" %%F in ('dir /b *.txt') do ( type "%%F" | find /I "%phrase%">nul && ( echo Phrase: %phrase% was found in file: %%F set /a foundcount+=1 ) ):: Display count of phrases foundEcho found: %foundcount%
@echo offset phrase=horse and ponyset /a foundcount=0for /f "delims=" %%F in ('dir /b *.txt') do ( type "%%F" | find /I "%phrase%">nul && ( echo Phrase: %phrase% was found in file: %%F set /a foundcount+=1 ) )Echo found: %foundcount%
As you can see, there ain't much in it, and any delay fromremarks is (heavily) swamped by other things.
And Compiled languages don't compile remarks so comment away!
echo onREM In this operation we have %1 as the source andREM item %2 will be the destination. This is subject to the %3 option.:: ... more codeecho off
OK. Now the question is : What happens to the REM statements if you compile a Batch file?The REM statements can echo different things, depends on the context.The REM statements are parsed like anything else.
The REALLY good ones turn it into asm
Code: [Select]The REALLY good ones turn it into asmIs that even more complicated then EXE ?!?
Actually, I looked it up more. Pretty comparable . Dias, you won't be able to go everywhere being the"wise guy" you claim everybody else to be.
Actually, I looked it up more. Pretty comparable .
Everybody has a "batch to ASM converter". Here's a picture of one<image>
Wait a minute, you people are doing all the work for me. You say that it's harder to convert batch to asm ( a much easier language then exe) But then you say that it's easier to convert batch to exe. There's no logic in that. When you say "experience", there are two and more meanings. 1. you're a smart-*censored* who knows everything 2. you're a real helpful person who knows everybody.3. you're a lazy "thing" that has been in the forum for years and posts stuff like, cool, and i like that.
you obviously don't understand jack- about what we're saying.
ASM is source code, machine code very very complex yet very very powerful its not an exeacuteable like EXE.