Module ActiveScript for VB-Script with PB-Runtime Variables

Share your advanced PureBasic knowledge/code with the community.
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by zikitrake »

:? I just did this dirty change and it works fine

run iexplorer with an url

Code: Select all

RunProgram("iexplore.exe", "http://www.bbc.com/","")
Delay(3000)
and replace in vbs var: vbs + ~"Set IE = CreateObject(\"InternetExplorer.Application\")" + #LF$ to

Code: Select all

vbs = ~""
vbs + ~"Dim w, winTitle, IE" + #LF$
vbs + ~"winTitle = \"BBC - Homepage - Internet Explorer\"" + #LF$
vbs + ~"  For each w in createobject(\"shell.application\").windows" + #LF$
vbs + ~"    If instr(1, typename(w.document),\"htmldocument\", vbTextCompare) > 0 then" + #LF$
vbs + ~"      If instr(1, w.document.title, sWinTitle, vbTextCompare) = 1 then " + #LF$
vbs + ~"        set IE = w" + #LF$
vbs + ~"      End If" + #LF$
vbs + ~"    End If" + #LF$
vbs + ~"  Next" + #LF$
Final code:

Code: Select all

;-TOP

; Comment   : Modul ActiveScript Example 4

; Link to ActiveScript  : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399
; Link to SmartTags     : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527089
; Link to VariantHelper : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527090

; ***************************************************************************************

XIncludeFile "Modul_ActiveScript.pbi"
;XIncludeFile "Modul_SmartTags.pb"
;XIncludeFile "VariantHelper.pb"

UseModule ActiveScript
;UseModule ActiveSmartTags

; -------------------------------------------------------------------------------------

Global vbs.s, result.s

; Variable als Rumtime definieren zum Zugriff aus VB-Script
Runtime result


RunProgram("iexplore.exe", "http://www.bbc.com/","")
Delay(3000)


; Daten anlegen
; VB-Script schreiben
vbs = ~""
vbs + ~"Dim w, winTitle, IE" + #LF$
vbs + ~"winTitle = \"BBC - Homepage - Internet Explorer\"" + #LF$
vbs + ~"  For each w in createobject(\"shell.application\").windows" + #LF$
vbs + ~"    If instr(1, typename(w.document),\"htmldocument\", vbTextCompare) > 0 then" + #LF$
vbs + ~"      If instr(1, w.document.title, sWinTitle, vbTextCompare) = 1 then " + #LF$
vbs + ~"        set IE = w" + #LF$
vbs + ~"      End If" + #LF$
vbs + ~"    End If" + #LF$
vbs + ~"  Next" + #LF$
;vbs + ~"Set IE = CreateObject(\"InternetExplorer.Application\")" + #LF$
vbs + ~"IE.Navigate \"www.purebasic.com\"" + #LF$
vbs + ~"IE.Visible = True 'or hide" + #LF$
vbs + ~"Do While IE.busy = True" + #LF$
vbs + ~"  Runtime.Sleep 5000" + #LF$
vbs + ~"Loop" + #LF$
vbs + ~"Runtime.String(\"result\") = IE.document.documentElement.outerHTML" + #LF$
;vbs + ~"IE.Quit" + #LF$


If NewActiveScript()
  Debug "************************************************************"
  Debug vbs
  Debug "************************************************************"
  ParseScriptText(vbs)
  FreeActiveScript()
  Debug "************************************************************"
  Debug result
EndIf
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Update v1.08
- Runtime.Trace output now to MS-DebugView

Link to DebugView: https://docs.microsoft.com/de-de/sysint ... /debugview
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Update ActiveScript v1.09
- Change ActiveScriptCommon Constants
* #UseActiveScriptInterruptPull = #False
* #UseActiveScriptDebugView = #True
- Added JavaScript

Now support JavaScript :wink:

Update v2.01

Code: Select all

XIncludeFile "Modul_ActiveScript.pb"

UseModule ActiveScript

Define js.s, Message.s
Runtime Message
Message = "Hello World"

js = ~"var shell = new ActiveXObject(\"WScript.Shell\");" + #LF$
js + ~"var msg = Runtime.String(\"Message\");" + #LF$
js + ~"shell.Popup(msg);" + #LF$

Debug "*** New ActiveScript ***"
*Control = NewActiveScript("JScript")
If *Control
  Debug "*** Parse ScriptText ***"
  r1 = ParseScriptText(*Control, js)
  If r1 = #S_OK
    Debug "Code Ready."
  EndIf
  Debug "*** Free ActiveScript ***"
  FreeActiveScript(*Control)
  Debug "*** Finished ActiceScript ***"
EndIf
[/size]
Last edited by mk-soft on Sun May 26, 2019 1:31 pm, edited 2 times in total.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Update SmartTags v2.01
- Added ClearSmartTags(TagName)

To avoid memory leaks, the SmartTag must be cleaned up after use,
because with strings or arrays in the SmartTag only the reference to the memory is stored.

Update VariantHelper.pb v2.06
- Added some functions

Example 6

Code: Select all

;-TOP

; Comment   : Modul ActiveScript Example 6
; Version   : v2.06

; Link to ActiveScript  : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399
; Link to SmartTags     : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527089
; Link to VariantHelper : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527090

; ***************************************************************************************

XIncludeFile "Modul_ActiveScript.pb"
XIncludeFile "Modul_SmartTags.pb"
XIncludeFile "VariantHelper.pb"

UseModule ActiveScript
UseModule ActiveSmartTags

; -------------------------------------------------------------------------------------

Procedure.s GetDataSectionText(*Addr.Character)
  Protected result.s, temp.s
  While *Addr\c <> #ETX
    temp = PeekS(*Addr)
    *Addr + StringByteLength(temp) + SizeOf(Character)
    result + temp + #LF$
  Wend
  ProcedureReturn result
EndProcedure

; -------------------------------------------------------------------------------------

Global vbs.s, sFile.s, sDir.s, *psa, dims
Runtime sFile, sDir

; -------------------------------------------------------------------------------------

vbs = GetDataSectionText(?vbs)

sFile = OpenFileRequester("MP3", "", "", 0)
sDir = GetPathPart(sFile)
sFile = GetFilePart(sFile)

Debug "*** New ActiveScript ***"
*Control = NewActiveScript()
If *Control
  Debug "*** Add Object SmartTags ***"
  AddNamedObject(*Control, "SmartTags", NewSmartTags())
  Debug "*** Parse ScriptText ***"
  r1 = ParseScriptText(*Control, vbs)
  If r1 = #S_OK
    Debug "Code Ready."
  EndIf
  Debug "*** Free ActiveScript ***"
  FreeActiveScript(*Control)
  Debug "*** Finished ActiceScript ***"

  Dim Result.s(0)
  VariantToStringArray(SmartTags("Result"), Result())
  For i = 0 To ArraySize(Result())
    Debug Result(i)
  Next
  
  ClearSmartTags("Result")
    
  Debug "************************************************************"
  
EndIf
; -------------------------------------------------------------------------------------

DataSection
  vbs:
  Data.s ~"On Error Resume Next"
  Data.s ~""
  Data.s ~"Dim sFile, sDir, Result(304)"
  Data.s ~"Dim sPropName, sPropValue"
  Data.s ~""
  Data.s ~"sFile = Runtime.String(\"sFile\")"
  Data.s ~"sDir  = Runtime.String(\"sDir\")"
  Data.s ~""
  Data.s ~"Set objShell = CreateObject(\"Shell.Application\")"
  Data.s ~"Set oFolder = objShell.Namespace(sDir)"
  Data.s ~"Set oFile = oFolder.ParseName(sFile)"
  Data.s ~"Runtime.Sleep 20"
  Data.s ~"' Different OS versions support different numbers of supported max entries..."
  Data.s ~"For i = 0 To 304"
  Data.s ~"  sPropName  = oFolder.GetDetailsOf(Null, i)"
  Data.s ~"  sPropValue = oFolder.GetDetailsOf(oFile, i)"
  Data.s ~"  Result(i) =  \"#\" & i & \" | \" & sPropName & \": \" & sPropValue"
  Data.s ~"Next"
  Data.s ~"SmartTags(\"Result\") = Result"
  Data.s #ETX$
  Data.i 0
EndDataSection
[/size]
Last edited by mk-soft on Thu Dec 09, 2021 8:55 pm, edited 3 times in total.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Example 7: Read page from opening internet explorer over title name

Update v2.01

Code: Select all

;-TOP

; Comment   : Modul ActiveScript Example 7 - Get Webpage over Title
; Version   : v2.01

; Link to ActiveScript  : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399
; Link to SmartTags     : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527089
; Link to VariantHelper : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527090

; ***************************************************************************************

XIncludeFile "Modul_ActiveScript.pb"
;XIncludeFile "Modul_SmartTags.pb"
;XIncludeFile "VariantHelper.pb"

UseModule ActiveScript
;UseModule ActiveSmartTags

; -------------------------------------------------------------------------------------

Global vbs.s, result.s
Global title.s
; Variable als Rumtime definieren zum Zugriff aus VB-Script
Runtime result
Runtime title

Title = "Purebasic"

; Daten anlegen

; VB-Script schreiben
vbs + #LF$ + ~" Dim w, sWinTitle, oShell, oWindow"
vbs + #LF$ + ~" "
vbs + #LF$ + ~" Set oShell = CreateObject(\"shell.application\")"
vbs + #LF$ + ~" "
vbs + #LF$ + ~" sWinTitle = Runtime.String(\"Title\")"
vbs + #LF$ + ~" "
vbs + #LF$ + ~" For Each w in oShell.Windows"
vbs + #LF$ + ~"   If InStr(1, typename(w.document),\"htmldocument\", 1) > 0 Then"
vbs + #LF$ + ~"     If InStr(1, w.document.title, sWinTitle, 1) = 1 Then "
vbs + #LF$ + ~"       Set oWindow = w"
vbs + #LF$ + ~"       Runtime.String(\"Title\") = w.document.title"
vbs + #LF$ + ~"     End If"
vbs + #LF$ + ~"   End If"
vbs + #LF$ + ~" Next"
vbs + #LF$ + ~" "
vbs + #LF$ + ~" Set oShell = Nothing"
vbs + #LF$ + ~" "
vbs + #LF$ + ~" If Not IsObject(oWindow) then "
vbs + #LF$ + ~"   Runtime.String(\"result\") = \"InternetExplorer: Page not found\""
vbs + #LF$ + ~" Else"
vbs + #LF$ + ~"   Runtime.String(\"result\") = oWindow.document.documentElement.outerHTML"
vbs + #LF$ + ~"   Set oWindow = Nothing"
vbs + #LF$ + ~" End If"
vbs + #LF$ + ~" "

*Control = NewActiveScript()
If *Control
  Debug "************************************************************"
  Debug vbs
  Debug "************************************************************"
  ParseScriptText(*Control, vbs)
  FreeActiveScript(*Control)
  Debug "************************************************************"
  Debug title
  Debug result
EndIf
[/size]
Last edited by mk-soft on Sun May 26, 2019 1:34 pm, edited 1 time in total.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Simple Variant and SafeArray Helper

Update VariantHelper v2.01
- Added SafeArrayToArray (Strings)
- Added SafeArrayToList (Strings)

Example 9 - GetSelectedFiles - Update

Code: Select all

;-TOP

; Comment   : Modul ActiveScript Example 9 - GetSelectedFiles
; Version   : v2.01

; Link to ActiveScript  : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399
; Link to SmartTags     : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527089
; Link to VariantHelper : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527090

; ***************************************************************************************

XIncludeFile "Modul_ActiveScript.pb"
XIncludeFile "Modul_SmartTags.pb"
XIncludeFile "VariantHelper.pb"

UseModule ActiveScript
UseModule ActiveSmartTags

; -------------------------------------------------------------------------------------

Global vbs.s
Global NewList SelectedItems.s()
        
; Daten anlegen

; VB-Script schreiben
vbs + #LF$ + ~"Function GetSelectedFiles() 'Returns paths as array of strings"
vbs + #LF$ + ~"    Dim FileList, Window, SelectedItem"
vbs + #LF$ + ~"    'avoid duplicates by storing paths in dictionary keys"
vbs + #LF$ + ~"    Set FileList = CreateObject(\"Scripting.Dictionary\")"
vbs + #LF$ + ~"    "
vbs + #LF$ + ~"    With CreateObject(\"Shell.Application\")"
vbs + #LF$ + ~"        For Each Window In .Windows"
vbs + #LF$ + ~"            ' Document type IShellFolderViewDual3"
vbs + #LF$ + ~"            If InStr(1, typename(Window.Document),\"IShellFolderView\", 1) > 0 Then"
vbs + #LF$ + ~"                For Each SelectedItem In Window.Document.SelectedItems"
vbs + #LF$ + ~"                    FileList(SelectedItem.Path) = Null"
vbs + #LF$ + ~"                Next"
vbs + #LF$ + ~"            End If"
vbs + #LF$ + ~"        Next"
vbs + #LF$ + ~"    End With"
vbs + #LF$ + ~"    "
vbs + #LF$ + ~"    GetSelectedFiles = FileList.Keys 'array of paths"
vbs + #LF$ + ~"    Set FileList = Nothing"
vbs + #LF$ + ~"End Function"
vbs + #LF$ + ~""

Debug "*** New ActiveScript ***"
*Control = NewActiveScript()
If *Control
  Debug "*** Add Object SmartTags ***"
  AddNamedObject(*Control, "SmartTags", NewSmartTags())
  Debug "*** Parse ScriptText - Add Function ***"
  r1 = ParseScriptText(*Control, vbs)
  If r1 = #S_OK
    Debug "Function Code Ready."
  EndIf
  
  vbs = ~"SmartTags(\"Result\") = GetSelectedFiles"
  Repeat
    Debug "*** Parse ScriptText - Call Function ***"
    r1 = ParseScriptText(*Control, vbs)
    If r1 = #S_OK
      Debug "Function Code Ready."
      *psa = GetVariantSafeArray(SmartTags("Result"))
      If *psa
        
        Debug "************************************************************"
        Debug "Dims = " + GetSafeArrayDims(*psa)
        Debug "************************************************************"
        
        cnt = SafeArrayToList(*psa, SelectedItems())
        ForEach SelectedItems()
          Debug SelectedItems()
        Next
      EndIf
      ClearSmartTags("Result")
    EndIf
    Debug "************************************************************"

  Until MessageRequester("Question", "Select more ?", #PB_MessageRequester_YesNo) = #PB_MessageRequester_No
    
  Debug "*** Free ActiveScript ***"
  FreeActiveScript(*Control)
  Debug "*** Finished ActiceScript ***"
EndIf
[/size]
Last edited by mk-soft on Thu Dec 10, 2020 11:45 pm, edited 1 time in total.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

ActiveScript Update v2.01
- Multiple instances can now be started
- Added additional parameter for instance
- Change AddObject to AddNamedObject

SmartTags Update v2.01
- SmartTags now ThreadSafe
- Added LockSmartTags() and UnlockSmartTags()

VariantHelper Update v2.01
- Optimize code

Update all examples :wink:

Information:
SmartTags are still a global map of type Variant.
For asynchronous processing of scripts (over threads), access to the SmartTags must be protected.
For this there are the functions LockSmartTags() and UnlockSmartTags().

Runtime variables have always been global and the compiler option ThreadSafe should always be activated for asynchronous processing.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
acreis
Enthusiast
Enthusiast
Posts: 182
Joined: Fri Jun 01, 2012 12:20 am

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by acreis »

Great Work!

Can script call a Purebasic procedure?

(Sorry if answer is obvious or above, I'm reading this after midnight)

Thanks
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Update v2.02
- Added Runtime.Call(RuntimeName, Parameters, ...)

Syntax Callback:
Runtime Procedure Name(cArgs.i, *vArgs, *vResult.Variant)
- cArgs: Count of Parameters
- *vArgs: Pointer to Array of Parameters as Variant. Reverse order of parameters
- *vResult: Pointer to Result as Variant (ByRef). Is Zero by call as Method (Sub Name)

New
A procedure can now be called from the script. This procedure as callback has a fixed parameter structure.

Code: Select all

;-TOP

; Comment   : Modul ActiveScript Example 10 - Call Runtime Procedure
; Version   : v2.01

; Link to ActiveScript  : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399
; Link to SmartTags     : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527089
; Link to VariantHelper : https://www.purebasic.fr/english/viewtopic.php?f=12&t=71399#p527090

; ***************************************************************************************

XIncludeFile "Modul_ActiveScript.pb"
XIncludeFile "Modul_SmartTags.pb"
XIncludeFile "VariantHelper.pb"

UseModule ActiveScript
UseModule ActiveSmartTags

; -------------------------------------------------------------------------------------

Structure udtArgs
  Value.variant[0]
EndStructure

Runtime Procedure RT_Prog(cArgs, *vArgs.udtArgs, *vResult.Variant)
  Protected Index
  
  Debug "+++ Begin RT_Prog +++"
  Debug "Count of Arguments = " + cArgs
  ; Parameters invert order
  For Index = cArgs To 0 Step -1
    Debug "Index " + index + ": " + GetVariantString(*vArgs\Value[index])
  Next
  ; Result
  If *vResult
    Debug "With Result"
    SetVariantString(*vResult, "Hello World from RT_Prog!")
  Else
    Debug "No Result"
  EndIf
  Debug "+++ End RT_Prog() +++"
  ProcedureReturn #S_OK
EndProcedure

Global vbs.s
        
; Daten anlegen

; VB-Script schreiben
vbs + #LF$ + ~"Runtime.Call \"RT_Prog()\", \"Call as Sub\", 1, 2, 3"
vbs + #LF$ + ~"MsgBox Runtime.Call(\"RT_Prog()\", \"Call as Function\", 100, 200, 300)"
vbs + #LF$ + ~""

Debug "*** New ActiveScript ***"
*Control = NewActiveScript()
If *Control
  r1 = ParseScriptText(*Control, vbs)
  If r1 = #S_OK
    Debug "Function Code Ready."
  EndIf
  Debug "*** Free ActiveScript ***"
  FreeActiveScript(*Control)
  Debug "*** Finished ActiceScript ***"
EndIf
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
acreis
Enthusiast
Enthusiast
Posts: 182
Joined: Fri Jun 01, 2012 12:20 am

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by acreis »

Just when I needed it most!

Thanks a lot!
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Update all to v2.03
- Small bugfixes and optimize code
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
blueb
Addict
Addict
Posts: 1041
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by blueb »

Thanks mk-soft

But the last 2 versions produce the same error: :(

Code: Select all

If VariantChangeType_(Value, *vArg\Value[0], 0, #VT_I4) = #S_OK
LOG Results: Line 569: With 'EnableExplicit', variables have to be declared: *vArg.

Tried with various supplied examples.
- It was too lonely at the top.

System : PB 6.10 Beta 9 (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Thanks blueb

Sorry, no testet X86 version

Update v2.04
- Bugfix X86
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
blueb
Addict
Addict
Posts: 1041
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by blueb »

:D
Now working. (5.71 beta 1 x86) and (5.70 LTS x64)

Thanks mk-soft
- It was too lonely at the top.

System : PB 6.10 Beta 9 (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Module ActiveScript for VB-Script with PB-Runtime Variab

Post by mk-soft »

Update v2.06
- Bugfix RefCounter from ActiveScriptParse, etc

ParseScriptText increases the ref-counter from ActiveScriptParse. Thus a release was missing to correct it.
When FreeActiveScript is called, the ref-counter is increased again and then released until it has the correct value.
So it should not lead to a memory leak anymore.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply