Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alert on operation completion in windows cmd

Using windows cmd I have to put large programs on compilation which take large amount of time. Everytime to know whether operation is complete or not I have to check cmd again and again. I want to know whether there is way by which I can make changes to cmd such that it gives me a signal that operation has been completed by playing sound or by opening a dialog etc.

Please share if anyone has some idea

like image 461
sv_jan5 Avatar asked Jun 11 '15 08:06

sv_jan5


2 Answers

There can be many ways to achieve this

This is the easiest

  • While your code is compiling (ie compiling has just began) in the same cmd prompt

    type " ctrl + G " and press enter this will go to the input stream of cmd and will wait there until it can be executed , ctrl +G is the BEL character which gives you a single beep when you execute it . You can also enter multiple BEL characters to get multiple beeps upon completion of the task.

  • A harder way could be , to write a python script that executes the compilation command say "g++ my_prog.cpp" and upon completion plays a sound or give you a simple popup notification via a windows message box.

like image 173
Namit Sinha Avatar answered Oct 23 '22 11:10

Namit Sinha


Include in yout batch file

msg console /time:3600 "The task has ended"

Send a message to the console and keep it open (if not closed by the user) 3600 seconds (if not indicated there is a 60 seconds timeout).

like image 2
MC ND Avatar answered Oct 23 '22 13:10

MC ND