Opening the file with notepad is easy: <property name="logfile" value="log.txt"/> <macrodef name="log"> <attribute name="msg"/> <sequential> <echo file="${logfile}" append="true" message="@{msg}${line.separator}"/> </sequential> </macrodef> <macrodef name="notepad"> <attribute name="file" default="${logfile}"/> <sequential> <exec executable="notepad" taskname="notepad"> <arg value="${logfile}"/> </exec> </sequential> </macrodef>
<log msg="one message"/> <log msg="another message"/> <notepad/> But this is only possible on systems where notepad exists (means Windows). You could also write a java application which shows the message and start that via <java> You could also write a BuildListener. That could scan the fireMessage() for special words like "alert", store these messages and open a java windows with them on buildFinished(). Just some ideas ... Jan >-----Ursprüngliche Nachricht----- >Von: Mario Madunic [mailto:[EMAIL PROTECTED] >Gesendet: Donnerstag, 25. Oktober 2007 15:36 >An: user@ant.apache.org >Betreff: possible to open an alert window? > >Was wondering if it is possible to open an alert window? What >I want to do is >change an alert via <echo> because some users are missing it >and have an alert >window open stating that there is an error log to view. So far >I the code checks >to see the size of an error log and if its file size is >greater than 0 then >output an message on the command window, if not then delete the file. > > ><length file="error\artError${l_Docset}.txt" >property="articleErrorFileSize" /> > > <if> > <equals arg1="${reviewErrorFileSize}" arg2="0" /> > <then> > <delete file="error\revError${l_Docset}.txt" /> > </then> > <else> > <echo /> > <echo>There where errors during ingest into the database >of the reviews >for ${l_Docset}</echo> > <echo>Please review the following error file: >error\revError${l_Docset}.txt</echo> > <echo /> > </else> > </if> > >The other idea I have if I can't open an alerter window is to >open the file >using notepad. > >Any help will be appreciated. > >Using ANT 1.7 >Windows XP >Java 1.6 > >Thanks > >Marijan (Mario) Madunic > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]