2012-10-01 53 views
0

我想通過螞蟻採取輸入密碼,我試圖使用<input message但它顯示輸入的字符/密碼。<輸入消息螞蟻顯示輸入輸入

而不是顯示輸入的字符我想顯示'*'字符可以有人告訴我怎麼可能。

感謝, rbhawsar

回答

1

由於螞蟻1.8,你可以指定<input/>標籤類型的內額外<handler/>標籤 「安全」:

<target name="test.input"> 
    <input message="Type password:" addproperty="pwd"> 
    <handler type="secure" /> 
    </input> 
    <echo message="Password is: ${pwd}" /> 
</target> 

documentation。甚至可以編寫自己的輸入處理程序類。

我在Windows DOS框中測試它,它工作。但是它沒能在cygwin xterm會話中工作(顯示字符)。