Script for webcam? - 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) +----- Thread: Script for webcam? (/showthread.php?tid=89608) Script for webcam? by Hen on 03-11-2009 at 09:09 AM
Hi, RE: Script for webcam? by mynetx on 03-11-2009 at 09:59 AM
Hello Hen, RE: RE: Script for webcam? by Hen on 03-11-2009 at 03:47 PM
quote: Can I do that? : Write a program in TCL, enable the camera, output will be a nice window. Call the TCL (or other C++) program from messenger plus, and thus bypassing this limitation? Thanks! RE: Script for webcam? by mynetx on 03-11-2009 at 04:28 PM
quote:I don't know if you can write TCL programs... quote:I also don't know if you can access the camera from within TCL. quote:You can run any command in Messenger Plus! scripts. Just create a COM object and run your line: jscript code: You can find more information on the Run command in the MSDN documentation. RE: Script for webcam? by Hen on 03-12-2009 at 10:39 AM
Thank you for your reply and help. RE: Script for webcam? by timeshifter on 03-16-2009 at 12:11 PM
quote: Are there any plans to add this functionality in the near future? I've been thinking about doing something that would require said capability. RE: Script for webcam? by CookieRevised on 03-17-2009 at 05:21 AM
Note that if you can do something with another program, you most likely can do it with Plus! scripting too as it has very few restrictions and allows you to use not only ActiveX/COM objects but also to use Windows APIs. RE: Script for webcam? by timeshifter on 03-17-2009 at 11:57 AM
I'm just looking for a way to start a video call with a script... doesn't need to do anything aside from that. If WLM has an API that I could latch into with a service program written in C#, then fire that from the script, would that work? RE: Script for webcam? by Spunky on 03-17-2009 at 12:24 PM I think you can use the SendMessage API from Windows to launch webcams. I can't remember the correct parameter for webcam although it is on the forum somewhere if you search RE: Script for webcam? by Hen on 05-01-2009 at 10:24 AM
Hi, RE: Script for webcam? by Spunky on 05-01-2009 at 10:50 AM
It doesn't work because you need to create the ActiveXObject in JScript rather than setting a reference in VB. Also, the messenger API you are refering to is actually Windows Messenger that ships with Windows XP, not Windows Live Messenger, so it will probably try to start the wrong programs webcam anyway. js code: Source: quote: RE: Script for webcam? by Hen on 05-01-2009 at 02:47 PM
Hi, RE: Script for webcam? by matty on 05-01-2009 at 02:52 PM
1) Download ResHack. RE: Script for webcam? by Spunky on 05-01-2009 at 05:50 PM
0x0111 means send a command to the window specified by ChatWnd.Handle. RE: Script for webcam? by CookieRevised on 05-04-2009 at 03:51 AM
quote:To add to what has been explained already: If you would program in VB, then yes that is what you need todo; referencing that object. However you are now programming in JScript in Messenger Plus! which is another language and thus works differently. To get the object from Messenger in order to use it functions in JScript in Plus! you need to do what Spunky said in his first reply: first make and call the ActiveXObject. But, there is a much easier way to do what you want, also shown by Spunky: use the SendMessage API again... You can do this because the functions to start a webcam exist in Windows Live Messenger as a menu option. You can use the specific command for that menu item (which essentially is a sent number) to "simulate" a mouse click on that specific menu item and thus start the webcam. This command number is also often known as the cmdid (command ID) and is of course program specific and even window specific (hence you also need to specify the window handle to where that cmdid needs to be send). So, that parameter you ask for, that magic number can be found out by looking at the menu resources from the Windows Live Messenger program. This can be done with a program like ResHacker, as explained by Matty. If you read the help on MSDN you see that the second parameter for the SendMessage API needs to be the "Message" (this name has got nothing todo with Instant Messaging!). This Message in this case is WM_COMMAND which has the numerical value 0x0111. As the third parameter you provide the cmdid of the menu item you whish to invoke. I suggest to read the next page for detailed info: http://www.msgpluslive.net/skins/resources/tut-How-to-find-CmdIds/ PS: don't try to use just any number. You're dealing with internal window stuff here and you can really screw things up if you don't provide the correct values. |