get letter# count?

For questions about using Classic.

Post » Thu Nov 12, 2009 6:33 am

i can get a textbox.getLineCount, but not a letterCount, is it possible to get the amount of letters?
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Thu Nov 12, 2009 7:03 am

You can use the System object's Len() expression, which gets the length of a string. So to get the length of the text in an edit box, you'd use: Len(EditBox.Text)
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Thu Nov 12, 2009 7:03 am

thanks
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Thu Nov 12, 2009 7:13 am

Nevermind, it didn't work. Here's what I did:
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Thu Nov 12, 2009 7:51 am

The expression I gave you does work(I made sure to test it), so I think it's probably something else in your code. Unfortunately, I don't really know what's going on with your code, so I can't help with the problem. Would you mind posting a CAP?
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Thu Nov 12, 2009 8:46 am

Shouldn't that be an ampersand instead of a plus?
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Nov 13, 2009 12:00 am

http://dl.dropbox.com/u/2867484/PartianEx.cap

That's the .cap
& and + can both be used
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Fri Nov 13, 2009 4:14 am

You don't have a mouse and keyboard object in the "Menu" layout, so the "On click" conditions are never triggering.
Moderator
B
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Fri Nov 13, 2009 5:03 am

That's weird, I must have accidentally deleted it.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest