Desmond
09-22-2003, 03:52 PM
<HTML><HEAD><TITLE>Using the Status Dialog Window</TITLE></HEAD><BODY><h3>Using the Status Dialog Window</h3><b>Document ID: IR10003</b><hr>The information in this article applies to:<ul><li>AutoPlay Media Studio 5.0 Professional Edition</li></ul><hr><h3>SUMMARY</h3><p>This article describes how to use the Status Dialog Window.</p><h3>DISCUSSION</h3><p>In AutoPlay Media Studio 5.0, it is possible to display a status dialog window to your user using built in actions. This is useful if, for example, your application uses a loop that takes quite a bit of time to complete.</p><p>As an example, we will create a loop that counts to 20,000, and display a status window letting the user know the status of the count:</p><ol><li>Create a button object, and add the following code to its On Click event:<code><pre>--set the minimum and maximum values
<br />minimum_value = 0;
<br />maximum_value = 20000;
<br />
<br />--Status dialog window settings
<br />--show the status dialog window
<br />StatusDlg.Show();
<br />
<br />--set the title
<br />StatusDlg.SetTitle("Counting from " .. minimum_value .. " to " .. maximum_value);
<br />
<br />--set the range of the meter
<br />StatusDlg.SetMeterRange(minimum_value, maximum_value);
<br />
<br />--counting loop
<br />--set the loop control variable
<br />loop_control = minimum_value;
<br />--while the loop control variable is less than or equal to the maximum value
<br />while loop_control <= maximum_value do
<br /> --set the meter position to the loop control variable
<br /> StatusDlg.SetMeterPos(loop_control);
<br /> --set the status text to reflect the current number
<br /> StatusDlg.SetStatusText("Currently Counting . . . (" .. loop_control .. " of " .. maximum_value .. ")");
<br /> --increment the loop control variable
<br /> loop_control = loop_control + 1;
<br />end</pre> </code> </li> </ol> <p>The above code when run will count to 20,000, and display a status dialog showing the progress of the loop.</p><h3>MORE INFORMATION</h3><p>For more information please see the following topics in the AutoPlay MediaStudio 5.0 help file:</p><ul><li><b>Program Reference | Actions | StatusDlg</b></li></ul><p>KEYWORDS: AutoPlay Media Studio 5.0, Actions, Status, Progress, Meter, Count</p><hr><FONT SIZE=1>Last reviewed: September 24, 2003<br>Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br></FONT></BODY></HTML>
<br />minimum_value = 0;
<br />maximum_value = 20000;
<br />
<br />--Status dialog window settings
<br />--show the status dialog window
<br />StatusDlg.Show();
<br />
<br />--set the title
<br />StatusDlg.SetTitle("Counting from " .. minimum_value .. " to " .. maximum_value);
<br />
<br />--set the range of the meter
<br />StatusDlg.SetMeterRange(minimum_value, maximum_value);
<br />
<br />--counting loop
<br />--set the loop control variable
<br />loop_control = minimum_value;
<br />--while the loop control variable is less than or equal to the maximum value
<br />while loop_control <= maximum_value do
<br /> --set the meter position to the loop control variable
<br /> StatusDlg.SetMeterPos(loop_control);
<br /> --set the status text to reflect the current number
<br /> StatusDlg.SetStatusText("Currently Counting . . . (" .. loop_control .. " of " .. maximum_value .. ")");
<br /> --increment the loop control variable
<br /> loop_control = loop_control + 1;
<br />end</pre> </code> </li> </ol> <p>The above code when run will count to 20,000, and display a status dialog showing the progress of the loop.</p><h3>MORE INFORMATION</h3><p>For more information please see the following topics in the AutoPlay MediaStudio 5.0 help file:</p><ul><li><b>Program Reference | Actions | StatusDlg</b></li></ul><p>KEYWORDS: AutoPlay Media Studio 5.0, Actions, Status, Progress, Meter, Count</p><hr><FONT SIZE=1>Last reviewed: September 24, 2003<br>Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br></FONT></BODY></HTML>