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,DIET_1,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:6602:: with SMTP id k2-v6mr3830883jac.37.1531969020742; Wed, 18 Jul 2018 19:57:00 -0700 (PDT) X-Received: by 2002:aca:de07:: with SMTP id v7-v6mr1662807oig.5.1531969020509; Wed, 18 Jul 2018 19:57:00 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder4.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g2-v6no253453itf.0!news-out.google.com!k71-v6ni1184itk.0!nntp.google.com!d7-v6no268274itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 18 Jul 2018 19:57:00 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.209.154.211; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 71.209.154.211 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8771f075-4142-45ef-b636-80d407fedd7f@googlegroups.com> Subject: Re: How to run a GNAT program without starting a terminal session From: Jerry Injection-Date: Thu, 19 Jul 2018 02:57:00 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53904 Date: 2018-07-18T19:57:00-07:00 List-Id: On Monday, July 16, 2018 at 6:20:50 PM UTC-7, Jerry wrote: > How can I get Ada (GNAT) to run a program that has no text I/O without la= unching a terminal session? Specifically, on macOS, I have the following pr= ogram. When I double-click it, it runs but first it opens Terminal.app and = starts a session. I played with calling it from Applescript but without suc= cess. Can I make a bash file that doesn't start a terminal session? >=20 >=20 > with Ada.Calendar; use Ada.Calendar; > with Common; -- Contains "Beep". >=20 > procedure Run is > begin > Delay 4.0; > Common.Beep(1); > end Run; >=20 >=20 > Jerry It looks like there is no easy answer to the original question, how to run = a GNAT program without a terminal, but here is a solution to my immediate p= roblem with some do-dads added. Sorry, it's not Ada. It's Applescript. The = Applescript compiler bundles this up nicely as a double-clickable applicati= on bundle and does what I want. (The dialog box at the end is a little grat= uitous.) afplay plays any audio file. delay 30 do shell script "afplay '/System/Library/Sounds/Frog.aiff'" delay 15 do shell script "afplay '/System/Library/Sounds/Ping.aiff'" delay 13 beep delay 1 beep delay 1 beep say "Stop running Jerry" volume 0.5 display dialog "Stop running!" buttons {"OK"} default button 1 What is this piece of silliness? For some time I have taken seriously the c= laim that sitting for long periods of time is unhealthy, and consequently I= set my computer to announce the time every half hour at which time I am *s= upposed* to get up and run in place for one minute. I believe that this is = a simple version of interval training and can actually cause me to lose a l= ittle weight. The problem is that I have to watch an analog on-screen clock= to see when to stop and this does not always have a background that makes = the clock easy to see, plus I have to stick next to the computer. Using a u= tility, I launch this program with a simple key combination. Jerry