OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Playing a Sound File with a Basic Macro

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Pharylon
Newbie
Newbie


Joined: 27 May 2011
Posts: 1

PostPosted: Fri May 27, 2011 10:14 am    Post subject: Playing a Sound File with a Basic Macro Reply with quote

Hey everyone,

I'm trying to get Calc to play a sound file as part of a macro, but I can't figure out how. Googling around, I found this thread (http://www.oooforum.org/forum/viewtopic.phtml?t=63630), but I can't make heads or tails of it. I'm kind of learning this as I go, and I'm still a bit of a noob. I looked over the code in that above link, but I don't see any obvious way to make it play the sound file I want. Even after I embed my own file (say, buzzer.mp3), how do I modify the macro so it tries to play "buzzer.mp3?"
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Fri May 27, 2011 2:47 pm    Post subject: Reply with quote

Hello

I think make a hyper link to the file you want play.

menu --> insert --> hyperlink

When you want use macro see here
http://www.oooforum.org/forum/viewtopic.phtml?t=98949&highlight=openurl+sub.

Romke
Back to top
View user's profile Send private message
hanya
Super User
Super User


Joined: 04 May 2005
Posts: 543
Location: Japan

PostPosted: Fri May 27, 2011 5:14 pm    Post subject: Reply with quote

Use com.sun.star.media.Manager_DirectX, com.sun.star.media.Manager_GStreamer or com.sun.star.media.Manager_Java service to play your sounds.
http://api.openoffice.org/docs/common/ref/com/sun/star/media/Manager.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group