Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Quad), 608 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: inkey(String*); questions.... [Re: lostclimate] #307272
01/28/10 10:31
01/28/10 10:31
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Just use strings. Chars and char arrays are for those experts - if they are too hard to figure, you most likely won't need them.

Re: inkey(String*); questions.... [Re: jcl] #308639
02/04/10 04:27
02/04/10 04:27
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Originally Posted By: jcl
Lite-C is a programming language.


That's debatable, lol. (I am just kidding, so don't get angry with me)

Don't let those strings kick your butt lostclimate.


Professional A8.30
Spoils of War - East Coast Games
Re: inkey(String*); questions.... [Re: Locoweed] #317060
03/28/10 20:50
03/28/10 20:50
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline
Junior Member
GorNaKosh  Offline
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
I have the similar problem during the last 2 houres so I give this thread a bump. So far I've got it...
Code:
STRING *strLogingPass = "#99";
STRING *strPassHidden= "#99";

TEXT *txt_loginPass = {
	pos_x = 40;
	pos_y = 118;
	layer = 2;
	font = fontStandard;
	strings = 1;
	string (strPassHidden);
}

BOOL checkPass= 0;
void createHiddenPass() {
	while(checkPass== 1) {
		
		var passLen = str_len(strLogingPass);
		var x = 0;
		for(x=0;x<passLen;x++) {
			if(x=0) {
				str_cpy(strPassHidden, '*');
			} else {
				str_cat(strPassHidden, '*');
			}
		}
		
		wait(1);
	}
}

void windowLogin_passIn() {
	
	set(txt_loginPass, SHOW);

	checkPass= 1;
	createHiddenPass();
	var lastkey = inkey(strLogingPass);
	
	checkPass= 0;
	
	if(lastkey == 13) windowLogin_login();
}



This is just one way I've tryed to get that many *'s like the length of the real entered password. Main problem seam to be tha the strings have to be cleared to get the right length values, but then inkey doesn't read the inout anymore. However, I didn't get it work and need a hint to deal with the conversion from the inkey-string to the *'s...

Thx
Gor Na Kosh

Last edited by GorNaKosh; 03/28/10 20:51.
Re: inkey(String*); questions.... [Re: GorNaKosh] #317105
03/29/10 10:47
03/29/10 10:47
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
At a first glance, the code looks alright, although it can probably be done much shorter. I'm not sure what you mean with clearing the strings. But such questions are better answered in the lite-C forum.

Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1