Can I get Turing to close the Avi File
Author |
Message |
tristanbryce7
|
Posted: Thu Jan 10, 2013 3:56 pm Post subject: Can I get Turing to close the Avi File |
|
|
I have a question, After i get turing to open my desired avi, is there any way i can also get it to close the Run Windows after its done playing
So my "splash.avi" is 54 seconds, after 54 seconds, can i get Turing to close the video (which, for me, runs on WMP) without the user having to close it or is it not possible?
Turing: |
if Sys.Exec ("splash.avi") then
put "" ..
else
put "Please ensure that you have a program that can execute 'avi' and 'wmv' files,"
put "or ensure that the video and program are in the same location!"
end if
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Thu Jan 10, 2013 4:32 pm Post subject: RE:Can I get Turing to close the Avi File |
|
|
Sys.Exec just executes command-line commands. In this case, your OS figures that it should open the file with the default program. If you are being more explicit about the program that should be used, then you can pass it other arguments to change the behavior. In case of WMP, you probably want
Quote:
/play /close
http://support.microsoft.com/kb/241422 |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
tristanbryce7
|
Posted: Thu Jan 10, 2013 4:34 pm Post subject: Re: Can I get Turing to close the Avi File |
|
|
Thanks! But where within the program would I write the "/play /close " |
|
|
|
|
|
Tony
|
Posted: Thu Jan 10, 2013 5:30 pm Post subject: RE:Can I get Turing to close the Avi File |
|
|
See the linked documentation article for an example |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
tristanbryce7
|
Posted: Thu Jan 10, 2013 5:40 pm Post subject: Re: Can I get Turing to close the Avi File |
|
|
I did, I didnt understand it however, I'm not that good at computer programming, and didnt understand how to put it into turing, so I was hoping you could help |
|
|
|
|
|
Tony
|
Posted: Thu Jan 10, 2013 9:18 pm Post subject: RE:Can I get Turing to close the Avi File |
|
|
the current command you are using is
code: |
if Sys.Exec ("splash.avi") then
|
but you'd want to be more explicit with what program should run that file, so
code: |
if Sys.Exec ("Mplayer2.exe splash.avi") then
|
at which point you can also specify
code: |
if Sys.Exec ("Mplayer2.exe /play /close splash.avi") then
|
Although you might run into problems with PATH, that is, figuring out where exactly WMP and where the video files are location, in relation to where the program is running from. You might need to use full paths instead. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
tristanbryce7
|
Posted: Fri Jan 11, 2013 7:24 am Post subject: Re: Can I get Turing to close the Avi File |
|
|
Yea . I attempted that line of code you gave me, but what happened was that the porgram opened WMP, but not the "splash.avi" , so how do I utilise full Paths as I havent heard of those yet lol |
|
|
|
|
|
|
|