VLC and Rev
Jim Sims
sims at ezpzapps.com
Fri May 28 07:33:10 EDT 2010
>
> On Fri, May 28, 2010 at 6:04 AM, Glen Bojsza <gbojsza at gmail.com> wrote:
>
>> I was wondering if anyone has done any work with VLC and Rev?
>>
>> If so, can you share your experiences!
I just Googled VLC and scripting, there is a limited amount of scripting you can do with VLC but you can do somethings.
The following is a combo of applescript and shell I found on Google.
sims
property timefromnow_time : date
on run
display dialog "Do you want the simpsons to end after a number of minutes?" buttons {"No", "Yes"}
copy the result as list to {button}
if button is "no" then
do shell script "/Applications/VLC.app/Contents/MacOS/VLC /var/root/T.V.\\ Programs/The\\ Simpsons > /dev/null 2>&1 & echo $!"
else if button is "yes" then
display dialog "Do you want to Shutdown or Quit?" buttons {"Quit", "Shutdown"}
copy the result as list to {button}
if button is "Quit" then
set quitresponse to display dialog "Number of minutes until Quit?" default answer "60"
set timer to (text returned of the quitresponse) as number
set timefromnow_time to (current date) + (timer * minutes)
display dialog "The simpsons will quit in: " & timefromnow_time as string
do shell script "/Applications/VLC.app/Contents/MacOS/VLC /var/root/T.V.\\ Programs/The\\ Simpsons > /dev/null 2>&1 & echo $!"
set pid to the result
do shell script "sleep " & (timer * minutes) as string
do shell script "kill " & pid & ""
else if button is "Shutdown" then
set shutdownresponse to display dialog "Number of minutes until Shutdown?" default answer "60"
set timer to (text returned of the shutdownresponse) as number
set timefromnow_time to (current date) + (timer * minutes)
display dialog "This computer will shut down at: " & timefromnow_time as string
do shell script "/Applications/VLC.app/Contents/MacOS/VLC /var/root/T.V.\\ Programs/The\\ Simpsons > /dev/null 2>&1 & echo $!"
do shell script "shutdown -h +" & timer as string & " Simpson shutdown"
end if
end if
end run
More information about the use-livecode
mailing list