Thanks to all who sent suggestions. Here's what I came up with (beware line wraps):

global passwd

on keydown whichKey
  put word 2 of the selectedChunk of me into sChar
  put word 4 of the selectedChunk of me into eChar
  if eChar > sChar then -- some text is selected
    delete char sChar to eChar of me
    delete char sChar to eChar of passwd
  end if
  put word 2 of the selectedChunk of me into sChar
  put word 4 of the selectedChunk of me into eChar
  put whichKey after char eChar of passwd
  put numtochar(165) after char eChar of me
end keyDown

on backspaceKey
  put word 2 of the selectedChunk of me into sChar
  put word 4 of the selectedChunk of me into eChar
  if eChar > sChar then -- text is selected
    delete char sChar to eChar of me
    delete char sChar to eChar of passwd
  else
    delete char eChar of me
    delete char eChar of passwd
  end if
end backspaceKey

on deleteKey
  put word 2 of the selectedChunk of me into sChar
  put word 4 of the selectedChunk of me into eChar
  if eChar > sChar then -- text is selected
    delete char sChar to eChar of me
    delete char sChar to eChar of passwd
  else
    delete char eChar of me
    delete char eChar of passwd
  end if
end deleteKey

on returnInField
  click at the loc of btn "connect"
end returnInField

On Aug 18, 2004, at 1:25 PM, Devin Asay wrote:

All,

I'm writing an app that simulates a network server login on Mac OS X. I want the password field to behave just like normal password fields in OS X; i.e., bullet characters appear in place of clear text. I've sorta kinda got it working by trapping the keydown message in the password field, but it's quirky. Before I spend a lot of time on this, I thought I'd ask: Has anyone done this and would mind sharing a script?

Thanks.

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to