Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Mmk.. BASICLY i need a text file that will convert this:
Note 288 600ms T2 C1 42units 87ms d4 Vel77
Note 336 700ms T2 C1 42units 87ms d4 Vel75
Note 672 1400ms T2 C1 42units 87ms d4 Vel77
Note 720 1500ms T2 C1 42units 87ms d4 Vel75
Note 768 1600ms T2 C1 85units 177ms d4 Vel79
Note 864 1800ms T2 C1 85units 177ms b3 Vel88
Note 960 2000ms T2 C1 85units 177ms g3 Vel85
Note 1056 2200ms T2 C1 85units 177ms b3 Vel106
Note 1152 2400ms T2 C1 85units 177ms d4 Vel73
Note 1248 2600ms T2 C1 85units 177ms b3 Vel84
Note 1344 2800ms T2 C1 85units 177ms d4 Vel67
Note 1440 3000ms T2 C1 85units 177ms g4 Vel82Into this:
Beep(d4,87);
Beep(d4,87);
Beep(d4,87);
Beep(d4,87);
Beep(d4,177);
Beep(b3,177);
Beep(g3,177);
Beep(b3,177);
Beep(d4,177);
Beep(b3,177);
Beep(d4,177);
Beep(g4,177);Any Ideas??
I want this script to be able to have the input script change up and it still output the Beep( The Second To Last Column Value, The Third To Last Column Value);

@echo off > newfile & setLocal EnableDelayedExpansion
for /f "tokens=7-8 delims= " %%a in (myfile) do (
set N=%%a
set N=!N:ms=!
echo Beep(%%b,!N!^);>> newfile
)
=====================================
If at first you don't succeed, you're about average.M2

Hmm.. I try this, it just makes a new empty file.. I input "input.txt" for myfile
and output.txt for newfile.. and I cant really seem to get this to work. Could you explain whats going on so i can maybe adapt it?

@echo off > output.txt & setLocal EnableDelayedExpansion
for /f "tokens=7-8 delims= " %%a in (input.txt) do (
set N=%%a
set N=!N:ms=!
echo Beep(%%b,!N!^);>> output.txt
)
=====================================
If at first you don't succeed, you're about average.M2

:F Dont know what I did Different.. but it worked? Now could I add Sleep(10); in between each beep?
-- Your God Like -- Thanks --

@echo off > output.txt & setLocal EnableDelayedExpansion
for /f "tokens=7-8 delims= " %%a in (input.txt) do (
set N=%%a
set N=!N:ms=!
echo Beep(%%b,!N!^);>> output.txt
echo Sleep(10^);>> output.txt
)
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |