Sample 37197: Generating a sound when a task finishes in SAS® Enterprise Guide®
Overview
This sample can be helpful when there is a need within SAS Enterprise Guide to have an audible notification when either a project or a specific task is complete. For example, you might be very busy with other applications or other SAS Enterprise Guide projects, and you don't want to keep checking the status of the project to see if your task has completed.
This sample includes easy steps and simple code that you can use to generate a series of sounds when a particular task is finished. You can also create unique tones, different lengths of sounds, and different numbers of sounds to indicate when different tasks are complete.
This sample was created using SAS Enterprise Guide 4.1.
This code will work from SAS Enterprise Guide when running against SAS that resides on the same machine. One of the goals for a future version of SAS Enterprise Guide is to have a more interactive method for updating the user when certain parts of a project are finished, and to have this functionality work for any server connection.
Creating the Sound
- Open a project that you want to generate a sound after a particular task completes.
- Select File ► New ► Code.
- Enter the code snippet below into the Code window.
data _null_;
call sound(659,200);
call sound(587,200);
call sound(523,200);
run;
|
- Close the Code window.
- From the Project Designer window, right-click on the task node that you want to execute before the sounds are generated and select Link task_name to.
- Select the Code node that you previously created, and then click OK.
- From the Project Designer window, right-click on the same task node again and select Run Branch From task_name.
When the task completes, the next step in the branch will cause the code node to execute, which will then generate three short sounds indicating that the task is finished.
Additional Documentation
For more information about the CALL SOUND routine, see Functions and CALL Routines under Windows: CALL SOUND Routine.
For more information about using SAS Enterprise Guide, see the SAS Enterprise Guide documentation page.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample can be helpful when there is a need within SAS Enterprise Guide to have an audible notification when either a project or a specific task is complete.
| Date Modified: | 2009-09-30 11:09:01 |
| Date Created: | 2009-09-17 11:49:57 |
Operating System and Release Information
| SAS System | SAS Enterprise Guide | Microsoft Windows 2000 Advanced Server | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Datacenter Server | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Server | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows 2000 Professional | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows NT Workstation | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Datacenter Edition | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Enterprise Edition | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2003 Standard Edition | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows Server 2008 | 4.1 | | 9.1 TS1M3 SP4 | |
| Microsoft Windows XP Professional | 4.1 | | 9.1 TS1M3 SP4 | |
| Windows Vista | 4.1 | | 9.1 TS1M3 SP4 | |