Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turing Password Field?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
lord_pwnerer




PostPosted: Thu Dec 21, 2006 5:14 pm   Post subject: Turing Password Field?

Is there a way to make a textbox display asterics, but still be able to getText of the textbox, and have what they actually typed? (not asterics)

Thanks.
Sponsor
Sponsor
Sponsor
sponsor
uberwalla




PostPosted: Thu Dec 21, 2006 5:23 pm   Post subject: (No subject)

ok do you mean when you type it puts asterixes but when you say put it shows the word?
Hackmaster




PostPosted: Thu Dec 21, 2006 5:26 pm   Post subject: (No subject)

easy peasy!!

do a setscreen("noecho")

then, do a loop for getch's. when they hit enter, loop exits. every time through the loop, you want to put an asterisk wherever you want to, be it a textbox, or whatever. ok?
uberwalla




PostPosted: Thu Dec 21, 2006 5:38 pm   Post subject: (No subject)

i found a old password thing i had. here ya go:

code:

View.Set ("nocursor")
var password : string (1)
var input := ""
put "Password: "
loop
    locate (1, length ("Password:") + 1)
    put repeat ("*", length (input))
    getch (password)
    exit when c = KEY_ENTER
    input += password
end loop
Hackmaster




PostPosted: Thu Dec 21, 2006 5:45 pm   Post subject: (No subject)

not quite what I had in mind... How about something like this?

code:


loop

getch(var)

exit when var = %%Whatever "enter" is

array[num] = var

end loop



bear in mind... it's puesdo code...lol... something like that!
lord_pwnerer




PostPosted: Thu Dec 21, 2006 5:45 pm   Post subject: (No subject)

What I want is, when the user types in the text field, it displays asteriks, but when I use the GUI.GetText command, I get what they actually wrote. Is this possible?
uberwalla




PostPosted: Thu Dec 21, 2006 5:46 pm   Post subject: (No subject)

im sure it is ill take a look at it cuz im not sure bout gui textbox thing.
Clayton




PostPosted: Fri Dec 22, 2006 10:17 am   Post subject: (No subject)

there's an example of just this somewhere in the Turing Examples, look through it and see what you find.
Sponsor
Sponsor
Sponsor
sponsor
lord_pwnerer




PostPosted: Fri Dec 22, 2006 6:22 pm   Post subject: (No subject)

I can't seem to find it. Does this way that your talking about function with textboxes?
lord_pwnerer




PostPosted: Fri Dec 22, 2006 6:33 pm   Post subject: (No subject)

Really sorry about this guys, there actually are numerous posts about the exact same subject.

I did search before I started the new topic. but....

Sorry

Thanks for your help guys.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: