• How do you call two functions in an eval?

    From Amessyroom@VERT/TL-QWK to All on Thursday, August 22, 2024 03:27:26
    When a key is pressed I want to call bbs.view_file("file") and bbs.exec_xtrn(INTERNAL_NAME).

    How do you do this ? It seems I can do one but not both

    'A': { eval: 'bbs.exec_xtrn("code")' },

    ---
    þ Synchronet þ Too Lazy BBS - toolazy.synchro.net:2323
  • From nelgin@VERT/EOTLBBS to Amessyroom on Thursday, August 22, 2024 11:01:47
    On Thu, 22 Aug 2024 03:27:26 -0400
    "Amessyroom" (VERT/TL-QWK) <VERT/TL-QWK!Amessyroom@endofthelinebbs.com>
    wrote:
    When a key is pressed I want to call bbs.view_file("file") and bbs.exec_xtrn(INTERNAL_NAME).

    How do you do this ? It seems I can do one but not both

    'A': { eval: 'bbs.exec_xtrn("code")' },

    ---
    â–  Synchronet â–  Too Lazy BBS - toolazy.synchro.net:2323
    What about
    'A': { eval 'bbs.view_file("file")',
    eval 'bbs.exec_xtrn("CODE")' },
    --
    End Of The Line BBS - Plano, TX
    telnet endofthelinebbs.com 23
    ---
    ï¿­ Synchronet ï¿­ End Of The Line BBS - endofthelinebbs.com
  • From Nightfox@VERT/DIGDIST to Amessyroom on Thursday, August 22, 2024 09:21:08
    Re: How do you call two functions in an eval?
    By: Amessyroom to All on Thu Aug 22 2024 03:27 am

    When a key is pressed I want to call bbs.view_file("file") and bbs.exec_xtrn(INTERNAL_NAME).

    How do you do this ? It seems I can do one but not both

    'A': { eval: 'bbs.exec_xtrn("code")' },

    It looks like you're using default.js? I think inside the single-quotes after the eval:, you should be able to put multiple statements in there (each ending with a semicolon)..

    'A': { eval: 'bbs.view_file("file"); bbs.exec_xtrn("code");' },

    I haven't tried that, but I'd think that should work.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Amessyroom@VERT/TL-QWK to Nightfox on Friday, August 23, 2024 02:12:11
    Re: How do you call two functions in an eval?
    By: Nightfox to Amessyroom on Thu Aug 22 2024 09:21 am

    When a key is pressed I want to call bbs.view_file("file") and
    bbs.exec_xtrn(INTERNAL_NAME).

    How do you do this ? It seems I can do one but not both

    'A': { eval: 'bbs.exec_xtrn("code")' },

    It looks like you're using default.js? I think inside the single-quotes after the eval:, you should be able to put multiple statements in there (each ending with a semicolon)..

    'A': { eval: 'bbs.view_file("file"); bbs.exec_xtrn("code");' },

    I haven't tried that, but I'd think that should work.

    Nightfox

    ---
    þ Synchronet þ Too Lazy BBS - toolazy.synchro.net:2323
  • From Amessyroom@VERT/TL-QWK to Nightfox on Friday, August 23, 2024 02:12:47
    Re: How do you call two functions in an eval?
    By: Nightfox to Amessyroom on Thu Aug 22 2024 09:21 am

    Try #2.

    Yes it worked thanks! Had qwk issues so took a few hours for me to get your response.

    ---
    þ Synchronet þ Too Lazy BBS - toolazy.synchro.net:2323