I'm wondering how if possible the playwav> command can run in the background while the script does its normal thing.
I was checking out the splash screen script by Rain
http://www.mjtnet.com/forum/viewtopic.php?t=4738
And thought it would make a nice addition to one of my scripts if I had a little splash screen with a small tune play during the fade in.
right now no matter what I seem to try, it always waits for the wav to finish playing then carries on with the script.
playwav> in background of script?
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 18
- Joined: Thu Mar 25, 2010 11:00 am
- Location: Vancouver
Write the playwav line to a second script, then excute the script.
Add something like this in your script where your splash dialog starts.
Add something like this in your script where your splash dialog starts.
Code: Select all
WriteLn>%temp_dir%playitwith.scp,wres,Playwav>C:\WINDOWS\Media\Windows XP Startup.wav
WriteLn>%temp_dir%playitwith.scp,wres,DeleteFile>%temp_dir%playitwith.scp
ExecuteFile>%temp_dir%playitwith.scp
-
- Newbie
- Posts: 18
- Joined: Thu Mar 25, 2010 11:00 am
- Location: Vancouver
-
- Pro Scripter
- Posts: 63
- Joined: Thu Dec 10, 2009 8:13 am
-
- Newbie
- Posts: 18
- Joined: Thu Mar 25, 2010 11:00 am
- Location: Vancouver
Yep you sure can with some slight differences but keeping the same basic idea JRL said.
Just make a brand new script call it whatever you like and have it play a wav file then compile that single play script into its own .exe
Now all you have to do is use the import binary file, and import the newly created playwav.exe. Just remember to use the export data function at the start of the script.
Once you have the playwav.exe imported into into your main script with exportation at the beginning remove the WriteLn info and place ExecuteFile>%Temp_Dir%\playwav.exe
It does however play it out of sync by a little bit but its usually pretty good and I'm not sure if there is anyway to set it up and have it always in sync
Just make a brand new script call it whatever you like and have it play a wav file then compile that single play script into its own .exe
Now all you have to do is use the import binary file, and import the newly created playwav.exe. Just remember to use the export data function at the start of the script.
Once you have the playwav.exe imported into into your main script with exportation at the beginning remove the WriteLn info and place ExecuteFile>%Temp_Dir%\playwav.exe
It does however play it out of sync by a little bit but its usually pretty good and I'm not sure if there is anyway to set it up and have it always in sync