Page 1 of 1
Viewing PowerPoint show inside a card
Posted: Wed Dec 05, 2012 2:41 am
by ProNothing
I am building a fairly simple UI for a kiosk touch screen computer. I have a number of PowerPoint Shows already built with animations and embedded videos that I need to use within my application. Currently I have my application set to open and run the PowerPoint show but it opens outside of the application and once finished with the show the user must close PowerPoint Viewer before returning to my application's UI. I would like to have the PowerPoint show run inside a window in one of my cards with the ability to advance slides manually.
Is this possible? Easy? Any suggestions?
Thank you!
Josh
Re: Viewing PowerPoint show inside a card
Posted: Wed Dec 05, 2012 3:56 am
by Mark
Hi Josh,
You could save your PowerPoint presentation as a movie and embed the movie in LC. Another way is to export the slides as pictures, but obviously you'd lose the animations.
Can't you make your presentations in LC?
Kind regards,
Mark
Re: Viewing PowerPoint show inside a card
Posted: Wed Dec 05, 2012 4:07 am
by ProNothing
Hi Mark,
Thank you for your response.
The PPT presentations have already been created for me to use. I'd rather not go down the road of exporting each slide and recreating in LC.
I have exported them as a movie and brought them into LC as an fail-safe option, but I actually want to be able to control the show (going forward or backward as needed).
Re: Viewing PowerPoint show inside a card
Posted: Wed Dec 05, 2012 12:01 pm
by Klaus
Hi Josh,
unless you (or someone else) will write an external that lets you display native PPT
documents in Livecode, you will need to go the export to movie/screenshot route!
Best
Klaus
Re: Viewing PowerPoint show inside a card
Posted: Wed Dec 05, 2012 9:02 pm
by ProNothing
Thank you Klaus. I was hoping I was just missing something in LC that would allow me to do this. But, I guess not.
I did look into saving the PPT as html and then running it through revbrowser, but saving PowerPoint as html doesn't save the animations either.
Thanks,
Josh
Re: Viewing PowerPoint show inside a card
Posted: Thu Dec 06, 2012 12:13 am
by sturgis
Just curious, does google docs have powerpoint support? If so, you might be able to pop the files up to google and then use a browser instance to work with them.
Re: Viewing PowerPoint show inside a card
Posted: Thu Dec 06, 2012 12:37 am
by ProNothing
Hi Sturgis,
Interesting thought. It does seem that google docs has some sort of ppt support. Probably enough you could use a browser instance. But I've discovered if there is video embedded in the presentation google docs will not work.
Thank you,
Josh
Re: Viewing PowerPoint show inside a card
Posted: Tue Dec 11, 2012 6:19 am
by ProNothing
I've decided to export all the PowerPoint slides as images and get rid of the animations. But, now my next issue. I've modified Klaus' "auto_slide_lite" to fit my project. As a slide show it works well, with only a next button and previous button. I'd like to add a looping function that only advances slides if there has not been any mouse clicks during a specified amount of time.
I've tried a number of options and it seems like it should be pretty simple but I can’t get it to work correctly (I am quite a noob). How do I script this to get the slides to advance automatically after 10 seconds, but only if there has not been a mouse click within those 10 seconds?
Thank you,
Josh
Re: Viewing PowerPoint show inside a card
Posted: Tue Dec 11, 2012 9:42 pm
by ProNothing
I think I figured this out. I'm sure this is not the most ideal setup but it seems to work so far. Can anyone see an issue with this?
Code: Select all
## Inorder to loop a set of slides only if there is no user input, but if there is user input reset the loop timer.
Global tTimer
on idle
if the seconds > tTimer + 10 then
send mouseup to the button "next"
put the seconds into tTimer
end if
--pass idle
end idle
on mouseup ##there is a pass mouseup on both the next and previous buttons
put the seconds into tTimer
end mouseup
Thanks,
Josh
Re: Viewing PowerPoint show inside a card
Posted: Tue Dec 11, 2012 11:34 pm
by Mark
Hi Josh,
What about this:
Code: Select all
local lMouseClicked
on showSlides
if not lMouseClicked then
go next cd
send showSlides to me in 10 seconds
end if
end showSlides
on mouseUp
put true into lMouseClicked
end mouseUp
on openStack
put false into lMouseClicked
send showSlides to me in 10 seconds
end openStack
It is not recommended to use idle, because idle takes a relatively large amount of processing power.
Kind regards,
Mark
Re: Viewing PowerPoint show inside a card
Posted: Wed Dec 12, 2012 7:40 pm
by jacque
Mark is right that sending a message is better than idle. I think one handler needs a slight revision:
Code: Select all
on showSlides
if not lMouseClicked then
go next cd
send showSlides to me in 10 seconds
put false into lMouseClicked -- resets it
end if
end showSlides
That should make it work more than once.
Re: Viewing PowerPoint show inside a card
Posted: Wed Dec 12, 2012 8:46 pm
by Mark
Jacue,
No, that won't work. What are you trying to do? If you want the script to only wait 10 seconds extra after a mouseClick, you need this:
Code: Select all
on showSlides
if not lMouseClicked then
go next cd
end if
send "showSlides" to me in 10 seconds
put false into lMouseClicked
end showSlides
However, a much better solution would be a change in the mouseUp handler:
Code: Select all
on mouseUp
if lMouseClicked is true then
put false into lMouseClicked
put the pendingMessages into myMsgs
filter myMsgs with "showSlides"
repeat for each line myMsg in myMsgs
cancel item 1 of myMsg
end repeat
go next cd
send "showSlides" to me in 10 secs
else
put true into lMouseClicked
end if
end mouseUp
Mark