Ask Password and Login Screen

John Tregea john at debraneys.com
Thu Aug 18 20:54:28 EDT 2011


Hi,

I used a different approach to this question as the bulleted text font
didn't seem that secure. The following code just traps the characters
entered into a field and replaces them with "*" while storing the actual
string into a global variable.

on openfield
  global gThePass
  put empty into gThePass
    put empty into fld "password"
pass openfield
end openfield

on keydown thekey
  global gThePass
  put thekey after gThePass
  put "*" after field "Password"
end keydown

on backspacekey
  global gThePass
  put empty into fld "password"
  put empty into gThePass
end backspacekey


on returninfield
  global gTheUser
  send mouseup to btn "Login"
  exit returninfield
end returninfield

The only downside is that if the user makes a mistake and types a backspace
they have to start all over again.

Hope this helps.

Regards

John

-----Original Message-----
From: use-livecode-bounces at lists.runrev.com
[mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Jim Ault
Sent: Friday, 19 August 2011 10:47 AM
To: How to use LiveCode
Subject: Re: Ask Password and Login Screen

The option-8 is not always a bullet.
It depends on the font
and the high-ascii assignments.

It could be as simple as choosing the correct font for the platform you
detect.

Jim Ault
Las Vegas

--- On Wed, 8/17/11, Devin Asay <devin_asay at byu.edu> wrote:

From: Devin Asay <devin_asay at byu.edu>
Subject: Re: Ask Password and Login Screen
To: "How to use LiveCode" <use-livecode at lists.runrev.com>
Date: Wednesday, August 17, 2011, 12:31 PM


On Aug 17, 2011, at 10:18 AM, Bob Sneidar wrote:

> Do the bullets show up as bullets in Windows as well as Mac? I know the
option-8 ascii code on the Mac is not the bullet on the PC. 
> 
> Bob

Yes, it has worked correctly for me in both mac and win, but it doesn't work
right in Linux.

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3843 - Release Date: 08/18/11





More information about the Use-livecode mailing list