4.Fundamentals Conmand
2025年5月5日
基础命令学习
Comments 注释
// My Comment - 行注释
[IPress,]/* My Comment */[IPress,] // 块注释 -之间所有内容都会变灰

三种不同类型的控件
[IButton]
按钮
[IButton, Button name, Popup info Text,
Commands group to execute when button is pressed,
Initially Disabled? (0:Enabled(ByDefault) NonZero:Disabled),
Button width in pixels (0:AutoWidth NonZero:Specified width),
Optional hotkey,
Optional button icon (.psd .bmp + .pct for Mac Systems),
Button height in pixels (0:AutoHeight NonZero:Specified height)]
/*
[按钮,按钮名称,弹出信息文本,
按下按钮时要执行的命令组,
按钮是否初始处于禁用状态?(0:启用(默认情况下) 非零值:禁用),
按钮的像素宽度(0:自动宽度 非零值:指定宽度),
可选的热键,
可选的按钮图标(.psd .bmp + .pct 格式适用于 Mac 系统),
按钮的像素高度(0:自动高度 非零值:指定高度)]
*/
按钮名称
[IButton, "my Button", ]
(加双引号能包括在内的所有文本内容,包括空格号)

按钮位置
[IButton, "ZPlugin:my Button", ]
(双引号内添加路径信息时 也就是xxx:
会在对应的工具窗口路径下创建)

添加Note提示
[IButton, "my Button", "my Button info Text",
[Note, "Hello,World!",,1]
]

displayTime 显示时间

Disabled 按钮禁用
[IButton, "my Button", "my Button info Text",
[Note, "Hello,World!",,1,]
,1,
]

比例宽度
- 长
[IButton, "my Button", "my Button info Text",
[Note, "Hello,World!",,1,]
,,100, /* 像素 */
]
[IButton, "my Button", "my Button info Text",
[Note, "Hello,World!",,1,]
,,.0.5, /* 百分比 0.5% */
]
- 高
这个50所在的位置就是高了。
[IButton, "my Button", "my Button info Text",
[Note, "Hello,World!",,1,]
,,100,,,50,
]
快捷键
可以通过这个网站获取 keycode Key and Character Codes vs. Event Types
比如按了 A 键位 那么 网站显示的 keyCode 则是 65

那么代码则是,执行按快捷键也会提示Hello,World!
[IButton, "my Button", "my Button info Text",
[Note, "Hello,World!",,1,]
,,100,65,
]
图标按钮
我们需要准备PSD文件 放在插件目录下的自定义文件夹即可
例如: 我们准备一个长方形为 150*50 像素的PSD 图标。
[IButton, "my Button", "my Button info Text",
[Note, "Hello,World!",,1,]
,,150,65,"Data/hello.psd",50
]
那么代码上的比例也得一起改。

字体隔断颜色
[IButton, "my Button", "my Button \n 0x2B821F info Text",
[Note, "Hello,World!",,1,]
,,150,65,"Data/hello.psd",50
]

\n
下一行0x2B821F
web color#2B821F
0x
等于#
If Else
语句
[IButton, "If Check",,
[If,((5>3)&&(4<2))||(4>=4), //true
[Note, true]
, //else·false
[Note, false]
]
/*
- Evaluation Operators-
< Smaller than
> Greater than
<= Smaller or equal than
>= Greater or equal than
== equal to
&& And
|| or
! Not
[If,
True Or False Evaluation ,
Commands group to be executed if false (is zero),
Commands group to be executed if true (not zero)
]
*/
[ISlider]
滑块
[ISlider, ChangeMe, 12, 1, 0, 100, , [MessageOk, ThankYou]]
[ISwitch]
开关
[ISwitch, ClickMe, 1, "Info text", [MessageOK, On], [MessageOK, Off]]
[ISwitch,
Button Text, //名称
Initial state (1=pressed,0=unpressed), //初始状态
Popup info Text, //弹出提示文本
Commands group to execute when button is pressed, //按下时的命令
Commands group to execute when button is unpressed, //松开时的命令
Initially Disabled? (0=Enabled(ByDefault) NonZero=Disabled), //是否禁用
Button width in pixels (0=AutoWidth NonZero=Specified width), //宽度
Button height in pixels (0=AutoHeight NonZero=Specified height), //高度
Optional button icon (.psd .bmp ) //图标
]
[IButton]
learning...
更新日志
2025/5/11 08:52
查看所有更新日志
25233
-于7b69a
-于f915c
-于a3c1f
-于9e55d
-于2ef45
-于