Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: end of do-file notify

From   Dan Blanchette <>
Subject   Re: st: end of do-file notify
Date   Fri, 17 Aug 2012 14:49:39 -0400 (EDT)


I came up with this idea.

Save this code as beep_me.ado and put it in your ado\plus\b directory:

program beep_me
version 9
args n_beeps

if missing("`n_beeps'") {
  local n_beeps= 3
forvalues n= 1/`n_beeps' {
  sleep 1000
shell pause


Then run your code inside -capture noisily- and follow it with -beep_me- like so:

capture noisily {
  sysuse auto, clear
  tab turn

By default -beep_me- will beep 3 times with a second between beeps unless
you specify how many beeps you want:

. beep_me 10

At the end -beep_me- will have a Windows shell window pop-up with the message:
 Press any key to continue . . .

So, when you see that window you have to remember that it was caused by -beep_me-
and your do-file is done or stopped due to an error.

Dan Blanchette

Research Programming Services
Carolina Population Center
University of North Carolina

From 	  Carsten Sauer <>
Subject 	  Re: st: end of do-file notify
Date 	  Fri, 17 Aug 2012 19:23:39 +0200

Hi Pablo,
you could use the -beep- command at the end of your do-file:

sysuse auto, clear
reg weight length foreign

Best, Carsten

Am 17.08.2012 18:47, schrieb Pablo Bonilla:

    Dear stata list,

    Some times when I am running a do-file I don't know how to make it
    notify me that it already finished running the do-file or it found an
    error on it. I usually go to excel or internet while Stata is running
    and some times the window bar at the bottom of the screen blinks and
    some times it does not. I have tried minimizing Stata but it does not
    work always.

    Is there a way to know when Stata finished and therefor don't waste to
    much time??


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index