DevMSN+

酷酷的MSN插件,随心所欲MSN

Messenger Plus! Live - Scripting Documentation

Getting Started

Scripting Environment

Having a capable scripting system is not enough if what's surrounding it is not adapted to rapid development scenarios. That's why Messenger Plus! Live was designed with a special developer's mode. This option makes developing scripts an easier task while shielding end-users from boring technicalities at the same time. When debugging options are enabled, developers get access to a special debug window as well as special advantages designed to help them get what they want, how they want.

有一个能干的脚本系统是不够的,如果有什么的周边,这是
没有适应快速发展的情况。这就是为什么Messenger Plus! Live
设计一个特别的开发模式。这个选项使发展中国家
脚本更容易的任务,而屏蔽的最终用户从枯燥
技术性在同一时间内。当调试选项启用,
开发商获取一个特别调试窗口,以及特别
的优势,旨在帮助他们得到他们想要的,他们如何想。

Your main point of entry in the scripting system is the Preferences panel (you'll need to be signed in to access it). From the Plus! menu of your contact list, select Preferences and click on Scripts in the left section (the Scripts section is available in the General tab). This window lists every script currently installed as well as their running state. Scripts that are not running are generally either disabled or contain syntax errors. End-users will generally stick to the "Import" button when they'll want to add a script to Messenger Plus!. The Import button loads a script pack and installs the script automatically based on the developer's configuration file. The Remove button deletes the whole directory of the script and places it in the Recycle Bin (just in case removing the script was a bad idea after all ;).

您的主要切入点,在脚本制度,是偏好小组
(您需要将要签署的在访问它) 。
来自<font color="#808080">加! < /字体>菜单上您的联络清单中,选取
的<font color="#808080">偏好< /字体> ,然后按一下的<font color="#808080">
剧本< /字体>在左边的第(的<font color="#808080">剧本< /字体>
节,可在一般的<font color="#808080"> < /字体>标签) 。这个
窗口列出了每个脚本目前安装的,以及其运行状态。脚本不属于
运行一般都被禁用,要么就是包含语法错误。最终用户将
一般来说,坚持以“导入”按钮时,他们将要添加的脚本
Messenger Plus!进口按钮加载一个<a href="script_packaging.htm">脚本
包< /一>和安装脚本自动的基础上开发的
配置文件。删除按钮删除整个目录的
脚本和地方,它在回收站(刚才的情况下删除脚本是一个
坏主意,毕竟; ) 。

Before you create a new script, you'll want to check "Enable debugging options" and exit the Preferences window. If this is the first time you enable this mode, you'll automatically see the Script Debugging window (if not, the option to show/hide this window is accessible from the Plus! menu of your contact list). The Script Debugging window gives you access to every script currently running in Messenger. The "Debug" menu button links to a couple of functions including quick access to your script's source code. That being said, the main purpose of this window is definitively to show debugging information traced by scripts. You'll also see automatic traces for events executed in your script and error codes with the location in your code where the error occurred. When coding scripts in Messenger Plus!, this window will probably be one of your best friends :).

之前,您创建一个新脚本,您要检查“ ,使调试
选项“ ,退出预置窗口。如果这是您第一次启用
此模式下,您就会自动看到脚本调试窗口(如果不是,
选项显示/隐藏此窗口可从
的<font color="#808080">加! < /字体>菜单上的连络人清单) 。脚本
调试窗口,让您使用每一个脚本在当前正在运行的信使。
“调试”菜单按钮链接到一对夫妇的功能,包括快速
访问您的脚本的源代码。说了这番话之后,主要目的是这个窗口
明确显示调试信息跟踪脚本。您还会看到自动
痕迹的活动执行在您的脚本和错误代码与位置在您的代码
如果发生错误。当编码的脚本Messenger Plus! ,该窗口会
可能是您的其中一个最好的朋友: ) 。

Enabling debugging options also has one more noticeable advantage. Messenger Plus! comes with its own script editor. This editor supports syntax coloring, outlining, basic IntelliSense and many other features designed to help you while you code. It is probably enough for script developers who want to code their scripts quickly without starting an external software. However, we understand that the built-in editor has its limitations and because so many great JScript editors already exist on the market (like Visual Studio), Messenger Plus! lets you use your favorite editor by monitoring changes done in your ".js" script files. When debugging option are enabled, if a script file is modified by an external application, the script is automatically reloaded to apply the changes. This means that every time you save your script, you instantly see the changes without having to perform any extra manipulation. Note however that in order to avoid any possible kind of confusion, this functionality is disabled while the script editor window is displayed. Also, remember that this feature is only intended to be used by developers, this means that you cannot rely on it for public use of your script (so don't code a feature that expects code file changes to be intercepted by Messenger Plus!).

有利的调试选项,也有一个更加明显的优势。信使
加!谈到与自己的脚本编辑器。此编辑器支持语法着色,
概述,基本的IntelliSense和许多其他功能旨在帮助您,而
你的代码。它可能是不够的脚本
开发商谁不想自己的脚本代码迅速启动一个外部
软件。不过,据我们了解,内建在编辑器中有其局限性,因为,所以
许多伟大的JScript的编辑已经存在于市场(如
的<a target="_blank" href="http://msdn.microsoft.com/vstudio/express/default.aspx">
的Visual Studio < /一> ) ,Messenger Plus!可让您使用您最喜爱的
编辑器的变化进行监测做在您的“ 。 js ”的脚本文件。当调试
选项启用,如果一个脚本文件是改性外部应用程序,
脚本是自动重新载入应用更改。这意味着,每
每当您保存您的脚本,您可以即时看到的变化,而不需要
执行任何额外的操作。但是请注意认为,为了避免任何可能的
种混乱,这个功能是残疾人士,而脚本编辑器窗口
显示出来。此外,请记住,这个功能是只打算使用
发展商,这意味着你不能依靠它,供公众使用您的脚本
(所以不要代码的功能,预计代码文件的变化,必须截获
Messenger Plus! ) 。

There is also one more thing to remember about restarting your scripts: it is considered to be a good practice to close every window your script may be displaying, including message boxes, before the script is stopped. Because of the way script code is executed, if a script is stopped in its execution while it is displaying a modal window (a window that stops the execution of your script until it's closed), Messenger may completely crash. If you forget to close a window and crash Messenger as a result of stopping/restarting your script, don't worry about possible problems, there isn't any (no need to send an error report either).

也有一更要记住的关于重新启动脚本:这是
被认为是一个很好的做法,关闭每一个窗口,您的脚本可能会
展示,包括消息框之前,脚本是停止。因为
方式指令码执行,如果一个脚本是停止在其执行而
这是显示模态窗口(一个窗口,停止执行您的
脚本直到它的关闭) , Messenger可能会完全崩溃。如果您忘记
关闭窗口和系统崩溃信使,由于煞车/重新启动
脚本,不用担心可能出现的问题,不存在任何(无需发送
错误报告要么) 。

If you're new to the Messenger Plus! Live scripting system, it is recommended that you stick with the built-in editor for a while. It will probably help you have a more complete understanding of the system and you'll see that the built-in editor is not that bad either ;). Now that you have enabled the debugging option, you're ready to create your first script!

如果您新的向Messenger Plus! Live脚本系统,这是建议
你坚持与内置在编辑了一段时间。它可能会帮助您
有一个较完整的理解系统,你会看到,该
内置在编辑器是不是坏的不是; ) 。现在您已经启用
调试选项,您准备好要的<a href="first_script.htm">建立您的第一个
脚本< /一> !

See Also

What's a Messenger Plus! Script?, Your First Script.

Sponsor

copyright devmsn.com