注意:此版本仅供预览和测试,不含完整功能。
下载:
http://forum.streamlet.org/thread-236-1-1.html
本版本用于测试脚本系统,已将 Alt+1 关联到了 ext\SampleExtension.lua。
脚本使用 lua 语言,格式大致为(正式版出来之前可能还会有改动):
-----------------------------------------------------------------------------
-- SampleExtension.lua
Extension =
{
Application = "xlWarKey", --请勿修改
Version = "3.0", --请勿修改
NameSpace = "http://www.streamlet.org/api/xlwarkey/3.0", --请勿修改
ExtensionName = "SampleExtension", --请勿修改
Description = "This is a sample extension.",
Configuration =
{
setting1 = --设置项1(本例不使用)
{
Type = "number",
Desc = "Please input an integer."
},
setting2 = --设置项2(本例不使用)
{
Type = "string",
Desc = "Please input a string."
}
--其他设置项
},
Entrance = function (id) -- 入口函数
-- 所有代码都请写在这里
return true; --必须返回 true 或者 false。返回值意义目前暂未定义。
end
};
----------------------------------------------------------------------------
复制代码
目前支持的 API 有:
void PressKey(number vkcode [,
boolean ctrl [, boolean shift [, boolean alt [, boolean win]]]])
按下某键。
第一个参数为虚拟键码,也就是 Windows 的 VK_*,脚本里给出了一个 Keys 变量,可以直接使用 Keys.VK_*。其中 0 - 9 用 Keys.VK_0、……、Keys.VK_9,字母键用 Keys.VK_A、……、Keys.VK_Z。
后面四个表示状态键是否被按下。默认 false。
若要按下 Ctrl+1,可写成 PressKey(Keys.VK_1, true, false, false, false);
也可简写为 PressKey(Keys.VK_1, true)。
void ReleaseKey(number vkcode [,
boolean ctrl [, boolean shift [, boolean alt [, boolean win]]]])
下载:
http://forum.streamlet.org/thread-236-1-1.html
本版本用于测试脚本系统,已将 Alt+1 关联到了 ext\SampleExtension.lua。
脚本使用 lua 语言,格式大致为(正式版出来之前可能还会有改动):
-----------------------------------------------------------------------------
-- SampleExtension.lua
Extension =
{
Application = "xlWarKey", --请勿修改
Version = "3.0", --请勿修改
NameSpace = "http://www.streamlet.org/api/xlwarkey/3.0", --请勿修改
ExtensionName = "SampleExtension", --请勿修改
Description = "This is a sample extension.",
Configuration =
{
setting1 = --设置项1(本例不使用)
{
Type = "number",
Desc = "Please input an integer."
},
setting2 = --设置项2(本例不使用)
{
Type = "string",
Desc = "Please input a string."
}
--其他设置项
},
Entrance = function (id) -- 入口函数
-- 所有代码都请写在这里
return true; --必须返回 true 或者 false。返回值意义目前暂未定义。
end
};
----------------------------------------------------------------------------
复制代码
目前支持的 API 有:
void PressKey(number vkcode [,
boolean ctrl [, boolean shift [, boolean alt [, boolean win]]]])
按下某键。
第一个参数为虚拟键码,也就是 Windows 的 VK_*,脚本里给出了一个 Keys 变量,可以直接使用 Keys.VK_*。其中 0 - 9 用 Keys.VK_0、……、Keys.VK_9,字母键用 Keys.VK_A、……、Keys.VK_Z。
后面四个表示状态键是否被按下。默认 false。
若要按下 Ctrl+1,可写成 PressKey(Keys.VK_1, true, false, false, false);
也可简写为 PressKey(Keys.VK_1, true)。
void ReleaseKey(number vkcode [,
boolean ctrl [, boolean shift [, boolean alt [, boolean win]]]])