Skip to content

Commit

Permalink
Updated to support latest version of Adobe Audition, and improved aut…
Browse files Browse the repository at this point in the history
…o-save functionality.
  • Loading branch information
Hennamann committed Aug 22, 2019
1 parent 23d8855 commit c5e19ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CSXS/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<ExtensionManifest Version="5.0" ExtensionBundleId="com.henrikstabell.audnotes" ExtensionBundleVersion="1.0.9" ExtensionBundleName="Notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ExtensionManifest Version="5.0" ExtensionBundleId="com.henrikstabell.audnotes" ExtensionBundleVersion="1.1.0" ExtensionBundleName="Notes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Author>
<![CDATA[
Ole Henrik Stabell
]]>
</Author>
<ExtensionList>
<Extension Id="com.henrikstabell.audnotes" Version="1.0.9" />
<Extension Id="com.henrikstabell.audnotes" Version="1.1.0" />
</ExtensionList>
<ExecutionEnvironment>
<HostList>
<Host Name="AUDT" Version="[8.0,14.0]" />
<Host Name="AUDT" Version="8.0" />
</HostList>
<LocaleList>
<Locale Code="All" />
Expand Down
10 changes: 7 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

<div id="content">
<form id="notes-form">
<textarea id="notes" data-property="logComment" data-namespace-ref="NS_DM" data-namespace="http://ns.adobe.com/xmp/1.0/DynamicMedia/"></textarea>
<textarea id="notes" data-property="logComment" data-namespace-ref="NS_DM"
data-namespace="http://ns.adobe.com/xmp/1.0/DynamicMedia/"></textarea>
<center><button type="button" class="btn-small" id="save-as">Save As</button></center>
</form>
<br>
Expand Down Expand Up @@ -53,23 +54,26 @@

//Set up the event listener on the ExtendScript side:
csInterface.evalScript("addDocumentListeners()");
// Save the notes when Audition saves the document, (This is a bit of a hack, using extendscript events, as the CEP documentAfterSave event does not seem to be working despite Audition being on the list of supported apps...
// Save the notes when Audition saves the document.
csInterface.addEventListener("com.adobe.csxs.events.DocumentSaveAs", function (event) {
$('#notes-form').submit()
})

// This does not work, unsure as to why, the custom event never fires despite unsupported documents being used...
csInterface.addEventListener("DocumentNotSupported", function (event) {
$('#notes').prop('disabled', true);
$('#save-as').prop('disabled', true);
})

// Same with this as the one above.
csInterface.addEventListener("DocumentSupported", function (event) {
$('#notes').prop('disabled', false);
$('#save-as').prop('disabled', false);
})

// Reload the notes panel when changing active document
// Reload the notes panel when changing active document aswell as save the current notes before switching
csInterface.addEventListener("com.adobe.csxs.events.DocumentAfterActivate", function (event) {
$('#notes-form').submit()
location.reload();
})

Expand Down

0 comments on commit c5e19ac

Please sign in to comment.