Normal Topic @promptForuserinput question (Read 660 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
@promptForuserinput question
Aug 17th, 2006 at 8:32pm
Print Post Print Post  
Is there a method to hide the keystrokes returned to @promptForuserinput?

I find that @promptForuserinput  is a quick little method to give temporary access to an authorized person before the implementation of user and group security management during creation and early testing of an application. And even after adding security it is an easy method to temporarily do an advanced feature without having to log out the current user and re-log in as with the correct permissions. An example would be

var Vanswer as String

     Vanswer = @promptForuserinput("Enter Code to unlock;","")

           If Vanswer = "APE" Then

     {
           Notreadonly()
     }

           Else

     {
           @Msgbox("You Need Help to use this feature","Please ask Mike Morgan","")
      }

The problem is everyone sees what is typed. I tried using @msgbox  to tell the user to type a  password and then used @getfromkeyboard to capture and then manipulated the data but the process was way to cumbersome.  

Any thoughts?


Thanks.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: @promptForuserinput question
Reply #1 - Aug 17th, 2006 at 8:59pm
Print Post Print Post  
In the current version you can't manipulate what the user is typing in to @PromptForUserInput as they are typing.

How about a Text element on the form that has programming in the On Element Immediate Change Event? There is an example floating around somewhere of replacing the characters with a "*" as they were typed in.

-Edit-
Page 2 of the September 2004 Inside Sesame. I think it may also be in a Demo App from one of the Conferences.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @promptForuserinput question
Reply #2 - Aug 17th, 2006 at 9:24pm
Print Post Print Post  
Ray thanks for the suggestion and help. I always know I can count on you!

I have used that technique with a command button. When the command button is clicked it runs a makeinvisible() subroutine that makes everything invisible except for the text element and a static text directions element it uses Xpos() and Ypos() to center the elements and then throwsfocus to the text element.

It works, Its just not as elegant as the @PromptForUserInput method would be.

Luckily Sesame with Sbasic gives me many options to choose from to accomplish my goals so I will just happily use 1 of the many other methods available to me.

Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: @promptForuserinput question
Reply #3 - Aug 17th, 2006 at 10:28pm
Print Post Print Post  
I can thoroughly recommend Tom's technique of a 'popup password entry box'. (Inside Sesame, September 2004). It's in daily use in one of my clients' apps.  There's just one snag with it. Every keystroke is noted. So if you know you have typed the wrong key, you can't backspace over it and retype it. You've got to submit the wrong password then start again.

Despite this, it's a pretty good password entry facility, showing just *****.
(Until someone comes up with an even better one...!)
  

Alec
Back to top
IP Logged