Page 1 of 2
MSScriptControl - Does it work with PB4?
Posted: Fri Sep 08, 2006 10:54 pm
by johnfermor
Hi
I need to run a number of Vbscripts in an app I'm writing and the only (easy) way to incorporate this functionality is by using the MSScriptControl (available from
http://purearea.net/ -> User libs -> MSScriptControl) - I haven't found any other way. I intend to manage users, groups, etc on a Windows 2003 domain.
Does the MSScriptControl library work in PB4? When I run the example included, I get an error ; "MSSCStart() is not a function, array, macro or linked list".
Am I supposed to do anything other than copying the control into the 'Program files\PureBasic\Libraries' folder? Do I need to 'reference' the library in another way that I'm not aware of?
Is there a better way?
Many thanks for your help ..
John

Re: MSScriptControl - Does it work with PB4?
Posted: Fri Sep 08, 2006 11:07 pm
by Kiffi
Hello John,
johnfermor wrote:Am I supposed to do anything other than copying the control into the 'Program files\PureBasic\Libraries' folder? Do I need to 'reference' the library in another way that I'm not aware of?
you have to restart the compiler after copying the lib into the userlib-folder.
But nevertheless the MSScriptControl lib does not work with PB4
ts-soft wrote a scriptcontrol, which works with 4.0:
http://ts-soft.eu/dl/scriptcontrol.zip
And here's the link to the german forum (to see some codesnippets)
http://www.purebasic.fr/german/viewtopic.php?t=8761
Greetings ... Kiffi
Re: MSScriptControl - Does it work with PB4?
Posted: Fri Sep 08, 2006 11:16 pm
by johnfermor
Hello John,
johnfermor wrote:
Am I supposed to do anything other than copying the control into the 'Program files\PureBasic\Libraries' folder? Do I need to 'reference' the library in another way that I'm not aware of?
you have to restart the compiler after copying the lib into the userlib-folder.
But nevertheless the MSScriptControl lib does not work with PB4
ts-soft wrote a scriptcontrol, which works with 4.0:
http://ts-soft.eu/dl/scriptcontrol.zip
And here's the link to the german forum (to see some codesnippets)
http://www.purebasic.fr/german/viewtopic.php?t=8761
Greetings ... Kiffi
Thanks for this Kiffi
I'll look into this control and look at the snippets.
Thanks for the quick reply!
Posted: Fri Sep 08, 2006 11:52 pm
by Shannara
Downloaded the newest version, and checked out the samples included and on that thread. This looks like a great start, and I hope he's the first guy to be able to complete the support for msscript.ocx in future releases.
Posted: Sun Sep 10, 2006 2:09 am
by Shannara
Now I look at the date of the german post .. almost two months ago .. hrm, do you know if he has completed that library since then or if there will be an update with the ms script.ocx function that allows script to call program's functions?
Posted: Fri Oct 13, 2006 12:37 am
by Shannara
Nevermind, it looks like an abandoned project.
Posted: Fri Oct 13, 2006 12:54 am
by ts-soft
Shannara wrote:Nevermind, it looks like an abandoned project.
The lib is IMHO finished, what you are missing?
Posted: Fri Oct 13, 2006 4:50 pm
by Shannara
So far every project for using the script control with pb ends basically 1/2 way. It's missing one of the key features of the script control, and that is adding program functions and "classes" so that scripts can actuall call them and use them.
Posted: Fri Oct 13, 2006 5:07 pm
by ts-soft
scriptcontrol - possible - is with these functions. but iam not with any docu about it.
Posted: Fri Oct 13, 2006 7:10 pm
by Shannara
Posted: Fri Oct 13, 2006 7:27 pm
by ts-soft
This is mostly for VB. PB <> VB, but i will see what is possible.
My english isn't good, so i can't understand all of msdn. That's is why its
opensource, so can somebody helps.
Posted: Fri Oct 13, 2006 7:47 pm
by Shannara
My apologies. The links I provided is mostly VB using the script control, but all those are possible with VC++ and anything that uses ActiveX controls. for example:
C++?:
http://www.codeproject.com/com/scriptde ... ct=1093841
Actually, i think that's it. The problem, I see is. This is where everybody who tried to impliment the script control stops ... Either the project was abandoned, or they do not know how to use the .AddMember member from PureBasic.
So we have all of these mostly complete interfaces with Ms Control, except for the use of the key member that actually extends the control. So I guess I am saying that, after all of these years, nobody in the community (least of all me) have been able to complete the ms script control implimentation in PureBasic.
I was kinda hoping you was able to

Posted: Sat Oct 14, 2006 8:23 am
by Rings
Shannara wrote:Actually, i think that's it. The problem, I see is. This is where everybody who tried to impliment the script control stops ... Either the project was abandoned, or they do not know how to use the .AddMember member from PureBasic.
...
I was kinda hoping you was able to

except you who is wining here about it.
why not code yourself ?
you are familar enough with english language and the msdn,
know enough about VB and purebasic.
so only a short step to give the community a working script-control with addobject functionality.
also, you have to write a object wrapper, that turns a procedure into a callable COM-object.
you can do that , i know.
go on now !
Posted: Sat Oct 14, 2006 8:42 pm
by Shannara
Shannara wrote:
So we have all of these mostly complete interfaces with Ms Control, except for the use of the key member that actually extends the control. So I guess I am saying that, after all of these years, nobody in the community (least of all me) have been able to complete the ms script control implimentation in PureBasic.
In bold is the reason why not me, because I have tried. But however ... now that you have given a helpful hint:
Rings wrote:
you have to write a object wrapper, that turns a procedure into a callable COM-object.
You have given everybody in the community who have worked with the ms script control a hint on how to complete the implimentation of it ... I'll give that tip a shot .... thanks!
Posted: Sat Oct 14, 2006 8:53 pm
by Rings
ah yes, i'm now over 40 and act as senior developer.
I only give hints and commands, never code a line myself.
We (at work) use MSScript in our buisness appz with userdefinied functions, bind in via MSScript.addobject().
and that VB classes (and functions) are simply activeX-DLL's .
So normaly (havent tried that myself), if PB can emulate a com-dll (or parts of that), it should work.
I also remember (second hint now),
that on the net are several examples how to write a activexdll in plain C and/or fasm (or masm) .
Got no link here, but that could be the third hint next post
