Oh, yes. But I would write a scriptdef ...

<project>
    <scriptdef name="alert" language="beanshell">
        <attribute name="message"/>
        <attribute name="title"/>
        <![CDATA[
            title   = attributes.get("title");
            message = attributes.get("message");
            
            if (title==null) {
                title =  "Ant Alert!";
            }

            import javax.swing.*;
            JOptionPane.showMessageDialog(
                null, message,
                title, JOptionPane.ERROR_MESSAGE);
        ]]>
    </scriptdef>
    
    <alert message="A long and boring message"/>
    <alert message="A long and boring message" title="Danger Danger"/>

</project> 

>-----Ursprüngliche Nachricht-----
>Von: Mario Madunic [mailto:[EMAIL PROTECTED] 
>Gesendet: Donnerstag, 25. Oktober 2007 18:47
>An: Ant Users List; Peter Reilly
>Betreff: Re: possible to open an alert window?
>
>Thanks that is great.
>
>Marijan (Mario) Madunic
>
>Quoting Peter Reilly <[EMAIL PROTECTED]>:
>
>> or use <script>
>>     <script language="beanshell">
>>       import javax.swing.*;
>>       JOptionPane.showMessageDialog(
>>           null, "A long and boring message",
>>          "Danger Danger", JOptionPane.ERROR_MESSAGE);
>>     </script>
>> 
>> Peter
>> 
>> 
>> On 10/25/07, Rebhan, Gilbert <[EMAIL PROTECTED]> wrote:
>> >
>> >
>> > -----Original Message-----
>> > From: Mario Madunic [mailto:[EMAIL PROTECTED]
>> > Sent: Thursday, October 25, 2007 3:36 PM
>> > To: user@ant.apache.org
>> > Subject: 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.
>> > */
>> >
>> > once used net send in a windows LAN to prevent sending 
>emails like that
>> > =
>> >
>> > 1. template
>> > a file netsendbase.txt, must be all on one line !! =
>> >
>> > FOR /F %%i in (netsend_to.txt) do @Net Send %%i 
>CruiseControlMessage :
>> > Build  [EMAIL PROTECTED]@ * successful - Please start * @toStart@ * asap !!
>> >
>> > 2. configure recipients
>> > a file netsend_to.txt, with 1 recipient per line =
>> >
>> > userID1
>> > userID2
>> > buildadmin1
>> > ...
>> >
>> > 3. ant part
>> >
>> > <delete file="./bat/netsend.bat"/>
>> > <filter token="project" value="${projectname}"/>
>> >  <filter token="toStart" value="${tostart}"/>
>> > <copy file="./bat/netsendbase.txt" tofile="./bat/netsend.bat"
>> > filtering="true"/>
>> >
>> > <exec dir="./bat" executable="cmd.exe" os="Windows 2000">
>> >   <arg line="/c netsend.bat"/>
>> > </exec>
>> >
>> > as alternative, if you need to 'decorate' your ant script with
>> > interactive
>> > gui's then use AntForm, see =
>> > http://antforms.sourceforge.net/
>> >
>> > Regards, Gilbert
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > 
>---------------------------------------------------------------------
>> > 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]
>> 
>> 
>
>
>
>---------------------------------------------------------------------
>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]

Reply via email to