What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Resolved] Talking to VB.

Pages: (2): « First [ 1 ] 2 » Last »
[Resolved] Talking to VB.
Author: Message:
Tails
Junior Member
**


Posts: 19
31 / Male / –
Joined: Oct 2004
O.P. [Resolved] Talking to VB.
I'm new to Plus! and JS.

I'm pretty skilled with VB 6 & VB.Net however.

Is there a way to have all the events aviable in VB, maybe an API call or function?

Or do i have to manually make a "translator" for each event and argument etc etc?

How could i go about doing this any way? I don't know any direct way to communicate from JS to VB... well fast any way, i'm sure i could read/write to a file... but that's just not practicle.

Also (Not related to the post) When i was doing the mini tutorial that you can download for JS, i found a problem; When i try to make a xml form come up (i don't know the correct term for it). It would not show. I tried restarting MSN and the script and i followed it exactly, i even tried to get it to show up when a msg was recieved (by looking at the code from other scripts), but nothing worked. I'm still trouble shooting this problem however.

This post was edited on 07-09-2006 at 10:56 PM by Tails.
07-06-2006 03:01 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8337
Reputation: 109
34 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Talking to VB.
Create an ActiveX DLL then call it as an ActiveXObject in the scripts.
07-06-2006 03:03 PM
Profile E-Mail PM Find Quote Report
Tails
Junior Member
**


Posts: 19
31 / Male / –
Joined: Oct 2004
O.P. RE: Talking to VB.
What do i put in this DLL?

So i have to manually make all the events and stuff in the dll?

What JS do i use?

This post was edited on 07-06-2006 at 03:25 PM by Tails.
07-06-2006 03:25 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8337
Reputation: 109
34 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Talking to VB.
quote:
Originally posted by Tails
Also (Not related to the post) When i was doing the mini tutorial that you can download for JS, i found a problem; When i try to make a xml form come up (i don't know the correct term for it). It would not show. I tried restarting MSN and the script and i followed it exactly, i even tried to get it to show up when a msg was recieved (by looking at the code from other scripts), but nothing worked. I'm still trouble shooting this problem however.
Make sure the XML file is saved as Unicode
Check out this example I made : Matty's reply to Cannot CreateChildWnd

quote:
Originally posted by Tails
What do i put in this DLL?
Whatever you want?

quote:
Originally posted by Tails
So i have to manually make all the events and stuff in the dll?
You code whatever events you want it to do. Like have a MessageBox appear.

quote:
Originally posted by Tails
What JS do i use?
Remeber also you need to register your DLL using regsvr32 or by calling the Exported function from the DLL called DllRegisterServer (i think its called).
code:
function OnEvent_Initialize(bMessengerStart){
    var MyActiveXObject = new ActiveXObhect('Projectname.Classname');
}

This post was edited on 07-06-2006 at 03:42 PM by matty.
07-06-2006 03:40 PM
Profile E-Mail PM Find Quote Report
Tails
Junior Member
**


Posts: 19
31 / Male / –
Joined: Oct 2004
O.P. RE: Talking to VB.
ok, thanks for that!

I Will create a DLL and when it's finished i may post it on this site, with script included of course.

User defined objects and forms (from JS) will be a problem for me however and the DLL may not include them.

My bad too, i missed that! I didn't save it as unicode, it was saved as the default (ANSI). It now works :D:D:D:P

This post was edited on 07-06-2006 at 04:09 PM by Tails.
07-06-2006 04:02 PM
Profile E-Mail PM Web Find Quote Report
mathieumg
Full Member
***


Posts: 181
Reputation: 2
29 / Male / Flag
Joined: May 2004
RE: RE: Talking to VB.
quote:
Originally posted by Matty

code:
function OnEvent_Initialize(bMessengerStart){
    var MyActiveXObject = new ActiveXObject('Projectname.Classname');
}


Corrected typo ;)
Official MessengerPlus! Live French Translator
Official StuffPlug 3 French Translator

:)
07-08-2006 05:00 AM
Profile E-Mail PM Web Find Quote Report
Tails
Junior Member
**


Posts: 19
31 / Male / –
Joined: Oct 2004
O.P. RE: Talking to VB.
This is going to need 2 actives X files...

One that communicates and translates from JS.

The other will be added to a VB project and used to relay the commands from the JS active X.

They'll communicate with the send message api or somthing like that.
07-08-2006 11:49 AM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15522
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Talking to VB.
Maybe if you explain in great detail what your plugin/script will do, we could help you more.

As I see it now, you're making it way, and I mean waaaaaaay :D, too complicated and unneeded.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-08-2006 11:54 AM
Profile PM Find Quote Report
Tails
Junior Member
**


Posts: 19
31 / Male / –
Joined: Oct 2004
O.P. RE: Talking to VB.
lol, I'm trying to make it so that i can use VB instead of JS. I don't know much about JS i doubt it's as powerful as VB (well i know JS is good and probebly as powerful, but in a different way). VB has a good editor and all that as well, plus it's easier to link up to other programs and manipulate strings and all that stuff.

My plan in the end is to make a bot with VB that my msn can use, but i guess it will be better just to make the momma load so i can use the same code if i want to make something else with msn/vb later as well.

I don't think JS is good to do something like this in.

This post was edited on 07-08-2006 at 12:34 PM by Tails.
07-08-2006 12:30 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15522
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Talking to VB.
I see... well it can perfectly be done in JScript though, just as easy as it is in VB and you wouldn't have all the overhead and stuff...

Note: you only need 1 ActiveX DLL (yuor 'bot') and the wrapper script if you still want to continue to do this in VB6; not two activex DLLs. Also you don't need the sendmessage API, events in your activex dll can be triggered directly from within JScript and vice versa.

In fact, you don't need to make this event driven actually. Your activex dll could simply be the "core engine", processing the given text (manipulating the text and stuff) and outputting the reaction, while your JScript script simply calls the procedure from that "core engine" to process a string. No need for events syncronization between JScript and the activexdll in that way.

This post was edited on 07-08-2006 at 01:09 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-08-2006 01:06 PM
Profile PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On