Giter Site home page Giter Site logo

Comments (3)

scandum avatar scandum commented on May 29, 2024 1

Alternatively:

#info configs save
#loop 1 &info[CONFIGS][] index #var info[CONFIGS][$info[CONFIGS][$index][arg1]] $info[CONFIGS][$index][arg2]
#unvar info[CONFIGS][%+1..d]

As for the MTTS bitvector, it contains whether #config screen_reader is on or off, as well as a few other things. I may add an event for #config calls so it's possible to maintain an up to date table.

from tintin.

scandum avatar scandum commented on May 29, 2024

That's not possible since I handle the default lists in a generic manner. One option is:

#info configs save
#list info[CONFIGS] indexate arg1
#list info[CONFIGS] filter {SCREEN READER}
#var screen_reader $info[CONFIGS][1][arg2]

I've updated the beta to save the MTTS bitvector with #info session save.

https://tintin.mudhalla.net/protocols/mtts/

#info session save
#math screen_reader $info[SESSION][MTTS] & 64

Will set $screen_reader to 0 if disabled, 64 if enabled.

from tintin.

rigrig avatar rigrig commented on May 29, 2024

Thanks, I'm handling it in the script now, just figured it'd be easier if TinTin++ stored it in that format right away, but no need to mess up generic code for it ;-)

I'm not sure why I'd want the MTTS bitvector? It's really to check if the user of my script has enabled screenreader mode, so I can disable e.g. updating some status counters every second (as the screenreader would announce every update)

In case anybody else stumbles on this, I'm doing this now:

#info configs save;
#local configs {};
#foreach {*info[CONFIGS][]} num {
    #local config $info[CONFIGS][$num];
    #local key {$config[arg1]};
    #local val {$config[arg2]};
    #var configs[$key] {$val};
};
#var info[CONFIGS] $configs;
#unvar configs;

Giving

#var info;
#VARIABLE {info}
{
    {CONFIGS} 
    {
        {AUTO TAB} {5000}
        {BUFFER SIZE} {10000}
        {CHARSET} {UTF-8}
        {COLOR MODE} {TRUE}
        {COLOR PATCH} {OFF}
        {COMMAND COLOR} {\e[0;37m}
        {COMMAND ECHO} {ON}
        {CONNECT RETRY} {0.0}
        {HISTORY SIZE} {1000}
        {LOG MODE} {RAW}
        {MOUSE} {OFF}
        {PACKET PATCH} {AUTO OFF}
        {RANDOM SEED} {459926859}
        {REPEAT CHAR} {!}
        {REPEAT ENTER} {OFF}
        {SCREEN READER} {OFF}
        {SCROLL LOCK} {ON}
        {SPEEDWALK} {OFF}
        {TAB WIDTH} {8}
        {TELNET} {ON}
        {TINTIN CHAR} {#}
        {VERBATIM} {OFF}
        {VERBATIM CHAR} {\}
        {VERBOSE} {OFF}
        {WORDWRAP} {ON}
    }
}

from tintin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.