Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-12-2012, 05:35 PM   PM User | #1
Taro
Regular Coder

 
Taro's Avatar
 
Join Date: Oct 2011
Location: Geraldton, Ontario
Posts: 155
Thanks: 1
Thanked 1 Time in 1 Post
Taro is an unknown quantity at this point
Question GML script: censoring password input code help

Hello,

I've been working on Gamemaker 8.0 Lite and am trying to find out how to mask the password for my computer application, using GML (from the derivative language, C). This is the code so far:

Code:
aa = show_menu('Source',-1)

if aa = 0
{
dfg = get_string("Type in the password.","")

if dfg = "jubjub"

{

show_message ("Access allowed.")

}

else
{
sound_play(access_denied)

show_message ("Password is incorrect. Access denied.")
}
}
When I type the password, the actual letters show, and not something like the stars- *. So is there a code that can mask "jubjub"? I've been trying something like:

Code:
j = (*);

Also note that this script is activated on the "left pressed" object function if you need to know. Below is what the problem looks like in my application:
Attached Thumbnails
Click image for larger version

Name:	an image.png
Views:	36
Size:	25.1 KB
ID:	10831  

Last edited by Taro; 02-12-2012 at 05:37 PM.. Reason: forgot something
Taro is offline   Reply With Quote
Old 02-13-2012, 02:20 AM   PM User | #2
nojtb
New Coder

 
Join Date: Aug 2007
Posts: 59
Thanks: 3
Thanked 1 Time in 1 Post
nojtb is an unknown quantity at this point
I never used gamemaker so this may not be possible. What I would do is detect key hits instead of the text. For most languages detecting key's inputs decimal (acsii) values (1-128 or 256 depending) which can be converted to char characters. For each valid detection you could ouput * on the screen.
nojtb is offline   Reply With Quote
Old 02-13-2012, 11:42 PM   PM User | #3
Taro
Regular Coder

 
Taro's Avatar
 
Join Date: Oct 2011
Location: Geraldton, Ontario
Posts: 155
Thanks: 1
Thanked 1 Time in 1 Post
Taro is an unknown quantity at this point
Quote:
Originally Posted by nojtb View Post
I never used gamemaker so this may not be possible. What I would do is detect key hits instead of the text. For most languages detecting key's inputs decimal (acsii) values (1-128 or 256 depending) which can be converted to char characters. For each valid detection you could ouput * on the screen.
That is a probable suggestion nojtb. The GML editor looks for errors in my script; I also may need to look back at the C programming language as well as for the input/output key-stroke function.
Taro is offline   Reply With Quote
Reply

Bookmarks

Tags
game, gml, programming, string

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:18 AM.


Advertisement
Log in to turn off these ads.