<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Sound to verify document has been saved"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=133585#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - Sound to verify document has been saved"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=133585">bug 133585</a>
from <span class="vcard"><a class="email" href="mailto:heiko.tietze@documentfoundation.org" title="Heiko Tietze <heiko.tietze@documentfoundation.org>"> <span class="fn">Heiko Tietze</span></a>
</span></b>
<pre>(In reply to neil from <a href="show_bug.cgi?id=133585#c11">comment #11</a>)
<span class="quote">> Can you tell me if I could build a macro to do this.</span >
With pleasure. Took this as example
<a href="https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=57699">https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=57699</a>#
Sub Main
oSounMgr = CreateUnoService("com.sun.star.comp.media.Manager_GStreamer")
If NOT IsNull(oSounMgr) Then
oSfa = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
sBaseURL = CreateUnoService("com.sun.star.util.PathSubstitution")._
substituteVariables("$(inst)/share/gallery/sounds", True)
sSound1 = sBaseURL & "/ok.wav"
If oSfa.exists(sSound1) Then
oPlayer1 = oSounMgr.createPlayer(sSound1)
oPlayer1.setPlaybackLoop(False)
oPlayer1.start()
while oPlayer1.isplaying()
doevents
wend
End If
End If
End Sub
Use Tools > Customize > Events to bind save to this macro.
(In reply to neil from <a href="show_bug.cgi?id=133585#c11">comment #11</a>)
<span class="quote">> Know anywhere I could look online?</span >
We have some guides for macros [1], some more information [2], and formed a
help team recently [3]. And questions like this are also well suited for
ask.libreoffice.org.
[1] <a href="https://documentation.libreoffice.org/en/english-documentation/macro/">https://documentation.libreoffice.org/en/english-documentation/macro/</a>
[2] <a href="https://wiki.documentfoundation.org/Macros">https://wiki.documentfoundation.org/Macros</a>
[3]
<a href="https://blog.documentfoundation.org/blog/2020/04/08/libreoffice-macro-team-progress-report-2/">https://blog.documentfoundation.org/blog/2020/04/08/libreoffice-macro-team-progress-report-2/</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>