设置屏幕分辨率
动词:setScreenResolution
可从以下位置获取: <Standard>
设置选定屏幕的分辨率,用作参数的是宽度、高度和位数/像素度量值。
语法
setScreenResolution --displayindex(Numeric) --width(Numeric) --height(Numeric) --bpp(BitsPerPixel) (Boolean)=value
输入
| 脚本 | 设计器 | 必需的 | AcceptedTypes | Description |
|---|---|---|---|---|
| --displayindex | 显示器索引 | 必需的 | 成员 | 指示应为连接到机器的哪个屏幕设置分辨率的数字。计数从 1 开始。 |
| --width | 宽度 | 必需的 | 成员 | 宽度(以像素为单位)。 |
| --height | 高度 | 必需的 | 成员 | 高度(以像素为单位)。 |
| --bpp | Bpp | 必需的 | 位数/像素 | 用于定义颜色深度或位数/像素的选项。 选项: |
输出
| 脚本 | 设计器 | AcceptedTypes | Description |
|---|---|---|---|
| 值 | 成功 | BOOLEAN | 如果成功设置了屏幕分辨率,那么返回“True”;否则,返回“False”。 |
示例
使用该命令将索引屏幕 1 的分辨率设为 1024x768。
defVar --name success --type Boolean
// Sets the screen resolution.
setScreenResolution --displayindex 1 --width 1024 --height 768 --bpp "High" success=value
logMessage --message "${success}" --type "Info"
// Displays in the console if the resolution was set successfully.