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 


print on the same line ?

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

Joined: 09 Aug 2011
Posts: 35
Location: HongKong

PostPosted: Mon Mar 12, 2012 10:07 pm    Post subject: print on the same line ? Reply with quote

Code:

print( strings_getText( listbox_getItems( xxx )))

print
on
the
same
line


how the print on the same line? thank~
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Mon Mar 12, 2012 11:18 pm    Post subject: Reply with quote

Append the items together before you print them.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
yui0900826
Cheater
Reputation: 0

Joined: 09 Aug 2011
Posts: 35
Location: HongKong

PostPosted: Mon Mar 12, 2012 11:59 pm    Post subject: Reply with quote

how to append the items together print? Shocked Question
thank~ ><
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Tue Mar 13, 2012 12:49 am    Post subject: Reply with quote

Like this:

Code:

-- Create an example form with a listbox..
local f = createForm( true );
local l = createListBox( f );
local s = listbox_getItems( l );

-- Add some test data to the listbox..
strings_add( s, "test 1" );
strings_add( s, "test 2" );
strings_add( s, "test 3" );
strings_add( s, "test 4" );
strings_add( s, "test 5" );

-- Get the items and print them on a single line..
local strList = listbox_getItems( l );
local output = "";

for x = 0, strings_getCount( strList ) - 1 do
    output = output .. strings_getString( strList, x );
end

print( output );

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
yui0900826
Cheater
Reputation: 0

Joined: 09 Aug 2011
Posts: 35
Location: HongKong

PostPosted: Tue Mar 13, 2012 1:23 am    Post subject: Reply with quote

Thank you very much for your help Rolling Eyes Rolling Eyes
Back to top
View user's profile Send private message
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