Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

[ANN] idle4nt and lua4nt plugins updated to v0.2

Jun
34
0
I've just uploaded new version 0.2 of the idle4nt and lua4nt plugins.
Changes include:

* Idle/Lua functions to call the 4NT/TCC functions Command(), *_Cmd()
and ExpandVariables(). These functions are called via tables idle4nt
or lua4nt.

* changes to the way the input redirection works

* a readme with some preliminary documentation

* assorted other small changes

The zip file contains the dll, the glue source code, the necessary
header and library files to recompile (sans the Idle/Lua source files),
a few examples and the readme. Downloads:
http://thomaslauer.com/download/idle4nt02.zip
http://thomaslauer.com/download/lua4nt02.zip

--
cheers thomasl

web: http://thomaslauer.com/start
 
idle4nt and lua4nt plugins updated to v0.2

Thomas,

I notice that your plugin retains its state between invocations. For
example, I ran the msgbox.idle example and all the variables that are
defined within that script are still available after it runs. That's not
necessarily a bad thing - I believe the Perl, et. al. support in TCC does
the same thing.

However, the @idle function doesn't seem to return anything. For example:

[C:\4nt9\IDLE] echo %@idle[print(MessageBox)]
userdata: 03C1C5D0
ECHO is OFF

The print statement spits out the "userdata:..." text, but the @idle
itself returns nothing, so the ECHO command reports "ECHO is OFF".

Also, if I enter the interpreter by typing IIDLE, how do I exit it?

-Scott



thomasl <> wrote on 07/08/2008 08:43:05 AM:


>
> I've just uploaded new version 0.2 of the idle4nt and lua4nt plugins.
> Changes include:
>
> * Idle/Lua functions to call the 4NT/TCC functions Command(), *_Cmd()
> and ExpandVariables(). These functions are called via tables idle4nt
> or lua4nt.
>
> * changes to the way the input redirection works
>
> * a readme with some preliminary documentation
>
> * assorted other small changes
>
> The zip file contains the dll, the glue source code, the necessary
> header and library files to recompile (sans the Idle/Lua source files),
> a few examples and the readme. Downloads:
> http://thomaslauer.com/download/idle4nt02.zip
> http://thomaslauer.com/download/lua4nt02.zip
>
> --
> cheers thomasl
>
> web: http://thomaslauer.com/start
>
>
 
idle4nt and lua4nt plugins updated to v0.2

samintz <> wrote:

>
> Thomas,
>
> I notice that your plugin retains its state between invocations. For
> example, I ran the msgbox.idle example and all the variables that are
> defined within that script are still available after it runs. That's not
> necessarily a bad thing - I believe the Perl, et. al. support in TCC does
> the same thing.

See the readme, especially the --reset switch.


> However, the @idle function doesn't seem to return anything. For example:
>
> [C:\4nt9\IDLE] echo %@idle[print(MessageBox)]
> userdata: 03C1C5D0
> ECHO is OFF

Sure it returns something. In fact, it returns precisely what you ask
for;-)

Try 'echo %@idle[1+1]' or 'echo %@idle[math.sin(math.pi/4)]'.


> The print statement spits out the "userdata:..." text, but the @idle
> itself returns nothing, so the ECHO command reports "ECHO is OFF".

You don't need (or want) a print() call inside %@idle[...] because echo
takes care of printing. What you get here is the output of the Idle
print() call and nothing from echo because print() returns no value at
all. So, everything is exactly as it should be.


> Also, if I enter the interpreter by typing IIDLE, how do I exit it?

See the readme, especially the part about interactive sessions.

--
cheers thomasl

web: http://thomaslauer.com/start
 
idle4nt and lua4nt plugins updated to v0.2

Yeah, I read all that just after I hit send...

I notice that I have to use tostring() to get the same output I get with
print(). Is tostring() implied with print()?

echo %@idle[tostring(MessageBox)]

-Scott

thomasl <> wrote on 07/08/2008 11:47:46 AM:


> samintz <> wrote:


> Quote:
>
> >
> > Thomas,
> >
> > I notice that your plugin retains its state between invocations. For
> > example, I ran the msgbox.idle example and all the variables that are
> > defined within that script are still available after it runs. That's
not

> > necessarily a bad thing - I believe the Perl, et. al. support in TCC
does

> > the same thing.
>
> See the readme, especially the --reset switch.
>


> Quote:
>
> > However, the @idle function doesn't seem to return anything. For
example:

> >
> > [C:\4nt9\IDLE] echo %@idle[print(MessageBox)]
> > userdata: 03C1C5D0
> > ECHO is OFF
>
> Sure it returns something. In fact, it returns precisely what you ask
> for;-)
>
> Try 'echo %@idle[1+1]' or 'echo %@idle[math.sin(math.pi/4)]'.
>


> Quote:
>
> > The print statement spits out the "userdata:..." text, but the @idle
> > itself returns nothing, so the ECHO command reports "ECHO is OFF".
>
> You don't need (or want) a print() call inside %@idle[...] because echo
> takes care of printing. What you get here is the output of the Idle
> print() call and nothing from echo because print() returns no value at
> all. So, everything is exactly as it should be.
>


> Quote:
>
> > Also, if I enter the interpreter by typing IIDLE, how do I exit it?
>
> See the readme, especially the part about interactive sessions.
>
> --
> cheers thomasl
>
> web: http://thomaslauer.com/start
>
>
 
idle4nt and lua4nt plugins updated to v0.2

samintz <> wrote:

>
> I notice that I have to use tostring() to get the same output I get with
> print(). Is tostring() implied with print()?

print() is a catch-all attempt to print whatever you throw at it, so if
it gets something that smells unprintable it indeed tries to tostring()
it.

For most situations, when you know what you've got and want more control
over the output, printf() rather than print() would be the way to go.

See the Idle runtime docs.

--
cheers thomasl

web: http://thomaslauer.com/start
 
Back
Top