Shoutbox

Hey guys:) New scripter needing some help - 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: Hey guys:) New scripter needing some help (/showthread.php?tid=77381)

Hey guys:) New scripter needing some help by KillaW0lf04 on 09-11-2007 at 01:45 PM

Hey guys,
Today i decided to start learning some scripting for Messenger Plus so i can customize it to the way i see fit :P I although have some questions regarding this scripting. I heard this is almost exactly like java, so will i be able to use java commands (I don't know much java, but i do know a lot of actionscript in flash and they are also similar). How do i perform a function on the event that certain keys are pressed? (i know in action script its if(Key.isDown()) but i dont know what it is in java)

Thanks in advance for being patient with a n00b ;):P


RE: Hey guys:) New scripter needing some help by albert on 09-11-2007 at 01:51 PM

Hum.. I don't really see the resemblence with JAVA to be quite honest, but that might be just me.

What I suggest you to do is to have a look at the Official Docs, everything from events to objects, functions and methods are all in there.. So you shouldn't have a big problem starting up. :)

Here's the link to the doc : http://www.msgpluslive.net/scripts/view/13-Offici...ing-Documentation/


RE: Hey guys:) New scripter needing some help by Spunky on 09-11-2007 at 01:55 PM

quote:
Originally posted by KillaW0lf04
Hey guys,
Today i decided to start learning some scripting for Messenger Plus so i can customize it to the way i see fit :P I although have some questions regarding this scripting. I heard this is almost exactly like java, so will i be able to use java commands (I don't know much java, but i do know a lot of actionscript in flash and they are also similar). How do i perform a function on the event that certain keys are pressed? (i know in action script its if(Key.isDown()) but i dont know what it is in java)

Thanks in advance for being patient with a n00b ;):P

It's not like Java, It's JScript. There are differences between, JScript, Javascript and Java. There is no built in function to detect key presses or mouse clicks... you can look into windows API calls to detect them, but this is a bit more advanced. As said already, the scripting documentation is a good place to start though.

EDIT: If you PM me with your WLM address, I'll add you and give you help whenever you need it
RE: Hey guys:) New scripter needing some help by Matti on 09-11-2007 at 03:58 PM

If you mean when a key is pressed in the typing area of a chat window, there's an event provided by Plus!, named OnEvent_ChatWndEditKeyDown. More information about this event can be found in the docs (Events Reference > Messenger Events)

If you mean when a key is pressed while a PlusWnd is focused, you'll need to register some notification and respond to it. However, this requires some knowledge of how to use the Win32 API and may turn out difficult. I already tried something similar, but failed because I couldn't catch any message.

If you mean when a global hotkey is pressed (like Ctrl+Alt+Delete to open Task Manager and can be used in any program), you'll need to use some DLL to register the hotkey for you and respond on it. I've seen this in HopperLive where it's used to bind "hops" to a global keyboard shortcut, but I have no idea how it's been done. :P


RE: Hey guys:) New scripter needing some help by Mnjul on 09-17-2007 at 02:55 PM

quote:
Originally posted by Mattike
If you mean when a global hotkey is pressed (like Ctrl+Alt+Delete to open Task Manager and can be used in any program), you'll need to use some DLL to register the hotkey for you and respond on it. I've seen this in HopperLive where it's used to bind "hops" to a global keyboard shortcut, but I have no idea how it's been done. :P
In HopperLive it's now done all in jscript, you can take a look at its source codes.