From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 19 Jul 2018 10:25:45 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: How to run a GNAT program without starting a terminal session Date: Thu, 19 Jul 2018 11:25:45 -0400 Organization: IISS Elusive Unicorn Message-ID: References: <7461ada5-9bc3-43f5-98b0-b2930d9145bc@googlegroups.com> User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-rRArtd8M6aDIAgBZydONnU85cHwObeBDgDw/QF13A7od2kDs61fczoBEwcVrqj2gsQG55pSb7XQFa7P!jgG20Y4cM7n7T5Ffv0ynwRvFxJszjZWcx27vYwX3x64ty459pnv51NzhOC0iaizR0jOoc4fp X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3497 Xref: reader02.eternal-september.org comp.lang.ada:53909 Date: 2018-07-19T11:25:45-04:00 List-Id: On Wed, 18 Jul 2018 23:59:47 -0700 (PDT), Jerry declaimed the following: >However, my "Beep" function uses Character'val(7), the ASCII bell--macOS normally interprets this to play the default system sound which for some reason is not making it to my speakers when run from Automator/Applescript but does work when run from terminal. But I have a function called Execute_Shell() which binds to the ?C command like this: pragma Import(C, system). Then if I put > If your Beep() is relying upon the \a ("alert") >>> ord("\a") 7 >>> CHARACTER, then the function must be sending it to some I/O stream. Typically it is the console (stdout), and producing a sound is the responsibility of the console when it SEES the \a byte. If you run the program in some form that redirects stdout to a bit-bucket or file (or to a text window that does NOT interpret ASCII control codes) then nothing will trigger to play a sound -- it is just a non-printable character.. >say hello > >as the command string for Execute_Shell and drop it into the Automator workflow as described in your link, it _does_ work correctly. Applescript probably gets the same result. What does "work correctly" mean here? {after a short bit of Google} Do you mean the text shows up in a log window? Log windows likely do not interpret most control codes (probably nothing beyond ). Or is "say" a voice synthesizer? If so, it is the "say" command itself that is driving the speakers. https://stackoverflow.com/questions/7408785/is-there-a-way-to-play-a-system-beep-on-mac-os {Note that pretty much all examples are "command line" -- ie; console/terminal -- programs; nothing that does not have an attached console} https://stackoverflow.com/questions/3127977/how-to-make-the-hardware-beep-sound-in-mac-os-x-10-6 {Closest answer here is the response to use "afplay" with a sound file; everything else is, again, console/terminal} -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/