title: Reading GUI Data from a Matlab Script File
body: <p>I created a GUI named SCADA and I added a boolean variable called StatusData which is a flag that that is set to false when the GUI is launched</p>
  
  <pre><code>handles.StatusData=false;
  guidata(handles.output,handles);
  </code></pre>
  
  <p>I press a button and then a function is called which executes continuously (the function has infinite loop). After some time I press another button which sets the StatusData to true. </p>
  
  <pre><code>handles.StatusData=true;
  guidata(handles.output,handles);
  </code></pre>
  
  <p>Now, I need to access the <code>StatusData</code> from the callback function (the same function I mentioned above), In order to acheieve this I sent the handle as a parameter when I called that function. Now, When the pressed the button that changes the StatusData, the data in the actual handle changes but I cannot access the updated StatusData as the function is already called.</p>
  
  <p>How can I access the updated handle of GUI without sending it as a parameter.</p>
  
  <p>Thanks</p>