MSScriptControl - Does it work with PB4?

Just starting out? Need help? Post your questions and find answers here.
johnfermor
User
User
Posts: 29
Joined: Wed Dec 31, 2003 3:17 pm

MSScriptControl - Does it work with PB4?

Post 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
:?:
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: MSScriptControl - Does it work with PB4?

Post 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
johnfermor
User
User
Posts: 29
Joined: Wed Dec 31, 2003 3:17 pm

Re: MSScriptControl - Does it work with PB4?

Post 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!
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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?
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Nevermind, it looks like an abandoned project.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Shannara wrote:Nevermind, it looks like an abandoned project.
The lib is IMHO finished, what you are missing?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

scriptcontrol - possible - is with these functions. but iam not with any docu about it.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

VB Implimentation using the features of the script control: http://planet-source-code.com/vb/script ... 6&lngWId=1

Microsoft MSDN documentation (top part): http://msdn.microsoft.com/library/defau ... b04j10.asp

Mainly the script control's AddObject member is the key part.

More information ...

http://builder.com.com/5100-6387-1045808.html
http://msdn.microsoft.com/library/defau ... 071299.asp
http://www.microsoft.com/mind/0799/script/script.asp
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post 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.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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 :)
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post 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 !
SPAMINATOR NR.1
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post 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!
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post 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 ;)
SPAMINATOR NR.1
Post Reply