1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Support' started by thomasl, Jul 8, 2008.

  1. thomasl

    Joined:
    Jun 10, 2008
    Messages:
    35
    Likes Received:
    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
     
  2. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,188
    Likes Received:
    11
    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:


     
  3. thomasl

    Joined:
    Jun 10, 2008
    Messages:
    35
    Likes Received:
    0
    idle4nt and lua4nt plugins updated to v0.2

    samintz <> wrote:

    See the readme, especially the --reset switch.


    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)]'.


    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.


    See the readme, especially the part about interactive sessions.

    --
    cheers thomasl

    web: http://thomaslauer.com/start
     
  4. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,188
    Likes Received:
    11
    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:



    not

    does


    example:



     
  5. thomasl

    Joined:
    Jun 10, 2008
    Messages:
    35
    Likes Received:
    0
    idle4nt and lua4nt plugins updated to v0.2

    samintz <> wrote:

    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
     

Share This Page