Page 46 of 46 FirstFirst ... 3643444546
Results 1,801 to 1,819 of 1819

Thread: TwinBasic

  1. #1801
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: TwinBasic

    Can you develop a VB code parser? twinbasic_script.dll
    The input code can be directly parsed and run dynamically.Is to replace the VBS scripting engine


    aboutesigned to be 100% compatible with existing VB6 and VBA code, emulating all known quirks Compile to Win32 and Win64 architectures. Plans to compile for Mac, Linux, and Android. Based entirely on COM technology, such as the classic version of Visual Basic Produces a very small executable file that does not require any runtime libraries or redistributable components Currently compiles to unoptimized native code with better performance than VBA excode (VB6 p-code) Multiple components (within class/module blocks) are allowed per source file New custom VB code parser engine (written in C + +) built for flexibility and amazing performance

  2. #1802
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: February 11, 2024

    Highlights include the option to restore a traditional title bar to the twinBASIC IDE, a new lifetime license offer, and a lively discussion about attribute syntax.

    nolongerset.com/twinbasic-update-february-11-2024/

  3. #1803
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: February 18, 2024

    Highlights include progress on the IDE memory leaks, object models for automating Excel's Solver, and discussion regarding a taskbar icon monitor issue.

    nolongerset.com/twinbasic-update-february-18-2024/
    Last edited by VB6 Programming; Feb 18th, 2024 at 04:52 PM.

  4. #1804
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic

    twinBASIC status update:

    twinBASIC Update: February 25, 2024

    Highlights include reduced IDE memory consumption, two new projects from fafalone, and jpbro's clever solution to the biggest twinBASIC dev bottleneck.

    nolongerset.com/twinbasic-update-february-25-2024/

  5. #1805
    Fanatic Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    547

    Re: TwinBasic

    Sorry for my double ignorance (if I don't know, or it shouldn't exist) but is there a Friend Type or Friend Enums in TwinBasic?

  6. #1806
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,711

    Re: TwinBasic

    There is, yes. Both.

  7. #1807
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 3, 2024

    Highlights include rebranding the Problems panel as "Diagnostics" with expanded functionality, placeholders for the Description attribute, and tB v1 blockers.

    nolongerset.com/twinbasic-update-march-3-2024/

  8. #1808
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 10, 2024

    Highlights include a new Trace Mode debugging feature, improved IntelliSense performance, and details of Mike Wolfe's upcoming twinBASIC presentation at Access DevCon.

    https://nolongerset.com/twinbasic-update-march-10-2024/
    Last edited by VB6 Programming; Mar 10th, 2024 at 07:15 PM.

  9. #1809
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 17, 2024

    Highlights include independent TypeLibrary versioning and a detailed explanation of the new Runtime Tracing feature.


    https://nolongerset.com/twinbasic-update-march-17-2024/

  10. #1810
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: March 24, 2024

    Highlights include the return of support for twinBASIC IDE Add-ins, global search in the IDE, two new projects from fafalone, and an eye-opening twinBASIC poll.

    https://nolongerset.com/twinbasic-update-march-24-2024/

  11. #1811
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: April 1, 2024

    Highlights include dozens of bug fixes, a new MsgBox builder IDE addin, and a GitHub project for automatically setting PE image header properties.

    https://nolongerset.com/twinbasic-update-april-1-2024/

  12. #1812
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: April 7, 2024

    Highlights include the ability to embed code in tB IDE keyboard shortcuts, a consolidated page of sokinkeso's tB IDE addins, and a new App object package.

    https://nolongerset.com/twinbasic-update-april-7-2024/

  13. #1813
    New Member
    Join Date
    Dec 2023
    Posts
    12

    Re: TwinBasic

    hello fafalone,i am trying to expose the webview2.jsrun method to an activex control. just pass an paramarray to Me.WebView.JsRun method does not work when more than one parameters is passed.

    Code:
    Public Function jsRun(ByVal jsFunction As String, ParamArray args() As Variant) As Variant 'function in activex control
            ' Dim ar() As Variant, arg As Variant, subarg As Variant
            ' Dim varItemCount As Long = 0
            ' For Each arg In args
                ' If IsArray(arg) Then
                    ' For Each subarg In arg
                        ' ReDim Preserve ar(varItemCount)
                        ' ar(varItemCount) = subarg
                        ' varItemCount = varItemCount + 1
                    ' Next subarg
                ' Else
                    ' ReDim Preserve ar(varItemCount)
                    ' ar(varItemCount) = arg
                    ' varItemCount = varItemCount + 1
                ' End If
            ' Next arg
            ' Return Me.WebView.JsRun(jsFunction, ar) //1'failed
            Return Me.WebView.JsRun(jsFunction, args)'//2.directly pass paramaray.failed
            'Dim arr As Variant
            'If IsArray(args(0)) Then arr = args(0) Else arr = args '//3.tried and failed
        End Function
    
    Private Sub UserForm_Initialize() 'used in office 
    With Me.LibWebview1
    Do While Not .webviewready
        DoEvents
    Loop
    .Height = Me.Height - 1
    .Width = Me.Width - 1
    .Navigate ("https://cn.bing.com/")
     .ExecScript ("function fn(a,b){return a* 4;}")
     Debug.Print .jsRun("fn", 2) ' this is ok and get result:8
     Debug.Print .jsRun("fn", 2, 3) 'wrong and return null,affacted by the 2nd arg
     Stop
    End With
    End Sub
    Last edited by jmcilhinney; Apr 9th, 2024 at 11:44 PM.

  14. #1814
    Addicted Member
    Join Date
    Dec 2020
    Posts
    205

    Re: TwinBasic

    Quote Originally Posted by fan2006 View Post
    hello fafalone,i am trying to expose the webview2.jsrun method to an activex control. just pass an paramarray to Me.WebView.JsRun method does not work when more than one parameters is passed.

    Code:
    Public Function jsRun(ByVal jsFunction As String, ParamArray args() As Variant) As Variant 'function in activex control
            ' Dim ar() As Variant, arg As Variant, subarg As Variant
            ' Dim varItemCount As Long = 0
            ' For Each arg In args
                ' If IsArray(arg) Then
                    ' For Each subarg In arg
                        ' ReDim Preserve ar(varItemCount)
                        ' ar(varItemCount) = subarg
                        ' varItemCount = varItemCount + 1
                    ' Next subarg
                ' Else
                    ' ReDim Preserve ar(varItemCount)
                    ' ar(varItemCount) = arg
                    ' varItemCount = varItemCount + 1
                ' End If
            ' Next arg
            ' Return Me.WebView.JsRun(jsFunction, ar) //1'failed
            Return Me.WebView.JsRun(jsFunction, args)'//2.directly pass paramaray.failed
            'Dim arr As Variant
            'If IsArray(args(0)) Then arr = args(0) Else arr = args '//3.tried and failed
        End Function
    
    Private Sub UserForm_Initialize() 'used in office 
    With Me.LibWebview1
    Do While Not .webviewready
        DoEvents
    Loop
    .Height = Me.Height - 1
    .Width = Me.Width - 1
    .Navigate ("https://cn.bing.com/")
     .ExecScript ("function fn(a,b){return a* 4;}")
     Debug.Print .jsRun("fn", 2) ' this is ok and get result:8
     Debug.Print .jsRun("fn", 2, 3) 'wrong and return null,affacted by the 2nd arg
     Stop
    End With
    End Sub
    This doesn't look like the WebView control available in twinBASIC, because the method is called 'ExecuteScript' here, not 'ExecScript'. The example code you provided does work using the twinBASIC control:

    Code:
    WebViewCtl.ExecuteScript("function fn(a,b){return a* 4;}")
            MsgBox WebViewCtl.JsRun("fn", 2)
            MsgBox WebViewCtl.jsRun("fn", 2, 3)
    (two message boxes with 8 appear)

  15. #1815
    New Member
    Join Date
    Dec 2023
    Posts
    12

    Re: TwinBasic

    Quote Originally Posted by WaynePhillipsEA View Post
    This doesn't look like the WebView control available in twinBASIC, because the method is called 'ExecuteScript' here, not 'ExecScript'. The example code you provided does work using the twinBASIC control:

    Code:
    WebViewCtl.ExecuteScript("function fn(a,b){return a* 4;}")
            MsgBox WebViewCtl.JsRun("fn", 2)
            MsgBox WebViewCtl.jsRun("fn", 2, 3)
    (two message boxes with 8 appear)
    it' an acitvex writtlen in twinBASIC. i just want to get "jsrun" function work in excel vba .so i write some equivalent functions with the WebViewCtl functions? I am stuck with the problem how to pass paramarray to the WebViewCtl.jsRun which accept a paramarray parameter.

  16. #1816
    Addicted Member
    Join Date
    Dec 2020
    Posts
    205

    Re: TwinBasic

    Quote Originally Posted by fan2006 View Post
    it' an acitvex writtlen in twinBASIC. i just want to get "jsrun" function work in excel vba .so i write some equivalent functions with the WebViewCtl functions? I am stuck with the problem how to pass paramarray to the WebViewCtl.jsRun which accept a paramarray parameter.
    There's currently no built-in way to pass a ParamArray on to another procedures ParamArray arg directly, but you can do it with a slightly changed version of CallByName:

    Code:
    Private DeclareWide PtrSafe Function CallByName2 Lib "<interaction>" Alias "#9" (ByVal Object As Object, ByVal ProcName As String, ByVal CallType As VbCallType, Args() As Variant) As Variant
    Note that the Args() definition in this version of CallByName doesn't have ParamArray specified on it. You should now be able to call CallByName2(obj, "jsRun", vbMethod, paramArrayArg) which will pass the array instead of creating a new paramarray containing the array.

  17. #1817
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,711

    Re: TwinBasic

    Setting aside WebView; I don't think ParamArray can be used in the way you're trying. The values are passed on the stack; it's fixed at runtime. You can pass an array as a single argument inside a variant, but then the javascript would need to be able to handle a SAFEARRAY.

  18. #1818
    New Member
    Join Date
    Dec 2023
    Posts
    12

    Re: TwinBasic

    it worked and thx for your help.

  19. #1819
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,054

    Re: TwinBasic programming

    twinBASIC status update:

    twinBASIC Update: April 14, 2024

    Highlights include improved performance and stability, error codes for compile errors, a sneak peek at sokinkeso's External Tools plugin, and version control for twinBASIC.

    nolongerset.com/twinbasic-update-april-14-2024/

Page 46 of 46 FirstFirst ... 3643444546

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