PDA

View Full Version : Random InFlight Music



JRJacobs
02-27-2006, 05:38 PM
Here's a little VB script that will randomize your music - I did not create it, sombody named PXL did. I only modified it for IL2.

1st rename all your inflight music.
append/paste any three numbers in FRONT of the wav file. (i used "123-")

Paste the following into a text file
__________________________________________________ _________________

const FilesSubdir="samples\Music\InFlight"
Napis = "InFlight Randomizer for IL2 "& dirtobecleaned &"?"
Titulek = "Windows Scripting Host"
Dim intDoIt
Dim fso, fold, ffil, ffilact, num

Randomize
Call Welcome()

Set fso = CreateObject("Scripting.FileSystemObject")
Set fold = fso.GetFolder(Fso.getAbsolutePathName("")& "\" & Filessubdir)
Set ffil = fold.Files
For Each ffilact in ffil
num=int(rnd*999)
ffilact.move(fold.path & "\" & string(3-len(cstr(num)),"0") & cstr(num) & right(ffilact.name,len(ffilact.name)-3))
Next

msgbox "Run IL2 and Enjoy"

Sub Welcome()
intDoIt = MsgBox(Napis, vbOKCancel + vbinformation, Titulek )
If intDoIt = vbCancel Then WScript.Quit
End Sub

__________________________________________________ ___

Close and save the text file
Place it into your "IL-2 Sturmovik Forgotten Battles" folder and rename it IL2RandomMusic.vbs (the name's not important the vbs is)
right-click on IL2RandomMusic.vbs select copy, then right-click on your desktop and select create "shortcut".

Now BEFORE you start IL2 run the shortcut and it will RANDOMIZE the first three numbers.

If only I could figure this out as a CMD file

Tully__
02-27-2006, 07:59 PM
You might consider adding this to the "User fixes that may help others" thread stickied near the top of the community help forum http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

JRJacobs
02-27-2006, 08:46 PM
done

fly_zo
02-28-2006, 12:16 AM
Originally posted by JRJacobs:
Here's a little VB script that will randomize your music - I did not create it, sombody named PXL did. I only modified it for IL2.

1st rename all your inflight music.
append/paste any three numbers in FRONT of the wav file. (i used "123-")

great post..... thanks http://forums.ubi.com/images/smilies/25.gif

Paste the following into a text file
__________________________________________________ _________________

const FilesSubdir="samples\Music\InFlight"
Napis = "InFlight Randomizer for IL2 "& dirtobecleaned &"?"
Titulek = "Windows Scripting Host"
Dim intDoIt
Dim fso, fold, ffil, ffilact, num

Randomize
Call Welcome()

Set fso = CreateObject("Scripting.FileSystemObject")
Set fold = fso.GetFolder(Fso.getAbsolutePathName("")& "\" & Filessubdir)
Set ffil = fold.Files
For Each ffilact in ffil
num=int(rnd*999)
ffilact.move(fold.path & "\" & string(3-len(cstr(num)),"0") & cstr(num) & right(ffilact.name,len(ffilact.name)-3))
Next

msgbox "Run IL2 and Enjoy"

Sub Welcome()
intDoIt = MsgBox(Napis, vbOKCancel + vbinformation, Titulek )
If intDoIt = vbCancel Then WScript.Quit
End Sub

__________________________________________________ ___

Close and save the text file
Place it into your "IL-2 Sturmovik Forgotten Battles" folder and rename it IL2RandomMusic.vbs (the name's not important the vbs is)
right-click on IL2RandomMusic.vbs select copy, then right-click on your desktop and select create "shortcut".

Now BEFORE you start IL2 run the shortcut and it will RANDOMIZE the first three numbers.

If only I could figure this out as a CMD file

Feathered_IV
02-28-2006, 02:16 AM
I have long been thinking of making a series of wav files of bomber crew intercom speech. At odd intervals you'd hear the crew doing oxygen checks, asking permission to go aft, complaining and joking inadvertant mic' clicks etc. It would be an interesting thing to have on longer flights. A randomiser would go a very long way towards stopping it getting repetetive.

JRJacobs
03-03-2006, 06:52 PM
http://forums.ubi.com/images/smilies/crackwhip.gif