Console container for put function?
Peter W A Wood
peterwawood at gmail.com
Fri Apr 24 08:09:34 CEST 2015
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 after Field tReport
> 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>
>> 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?
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode