solve puzzle with a tweet? javascript (fun challenge) the question is "complete this subtraction by replacing the asterisks with digits so the numbers 1-9 only appear once each"

 9**
-*4*
____
 **1


my code tries random numbers until it works, and displays the answer.  here is the entire html app.  I want one to fit in a tweet at 140 characters  (not counting  tags)

&lt;script&gt;
function r(){return Math.random()*9+1^0}
do{a=900+r()*10+r(),b=r()*100+40+r(),c=a-b,s=''+a+b+c
}while(c%10!=1||eval('for(i=0;i++&lt;9;)if(s.indexOf(i)&lt;0)1'))alert(s)
&lt;/script&gt;


Is there any way to make this shorter, including with a different solution? 

SOLVED!:
Thanks Peter, Shmiddty and copy, currently I have 91 chars!

for(x=1;++x&lt;999;)for(y=1;y&lt;x;)/(?!.*0|.*(.).*\1)9...4...1/.test(s=''+x+y+(x-y++))&amp;&amp;alert(s)
JavaScript (118 110 102 96 95 99 98 93 chars)

for(x=1;x;x++)for(y=1;y&lt;x;)/(?!.*0|.*(.).*\1)9...4...1/.test(s=''+x+y+(x-y++))&amp;&amp;alert(s,x=-1)


This will give the lexicographically smallest solution. Thanks to copy for 98->93.

You can enumerate all of them for 91 chars:

for(x=1;++x&lt;999;)for(y=1;y&lt;x;)/(?!.*0|.*(.).*\1)9...4...1/.test(s=''+x+y+(x-y++))&amp;&amp;alert(s)


Thanks to Shmiddty for pointing out a standard optimisation which slipped straight past me.

Allowing 0 as well, in &lt;2.5 tweets, here's the analysis:

9ab-c4d=ef1; b-d in {1,-9}; 2nd =&gt; d=9 so bd in {32,65,76,87}, no carry. a-f in {4,*-6} so af in {62,73,*06,*28}. 9-c=e or *8-c=e so ce in
{27,36,63,72} or *{08,26,35,53,62,80}. af in {62,73} =&gt; no ce. af in {06,28} =&gt; ce in {35,53}; 06 =&gt; bd=87; 28 =&gt; bd=76. So four solutions:
927-346=581; 927-546=381; 908-347=561; 908-547=361


Removing 0 shrinks the analysis to fit in two tweets:

9ab-c4d=ef1; b-d in {1,-9}; 2nd =&gt; d=9 so bd in {32,65,76,87}, no carry. a-f in {4,*-6} so af in {62,73,*28}. 9-c=e or *8-c=e so ce in
{27,36,63,72} or *{26,35,53,62}. af in {62,73} =&gt; no ce. af=28 =&gt; ce in {35,53} =&gt; bd=76. So 927-346=581; 927-546=381.