{"id":986,"date":"2019-03-25T17:33:08","date_gmt":"2019-03-25T20:33:08","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/"},"modified":"2025-08-13T13:51:50","modified_gmt":"2025-08-13T16:51:50","slug":"kb17370-playing-a-sound-file-whenever-alarm-is-active","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/","title":{"rendered":"KB-17370: Playing a sound file whenever alarm is active."},"content":{"rendered":"<p><strong>Question:<br \/>\n<\/strong><br \/>\nHow can I play a sound file whenever the alarm is active?<\/p>\n<p><strong>Solution:<\/strong><\/p>\n<p>To do so, you must create a new event in the <span style=\"font-weight: bold;\">Viewer <\/span>with this property\/expression: <span style=\"font-family: Courier New;\"><span style=\"color: #000000;\">AlarmServer1.ActiveAlarms <> 0<\/span><\/span><\/p>\n<p>Select &#8220;<em>Whenever the expression is true<\/em>&#8221; as the triggering event and check the option &#8220;<span style=\"font-style: italic;\">Repeat Event every 1000 ms&#8221;.<\/span> In the script, execute the <span style=\"font-style: italic;\">PlaySound <\/span>function.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<pre><span style=\"font-family: Courier New; color: #000000;\">Application<\/span><span style=\"font-family: Courier New; color: #000000;\">.Playsound(\"Alarm.wav\")<\/span><\/pre>\n<p><span style=\"text-decoration: underline;\">Notes regarding the sound file<\/span>:<\/p>\n<ul>\n<li>It must be in Windows sound format (.WAV extension).<\/li>\n<li>If the file is in the project (added via <span style=\"font-weight: bold;\">Insert resource<\/span> command), the name of the file must be between brackets. For example:<\/li>\n<\/ul>\n<pre style=\"padding-left: 40px;\"><span style=\"font-family: Courier New; color: #000000;\">Application.PlaySound(\"[ringin.wav]\")<\/span><\/pre>\n<ul>\n<li>If a folder was created in the project and the file was added via <span style=\"font-weight: bold;\">Insert resource<\/span> command, the file must be set between quotation marks. For example:<\/li>\n<\/ul>\n<pre style=\"padding-left: 40px;\"><span style=\"font-family: Courier New; color: #000000;\">\"Folder<\/span><span style=\"font-family: Courier New; color: #000000;\">\\ringing.wav\"<\/span><\/pre>\n<ul>\n<li>If the file is in the local folder, quotation marks will not be necessary, only the direct path.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Question: How can I play a sound file whenever the alarm is active? Solution: To do so, you must create a new event in the Viewer with this property\/expression: AlarmServer1.ActiveAlarms&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[732,763],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>KB-17370: Playing a sound file whenever alarm is active. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KB-17370: Playing a sound file whenever alarm is active.\" \/>\n<meta property=\"og:description\" content=\"Question: How can I play a sound file whenever the alarm is active? Solution: To do so, you must create a new event in the Viewer with this property\/expression: AlarmServer1.ActiveAlarms&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:33:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-13T16:51:50+00:00\" \/>\n<meta name=\"author\" content=\"Elipse Software\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elipse Software\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/\"},\"author\":{\"name\":\"Elipse Software\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\"},\"headline\":\"KB-17370: Playing a sound file whenever alarm is active.\",\"datePublished\":\"2019-03-25T20:33:08+00:00\",\"dateModified\":\"2025-08-13T16:51:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/\"},\"wordCount\":311,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"AlarmServer \/ AlarmConfig\",\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/\",\"name\":\"[:pt]KB-17370: Playing a sound file whenever alarm is active.[:en]KB-17370: Playing a sound file whenever alarm is active.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:33:08+00:00\",\"dateModified\":\"2025-08-13T16:51:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KB-17370: Playing a sound file whenever alarm is active.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\",\"name\":\"Elipse Software\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"caption\":\"Elipse Software\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KB-17370: Playing a sound file whenever alarm is active. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]KB-17370: Playing a sound file whenever alarm is active.[:en]KB-17370: Playing a sound file whenever alarm is active.[:] - Elipse Knowledgebase","og_description":"Question: How can I play a sound file whenever the alarm is active? Solution: To do so, you must create a new event in the Viewer with this property\/expression: AlarmServer1.ActiveAlarms&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:33:08+00:00","article_modified_time":"2025-08-13T16:51:50+00:00","author":"Elipse Software","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elipse Software","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/"},"author":{"name":"Elipse Software","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87"},"headline":"KB-17370: Playing a sound file whenever alarm is active.","datePublished":"2019-03-25T20:33:08+00:00","dateModified":"2025-08-13T16:51:50+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/"},"wordCount":311,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["AlarmServer \/ AlarmConfig","Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/","url":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/","name":"[:pt]KB-17370: Playing a sound file whenever alarm is active.[:en]KB-17370: Playing a sound file whenever alarm is active.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:33:08+00:00","dateModified":"2025-08-13T16:51:50+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/kb17370-playing-a-sound-file-whenever-alarm-is-active\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"KB-17370: Playing a sound file whenever alarm is active."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87","name":"Elipse Software","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","caption":"Elipse Software"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/986"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=986"}],"version-history":[{"count":10,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/986\/revisions"}],"predecessor-version":[{"id":17228,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/986\/revisions\/17228"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=986"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}