Tibco SPOTFIRE 7.5 how execute a custom script on load of analisys
<p>I have to execute a script on load of an Spotfire analisys. 
I used this method:</p>

<p><strong>JScript</strong>:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$(function () {
 function executeScript() {
 $('#hiddenBtn input').click();
 }
$(document).ready(function(){executeScript()});
});</code></pre>
</div>
</div>
</p>

<p><strong>HTML:</strong></p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;Span style="display:none" id="hiddenBtn"&gt;
&lt;SpotfireControl id="f8322a6109af43fb935ad6e7bcb1f1fc" /&gt;&lt;/span&gt;</code></pre>
</div>
</div>

<strong>IronPython script on HiddenButton:</strong></p>

<pre><code>if Document.Properties["OpenedYet"] == False:
Document.Properties["OpenedYet"] = True
## Script you are trying to run on open here
</code></pre>

<p><strong>BUT</strong></p>

<p>the event $(document).ready() FIRE continuously and script was executed continuously.
I tried with $(document).load()  or $(window).load() but the event was never fired.
There is a way to execute a script <strong>ONCE</strong> on load?</p>