Console container for put function?

Peter W A Wood peterwawood at gmail.com
Fri Apr 24 08:09:34 CEST 2015


Hi Mike

Thanks for your response. I should have explained why I was asking such a question.

I’m planning on writing some library functions for testing that can be called from either a GUI stack or a server script. When called from a GUI script it will display its results in a Field, when called from a server script it will displays its result in the console.

I’m trying to find a better way than:

	if the environment is “server” then
		put tResult
	else
		put tResult after Field tReport
	end

Peter


> On 24 Apr 2015, at 11:54, Mike Bonner <bonnmike at gmail.com> wrote:
> 
> Just a straight put is the way to go. Don't think you can "put before"
> because it doesn't have direct control of the console terminal scroll and
> cursor position.
> SO to achieve the same thing you could..
> put "Hello "
> put "World"
> put return
> 
> On Thu, Apr 23, 2015 at 9:52 PM, Peter W A Wood <peterwawood at gmail.com>
> wrote:
> 
>> By experimenting, it seems that “putting” text into or after the message
>> box container results in the test being output to the console (perhaps
>> stdout, perhaps stderr).
>> 
>> Running this script under LiveCodeServer:
>>        put "Hello" into message box
>>        put " World" after message box
>>        put return
>> 
>> Displays this on the terminal:
>>        $ ./test.lc
>>        Hello World
>> 
>> Is there a more correct “container” than message box to use in with the
>> put function to send text to the terminal in LiveCodeServer?
>> 
>> Regards
>> 
>> Peter
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list