Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Get number of letters ina string? and writeString problem

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
faizangmc
Expert Cheater
Reputation: 0

Joined: 12 Nov 2013
Posts: 167

PostPosted: Sat May 31, 2014 9:56 pm    Post subject: Get number of letters ina string? and writeString problem Reply with quote

Hi,
Is there any script to return the number of letters users enter in an edit box,
For eg if enter World in an edit box,
It should return 5
I want to assign a variable to it
Like noofletters = (script to get the number of letters in edit box named CEEdit1)

Also, when I writeScript on an adress. If its the same no of letters it goes fine
But if there is one letter more in the New name, then it writes only equal no of.letters like before. Any fix.for this?
Thank you
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jun 01, 2014 3:15 am    Post subject: This post has 1 review(s) Reply with quote

Code:
stringLength = #(UDF1.CEEdit1.Text)
print(stringLength)



Quote:
then it writes only equal no of.letters like before

Nope, writeString function always tries to write whole string you passed as an argument.

You can be 100% sure that nothing bad happens, only when you write the same number of letters or something shorter.

_________________
Back to top
View user's profile Send private message MSN Messenger
faizangmc
Expert Cheater
Reputation: 0

Joined: 12 Nov 2013
Posts: 167

PostPosted: Sun Jun 01, 2014 3:18 am    Post subject: Reply with quote

K thankx
If we write smthng longer then?
As some team names are longer some are shorter
Suppose I want to rename India as England
And England as India
Then, England to india will work fine

But wull changinf India to England also work well?
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jun 01, 2014 3:40 am    Post subject: Reply with quote

faizangmc wrote:
But wull changinf India to England also work well?


It depends. Highlight 'India' string address you added to cheat table, press CTRL+B.


If it looks like this:

(when you have many 00 just after)



Then probably you can write something bigger.

_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites