It is currently Tue Jul 23, 2019 2:07 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Mon Oct 22, 2018 11:20 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Mar 25, 2004 2:15 pm
Posts: 690
Location: Spain
:? I just did this dirty change and it works fine

run iexplorer with an url
Code:
RunProgram("iexplore.exe", "http://www.bbc.com/","")
Delay(3000)

and replace in vbs var: vbs + ~"Set IE = CreateObject(\"InternetExplorer.Application\")" + #LF$ to
Code:
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:
;-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

_________________
PB 5.7x, PureVision User.


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Tue Oct 30, 2018 12:32 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
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 / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Sun Nov 04, 2018 10:55 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
Update ActiveScript v1.09
- Change ActiveScriptCommon Constants
* #UseActiveScriptInterruptPull = #False
* #UseActiveScriptDebugView = #True
- Added JavaScript

Now support JavaScript :wink:

Update v2.01
Code:
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

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Last edited by mk-soft on Sun May 26, 2019 1:31 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Sun Nov 04, 2018 12:17 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
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.

Example 6
Code:
;-TOP

; Comment   : Modul ActiveScript Example 6
; 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

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

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

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

Global vbs.s, sFile.s, sDir.s, *psa
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 ***"

  *psa = GetVariantSafeArray(SmartTags("Result"))
  If *psa
   
    Debug "************************************************************"
    Debug "Dims = " + GetSafeArrayDims(*psa)
    Debug "************************************************************"
   
    For x = 0 To GetSafeArrayElements(*psa, 1) - 1
      Debug GetVariantString(GetSafeArrayElementPtr(*psa, x))
    Next
    ClearSmartTags("Result")
    Debug "************************************************************"
  EndIf
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.i 0
EndDataSection

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Last edited by mk-soft on Sun May 26, 2019 1:33 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Wed Feb 20, 2019 6:09 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
Example 7: Read page from opening internet explorer over title name

Update v2.01
Code:
;-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

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Last edited by mk-soft on Sun May 26, 2019 1:34 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Wed May 22, 2019 8:12 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
Simple Variant and SafeArray Helper

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

Example 9 - GetSelectedFiles - Update
Code:
;-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$ + ~"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

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Sun May 26, 2019 1:51 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
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 / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Tue May 28, 2019 10:08 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Jun 01, 2012 12:20 am
Posts: 139
Great Work!

Can script call a Purebasic procedure?

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

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Tue May 28, 2019 9:20 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
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:
;-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 / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Wed May 29, 2019 6:21 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Jun 01, 2012 12:20 am
Posts: 139
Just when I needed it most!

Thanks a lot!


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Thu May 30, 2019 10:32 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
Update all to v2.03
- Small bugfixes and optimize code

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Thu May 30, 2019 12:05 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 806
Location: Cuernavaca, Mexico
Thanks mk-soft

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

Code:
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Thu May 30, 2019 12:37 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
Thanks blueb

Sorry, no testet X86 version

Update v2.04
- Bugfix X86

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Thu May 30, 2019 12:46 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 806
Location: Cuernavaca, Mexico
:D
Now working. (5.71 beta 1 x86) and (5.70 LTS x64)

Thanks mk-soft

_________________
- It was too lonely at the top.


Top
 Profile  
Reply with quote  
 Post subject: Re: Module ActiveScript for VB-Script with PB-Runtime Variab
PostPosted: Sat Jun 01, 2019 2:14 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 1770
Location: Germany
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 / OOP-BaseClassDispatch / Event-Designer
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: Fred and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye