• Can you have JS determine logon

    From mhansel739@VERT to All on Tue Apr 18 13:16:40 2023
    At this time, I have a weather app that works quite well. But to have it run at logon and have it run as a separate door, I have to setup two separate copies of the app. One of them reads the user's zip code (or uses the system zip code) - this is the one at logon. The other one asks the zip code for the weather the user wants - the external app. Can you, in Javascript for Synchronet, determine if the app is being run at logon or as an external app? Or is there something I am missing? I am relatively new to Javascript, so I could use some pointers. The files for the app are located on my github: https://github.com/mhansel7399/SyncWeather
    Thanks in advance.
    --Matt

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to mhansel739 on Tue Apr 18 13:55:34 2023
    Re: Can you have JS determine logon
    By: mhansel739 to All on Tue Apr 18 2023 01:16 pm

    At this time, I have a weather app that works quite well. But to have it run at logon and have it run as a separate door, I have to setup two separate copies of the app. One of them reads the user's zip code (or uses the system zip code) - this is the one at logon. The other one asks the zip code for the weather the user wants - the external app. Can you, in Javascript for Synchronet, determine if the app is being run at logon or as an external app? Or is there something I am missing? I am relatively new to Javascript, so I could use some pointers.

    I would just check if(bbs.node_action == NODE_LOGN) to check if the user is in the logon process.
    https://synchro.net/docs/jsobjs.html
    Note: Don't confuse with NODE_LOGON (that's a different value for a different purpose).
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #58:
    PCMS = Programmable Command and Menu Structure (introduced in SBBS v2)
    Norco, CA WX: 63.3øF, 62.0% humidity, 9 mph S wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From mhansel739@VERT to Digital Man on Tue Apr 18 13:59:52 2023
    Thanks! I will check that out tonight and post my results!

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From mhansel739@VERT to Digital Man on Tue Apr 18 15:16:16 2023
    I added that piece of code to the system and it works like a charm!!! Thank you for your quick assist on this. I truly appreciate it.
    --Matt

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From Phigan@VERT/TACOPRON to mhansel739 on Tue Apr 18 20:45:03 2023
    Re: Can you have JS determine logon
    By: mhansel739 to All on Tue Apr 18 2023 01:16 pm

    the weather the user wants - the external app. Can you, in Javascript for Synchronet, determine if the app is being run at logon or as an external app? Or is there something I am missing? I am relatively new to Javascript,

    Can you make it so it takes command line parameters? That way if you run it with -from-login or something, it does the detection... or -ask-zip makes it asks for the zip without detection.

    ---
    þ Synchronet þ TIRED of waiting 2 hours for a taco? GO TO TACOPRONTO.bbs.io
  • From Phigan@VERT/TACOPRON to mhansel739 on Tue Apr 18 20:46:56 2023
    Re: Can you have JS determine logon
    By: mhansel739 to Digital Man on Tue Apr 18 2023 03:16 pm

    I added that piece of code to the system and it works like a charm!!! Thank you for your quick assist on this. I truly appreciate it.

    Nice. Ignore my suggestion :).

    ---
    þ Synchronet þ TIRED of waiting 2 hours for a taco? GO TO TACOPRONTO.bbs.io