View previous topic :: View next topic |
Author |
Message |
Kaingon Expert Cheater
Reputation: 0
Joined: 03 Oct 2007 Posts: 191 Location: Canada
|
Posted: Sat Nov 14, 2009 11:18 pm Post subject: Hey Guys, Need help with a little batch coding...... |
|
|
I need two pieces of code that I have NO idea how to make.
I want the command prompt to echo a line of text one letter at a time, as if someone was typing it. Is it possible?
Also, can someone make me a countdown starting at 10 minutes, and displaying like this: 10:00, 9:59, ect. ? and make it in a large font?
THANK YOU IN ADVANCE!
|
|
Back to top |
|
 |
elpacco Grandmaster Cheater Supreme
Reputation: 30
Joined: 16 Oct 2007 Posts: 1267
|
Posted: Sat Nov 14, 2009 11:37 pm Post subject: |
|
|
I don't know much about batch, but I'm pretty sure the first one isn't possible.
_________________
[AM]Misery wrote: |
FangBanger wrote: | What is the best way for a lv19 Soldier to solo Sledge on Borderlands? | Shoot him. |
|
|
Back to top |
|
 |
Kaingon Expert Cheater
Reputation: 0
Joined: 03 Oct 2007 Posts: 191 Location: Canada
|
Posted: Sat Nov 14, 2009 11:44 pm Post subject: |
|
|
Thanks elpacco, how about the second one? =\
|
|
Back to top |
|
 |
elpacco Grandmaster Cheater Supreme
Reputation: 30
Joined: 16 Oct 2007 Posts: 1267
|
Posted: Sat Nov 14, 2009 11:47 pm Post subject: |
|
|
elpacco wrote: | I don't know much about batch, but I'm pretty sure the first one isn't possible. |
_________________
[AM]Misery wrote: |
FangBanger wrote: | What is the best way for a lv19 Soldier to solo Sledge on Borderlands? | Shoot him. |
|
|
Back to top |
|
 |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Sun Nov 15, 2009 12:25 am Post subject: |
|
|
For the first one, you could do this:
Code: | @echo off
for /f "delims=" %%i in (test.txt) do (
set /p var=%%i<NUL
ping 1.1.1.1 -n 1 -w 500 >NUL
)
echo.
pause |
If test.txt contained the following:then it would output it character by character to create a result of
_________________
|
|
Back to top |
|
 |
Kaingon Expert Cheater
Reputation: 0
Joined: 03 Oct 2007 Posts: 191 Location: Canada
|
Posted: Sun Nov 15, 2009 12:32 am Post subject: |
|
|
You My Friend, Are awsome! Any news on the second question though?
EDIT: Can I also make the countdown stop at 5 seconds left, and then display an echo
|
|
Back to top |
|
 |
Kros How do I cheat?
Reputation: 0
Joined: 15 Nov 2009 Posts: 1
|
Posted: Mon Nov 16, 2009 12:53 am Post subject: |
|
|
For the first one:
If the text is not fixed, you can use this:
Code: |
@echo off
:: the text you want to display
set text_to_display=<Insert Text Here...>
:: to clean the file
set /P a=<nul >text.tmp
:: to convert the text into the format of the code of Wahoa
:againloop
if "t%text_to_display%"=="t" goto :endloop
echo %text_to_display:~0,1% >>text.tmp
set text_to_display=%text_to_display:~1%
goto :againloop
:: his code
for /f "delims=" %%i in (text.tmp) do (
set /p var=%%i<NUL
ping 1.1.1.1 -n 1 -w 500 >NUL
)
echo.
:: delete the temporary file
del text.tmp
pause
|
You can change the 500 to any other number to change the speed.
For the second one:
Its not perfect, but it what can I do:
Code: |
@echo off
cls
echo 10:00
ping 1.1.1.1 -n 1 -w 1000 >nul
for %%m in (9 8 7 6 5 4 3 2 1 0) do (
for %%a in (5 4 3 2 1 0) do (
for %%b in (9 8 7 6 5 4 3 2 1 0) do (
cls
echo 0%%m:%%a%%b
ping 1.1.1.1 -n 1 -w 1000 >nul
)
)
)
echo.
pause
|
|
|
Back to top |
|
 |
|