My new command isn't being recognized (VB6) - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Forum: Plug-Ins (/forumdisplay.php?fid=28) +------ Thread: My new command isn't being recognized (VB6) (/showthread.php?tid=47341) My new command isn't being recognized (VB6) by NanakiXIII on 07-08-2005 at 07:57 PM
I'm just learning a bit about writing plugins for MsgPlus in VB6 and I've been trying to write one that just adds one command, but my command isn't recognized and doesn't appear in the list that appears when you just press "/" in a conversation window. My plugin is loaded and checked in the MsgPlus preferences, so the problem must be in my coding. I just have no idea what I'm doing wrong. code: It's supposed to pull up a file and send back a random line from it. That part works. I'm probably just missing something stupid because I've never done this before. Any help would be appreciated. RE: My new command isn't being recognized (VB6) by Dempsey on 07-08-2005 at 08:00 PM
you havent done the GetPublishInfo bit RE: My new command isn't being recognized (VB6) by TheBlasphemer on 07-08-2005 at 08:47 PM
I don't think the PublishInfo part is mandatory to be honest... RE: My new command isn't being recognized (VB6) by RaceProUK on 07-08-2005 at 09:24 PM
quote:Correctamundo The problem is probably to do with the file handling, as that's the part most likely to go wrong. * RaceProUK has another read of the code... * RaceProUK checks MSDN... Looks like the code is fine. You'll need to do a few checks witht he file itself though: does it exist, can you read it, stuff like that. And error handling code (On Error) wouldn't go amiss RE: My new command isn't being recognized (VB6) by NanakiXIII on 07-08-2005 at 09:40 PM
code: I thought that meant that I only needed to use the functions that I needed to use, besides Initialize(). All the functions are declared in the modules from the API. Do I need to use all the functions? My file is fine, I actually tested the Get-Random-Line code in a standard EXE and it worked just fine. I replaced sResult = RandomPhobia with sResult = "hello", but nothing has changed. I also have another question: Do I need to register my DLL again and again every time I need to test a change? Thanks. RE: My new command isn't being recognized (VB6) by Mike on 07-09-2005 at 05:35 AM
quote:Nope, I dont think so... I think that VB automatically registers dlls when you compile them... Also, have you added the correct registy entrie in HKEY_CURRENT_USER\Software\Patchou\MsgPlus2\RegisteredPlugins ? The name should be whatever you want and the data should be "TheProjectNameOfYourPlugin.MainClassOfYourPlugin" (without the quotes) RE: My new command isn't being recognized (VB6) by NanakiXIII on 07-09-2005 at 09:18 AM
Well I don't know about VB automatically registering DLLs, the MsgPlus API readme file instructs to register manually. RE: My new command isn't being recognized (VB6) by Mnjul on 07-09-2005 at 09:28 AM Well, I still recommend add an On Error Goto statment. When Plus! says it doesn't recognize the command, it can also mean that there have been some errors during execution of the command. RE: My new command isn't being recognized (VB6) by NanakiXIII on 07-09-2005 at 10:06 AM
Thanks, I added it just to be sure, but now I've made some progress, though I have no idea how. |