Results 1 to 40 of 60

Thread: js4vb Javascript Engine w/Debugger and COM

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,295

    js4vb Javascript Engine w/Debugger and COM

    This is a js parser / interpreter in vb6 with x64 number support, COM integration and built in debugging capabilities.

    This was built with claude.ai and took about 44 hrs work which is wild for what it is.
    Ive already burned through 15 context size limits already.

    I am using it in one of my projects and it is stable. I havent had any big problems yet, just some tweaks and small oversights. It should be pretty complete and well tested, but its big, so there will be bugs.

    Compiles as a 640k ActiveX dll and has a handful of example projects to show how to use it.

    Couple nuances of this engine:
    - print is fancy, it can dump arrays and json objects directly
    - not case sensitive myVal and myval are the same (dont care actually good)
    - function aliases for built in functions is currently unsupported test = alert wont work (works with js declared fx easy fix im sure)
    - no regex support (never happening - use a COM object)
    - ParseJsonString will look inside string values and auto convert to number including 0x hex, even 64 bit (slightly naughty but perfect for me)
    - we use true 64 bit numbers for bigint, not the js spec 53 bit
    - COM methods can return native json objects directly to engine: Set myComFunc = json.ParseToCVal(s)
    - COM methods can return 64bit numbers directly to engine: Dim v As New CValue: v.LoadNumFromStr(str): Set myComFunc = v
    - COM methods can return vb arrays without a problem, auto converted to js array (suck that ms script control)
    - can attach js helper functions to COM objects or override COM methods while still able to call real one.
    - demo code created on how to sink events, not yet wired into script engine

    See the (oldish) readme for the highlights and info below

    Dependencies:
    - core engine all vb6

    - 64 bit numbers requires utypes.dll (open source C std dll)
    - COM integration uses dynproxy.dll (open source C std dll - vb CallByName was to limited)
    - these dlls are both loaded on demand and included in the git repo

    - if you want to use the debugger UI with syntax highlighting you will need scivb2.ocx or sci4vb.ocx -
    https://github.com/dzzie/scivb2
    https://github.com/dzzie/sci4vb (newer)

    Anyway the entire JS core is all regular vb6.

    Putting this out under MIT license because we should have all had this forever ago!

    I dont really like git, but I made a public repo for this to help everyone track the latest changes. I dont use a dev or release branch so I will try to always keep repo with stable pushs only. That may not be possible if I have to make big changes, but the zip attached below will always be a stable snapshot. It may be a little older as its more work to sync manually.

    Public Repo:
    https://github.com/dzzie/js4vb
    Attached Files Attached Files
    Last edited by dz32; Dec 26th, 2025 at 02:33 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width