User Defined Script Method "InvokeButton" Fails with "Cannot create Windows Script OCX object" in 2023 64-Bit!

The identical script works in every other version, but 2023 64-Bit. I get this error at the point the oScript.InvokeButton(<<button name>>) method is used:

  • 0

    This initial error had to do with some files not getting registered on installation. It was resolved by running the "..\sage\Common Components\RegCom64.bat" file. even though the included AES.EXE command was not recognized.

    However, the saga continues as now I get "Error #88. Invalid/Unknown property name" on the statement:

    retVal1 = oScript.InvokeButton(CLIENT_BUTTON)

    Where I have confirmed the CLIENT_BUTTON is the correct name of the invoked button. This exact script(s) and button names works in 2021. Next, I'll try to isolate this to a very small script and present it here for others to check.

  • 0 in reply to connex

    This has been isolated to a 2 line button script that uses oScript.InvokeButton followed by oUIObj.HandleScriptUI()

    retVal = oScript.InvokeButton("BT_LINK_2")
    retVal = oUIObj.HandleScriptUI()

    Both button scripts are set to "Execute Script on Server". The contents of the 2nd button script is irrelevant and never gets executed. Could be X = 1.

  • 0 in reply to connex

    , how is the first script executed?  Is it a button script?  Or part of an event script?  If you remove the HandleScriptUI() call, does the script complete without error? (I know this might not have the desired effect, just trying to narrow down things).

    E

  • 0 in reply to jepritch

    I have also encountered this error with a button script on 2023 64-bit.  From what I can tell, it is due to the fact that Microsoft never released a 64-bit version of msscript.ocx.  I am also running into all sorts of weird script errors on this test upgrade to 2023 from 2019 where everything worked fine.  A UDS attached to a column event would randomly hang at various points on 64-bit but work fine on 32-bit.  Even after switching to 32-bit, I have several other UDS errors occurring on different events.  I think I'm going to have to redo this upgrade from scratch and completely uninstall Sage 100, then reinstall 32-bit and try again.

  • 0 in reply to jepritch

    The first script is a button script that executes another button script. If I remove the HandleScriptUI() call, it works, but I call the BT_LINK_2 many times thus without the HandleScriptUI() call, only the last call to BT_LINK_2 works. I need HandleScriptUI() to work as it does in all other versions, but I get the error #88.