Directory Opus
GitHub用户脚本Telegram 群
  • 主页
  • 文件浏览
    • 文件窗口
      • 默认窗口
      • 工具栏
        • 收藏栏
    • 多文件夹
      • 单窗口模式
      • 标签页
      • 双栏
      • 来源和目标
    • 查看
      • 列表
        • 列
        • 排序
        • 分组
        • 视图
          • 详细视图
          • 缩略图
          • 平面视图
        • 标记
        • 选择
          • 复选框
        • 即时查找
      • 信息提示
      • 查看器
      • 文件夹格式
    • 导航
      • 地址栏
      • 文件夹树
      • 收藏夹
      • 别名
    • 文件对话框
    • 终端
  • 文件搜索
  • 文件操作
    • 文件创建
    • 文件移动
    • 文件复制
    • 重命名
    • 剪贴板
    • 上下文菜单
    • 拖放
    • 安全
  • 文件类型
    • 元数据
    • 压缩包
    • 图片
      • ICO
      • SVG
    • 文档
      • 纯文本
      • 代码
      • Markdown
      • Word 文档
      • PDF
      • 网页
    • 表格
      • Excel 表格
      • 数据库
    • 幻灯片
    • 模型
    • 种子
    • 邮件
  • Directory Opus
    • 配置
      • 主题
    • 命令
      • 命令
      • 外部控制码
      • 修饰符
      • 内置命令
    • 脚本
      • 变量
    • 更新日志
  • 官方手册
    • 目录
    • 版权
    • 许可证
      • 最终用户许可条件
      • 批量许可条件
    • 致谢
    • 简介
    • 基本概念
      • 启动 Opus
      • 文件窗口
        • 打开文件窗口
        • 默认文件窗口
        • 导航
          • 主文件夹
          • 上、前进、后退
          • 文件树
          • 地址栏
            • 路径字段
          • 驱动按钮和下拉菜单
          • 收藏夹
          • 智能收藏夹
          • 最近和历史列表
          • 别名
          • 成对文件夹
        • 标签
          • 标签切换器
          • 锁定标签页
          • 关联标签页
          • 标签组
        • 视图模式
        • 双栏
          • 导航锁定
        • 工具栏
          • 默认工具栏
            • 菜单工具栏
            • 操作工具栏
            • 收藏栏
            • 文件列表工具栏
            • “图像”工具栏
          • 动态工具栏
          • 工具栏集
        • 即时查找字段
        • 查看器窗格
        • 元数据窗格
        • 实用程序面板
        • 布局
        • 样式
        • 主题
          • 创建自己的主题
        • 状态栏
      • 资源管理器替换模式
      • 源目录和目标目录
      • 选择文件
        • 使用鼠标和键盘进行选择
          • 单击模式
          • 复选框模式
        • 简单通配符选择
        • 高级选择
        • 选择单元格
      • 搜索和过滤
        • 过滤栏
        • 显示所有内容
        • 工具栏过滤项
        • 快速搜索
        • 查找文件
          • 简易查找
          • 高级查找
      • 排序和分组
        • 手动排序
      • 文件夹格式
        • 文件夹格式对话框
          • 列
            • 冻结列
          • 排序
          • 分组
          • 显示
          • 过滤器
        • 已保存文件夹格式
        • 自动记住格式
        • 内容类型
        • 确定当前格式
        • 锁定格式
      • 可展开文件夹
      • 平面视图
      • 文件夹大小
      • 虚拟文件系统
        • 系统虚拟文件夹
        • 文件集合
          • 存储的查询
        • 库
        • 压缩包
        • FTP
        • MTP
    • 文件操作
      • 复制、移动和删除文件
        • 复制和粘贴
        • 拖放
        • 使用工具栏按钮进行复制
          • 复制时使用通配符
        • 复制队列
          • 复制覆盖和幽灵文件
          • 无人值守操作
        • 作业栏
        • 确认文件替换对话框
        • 复制已更新文件
          • 同步
        • Deleting Files
          • 安全删除
      • 重命名文件
        • 内联重命名
        • 简单通配符重命名
        • 高级重命名
          • 重命名预设
          • 重命名模式
            • 标准通配符重命名
            • 查找和替换
            • 正则表达式
            • 正则表达式 + 查找并替换
          • 重命名操作
            • 文件编号
            • 重命名宏
          • 重命名选项
          • 使用元数据重命名
          • 重命名脚本
      • 创建文件夹
      • 创建压缩包
        • 添加到压缩包文件
        • 添加到压缩包对话框
          • Zip 选项
          • 7z 选项
          • RAR 选项
          • TAR BZip2 选项
          • TAR GZip 选项
        • Zip 文件
          • Zip 注释
          • 只读模式
          • 自解压 Zip 文件
      • 跟踪和撤销文件操作
      • 更改属性
      • 标记和状态图标
      • 编辑元数据
        • 文档属性
        • 图片属性
        • 音乐属性
          • 添加封套插图
        • 视频属性
        • 扩展属性
        • 元数据的编程设置
        • 时间偏移
      • 文件说明
      • 过滤操作
        • 过滤条款
        • 添加、删除和编辑子句
        • 过滤条款类型
        • 文本过滤器
      • UAC 和管理员模式
    • FTP
      • FTP 地址簿
        • 默认设置
        • 站点页
        • 网络页面
        • Display Page
        • 索引页面
        • 声音页面
        • 杂项页面
        • 速度页面
        • 特殊页面
        • 转账页面
        • 代理页面
      • 添加新站点
      • FTP 连接
      • 站点属性
      • FTP 日志
      • FTP 路径
    • 附加功能
      • 查看图像
        • 查看器鼠标、键和工具栏
        • 图像标记
        • 文件窗口关联查看器
      • 播放声音
      • 图像转换
        • 自动化图像转换任务
      • 打印文件夹
      • 重复文件查找器
      • 拆分文件
      • 拼接文件
      • 制作链接和连接点
      • 浮动工具栏
        • 控制浮动工具栏
      • 系统级热键
      • 导出到 USB
      • 与 Everything 集成
      • 擦除所有空白
      • 文件类型概览
      • 更新检查器
      • CLI
      • 崩溃日志
    • 配置
      • 备份和恢复配置
      • 配置类别
        • 色彩和字体
          • 暗黑模式
          • 主题
          • 颜色混合
          • Directory Opus 颜色
          • Windows 颜色
          • 图像
          • 字体
        • 文件列表
          • 文件夹展开
          • 鼠标
            • 背景事件
          • 导航
          • 选项
            • 信息提示
            • Tab键
          • 状态栏
          • 标题栏
        • 文件列表列
          • 外观
          • 求值器列
          • 求值器分组
          • 文件名
          • 图标
          • 选项
          • Shell 属性
        • 文件列表模式
          • 详细信息
          • 增强模式
            • 外观
            • 按钮
          • 缩略图
            • 文件夹
            • 性能
            • 样式
          • 平铺模式
        • 文件操作
          • 文件复制
            • 属性
            • 确认
            • 元数据
            • 安全
          • 删除文件
          • 双击文件
            • FTP
          • 日志记录
          • 元数据
            • 元数据编辑器
            • 音乐类型
          • 选项
          • 进度指示器
            • 统计文件
            • 作业栏
          • 重命名文件
            • 控制键
        • 过滤和排序
          • 过滤
          • 过滤栏
          • 即时查找
            • 过滤模式
            • 查找模式
            • 文件夹模式
          • 全局过滤器
          • 快速键
          • 排序
        • 文件夹
          • 自动读取
          • 文件夹格式
            • 自动格式
          • 文件夹图像
          • 文件夹大小
            • 交接点和链接
          • 网络服务器
          • 特殊文件夹
          • 虚拟文件夹
            • 桌面
            • 文件系统
            • 此电脑
        • 文件夹标签页
          • 尺寸
          • 边缘颜色
          • 文件夹标签栏
          • 分组
          • 锁定
          • 选项
        • 文件夹树
          • 外观
          • 内容
          • 展开/折叠
            • 图钉
          • 选项
          • 选择事件
        • 常用路径
          • 收藏夹列表
          • 文件夹别名
          • 主文件夹
          • 配对文件夹
          • 最近列表
          • 智能收藏夹
        • Internet
          • 电子邮件
          • 更新
        • 标记
          • 标记 定义
          • 标记分配
            • 在特定文件夹中
          • 选项
        • 启动 Opus
          • 资源管理器替换
          • 来自桌面
          • 任务栏图标
          • 来自 Win + E 热键
          • 启动
        • 布局和样式
          • 默认文件窗口
          • 布局
          • 样式
        • 地址栏
          • 选项
          • 路径字段
            • 外观
            • 菜单
            • 路径补全
          • 工具栏
        • 其它
          • 高级选项
          • 外部工具
          • 隐私
          • Shell 扩展
          • 声音
          • Windows 集成
            • 跳跃列表
          • Windows 启动延迟
        • 工具栏
          • 外观
          • 文件夹工具栏
          • 图标
          • 选项
          • 工具栏组
          • 视图工具条
        • 用户界面
          • 语言
          • Spacing
          • 过渡动画
        • 查看器
          • 独立查看器
            • Options
            • 尺寸和位置
            • 鼠标按钮
            • 已标记图片
            • 幻灯片放映
          • 查看器窗格
          • 查看器插件
        • Zip 和其它压缩包文件
          • 压缩包与 VFS 插件
          • 压缩包选项
          • 上下文菜单
          • Zip 文件
    • 自定义
      • 自定义对话框
        • 工具栏
        • 上下文菜单
        • 按键
        • 命令
        • User Commands
        • 默认工具栏
      • 创建您自己的按钮
        • Editing the Toolbar
          • 启动选项
          • 工具栏上下文菜单
          • 多功能按钮
          • 下拉按钮和菜单
          • 动态按钮
            • 驱动器按钮配置
          • Field Buttons
            • 路径字段配置
            • 过滤器字段配置
            • 驱动器下拉配置
          • 与他人分享功能
        • 命令编辑器
          • 简单命令编辑器
          • 高级命令编辑器
          • 使用热键控件
        • 用户自定义命令
        • 同步和异步函数
        • 内部命令参数
        • 将文件传递到外部程序
        • 命令修饰符
        • MS-DOS 批处理命令
        • WSL 命令
        • 嵌入重命名脚本
        • DDE 函数
        • 嵌入式功能
    • 文件类型
      • Directory Opus 文件类型
      • 文件类型组
      • 文件类型编辑器
        • Actions
        • 事件
        • 上下文菜单
        • 下拉菜单
        • 替换菜单
        • Info Tip
        • 平铺模式
    • 脚本
      • 重命名脚本
        • Custom Fields in the Rename Dialog
      • 脚本函数
      • 脚本加载项
        • 包括文件
        • 模块
        • 脚本包
        • 脚本安装器文件
      • Script Management
        • 创​​建新脚本
        • 脚本安装器
      • 脚本编辑器
        • 脚本资产**
        • 编辑器
          • 代码编辑器
          • 对话框编辑器
            • 对话框编辑器命令
            • Adding Dialog Controls
            • 尺寸和定位对话框控件
            • 使用布局命令
            • 对话框控件制表顺序
            • 对话框控制助记符
            • 语言覆盖
            • 对话框控件属性
              • 常见对话框属性
              • 对话框属性 若要编辑对话框的属性,请在任意控件外部单击对话框。适用于对话框的具体属性是:
              • 静态文本属性
              • 标记文本属性
              • 编辑控件属性
              • 按钮属性
              • 复选框属性
              • 单选按钮属性
              • 组合框属性
              • 列表框属性
              • 列表视图属性
              • 标签页控件属性
              • 组框属性
              • Palette Properties
          • 字符串编辑器
        • 片段
      • 脚本对话框
        • 创建脚本对话框
        • 对话消息循环
          • 简单对话框
          • 分离对话框
        • 读取对话框控件值
        • 与对话框控件交互
      • 资源
        • 字符串资源
      • 脚本日志
      • 示例脚本
        • 示例重命名脚本
        • 简单脚本函数
        • 添加新内部命令
        • 添加新列
        • 使用 Shell 属性添加新列
        • 拓展即时查找领域
        • 简单对话框和弹出菜单
        • 脚本对话框示例
        • 响应事件
    • 求值器
      • 求值器语法
      • 求值器变量
      • Applicable Contexts
        • 求值器列
        • 求值员组
        • 过滤器和查找
        • 文件信息提示和平铺
        • 按钮和功能
          • 求值器按钮标签
          • Colors
          • 求值器按钮图标
          • Tooltips
          • Dynamic State
          • Conditional Behavior
          • 函数中的求值子句
          • 求值插入代码
          • 求值器生成的命令行
        • 重命名
        • Generated File Names
        • 重命名控制键
        • 状态栏
        • 列上下文菜单
        • 标签上下文菜单
      • Examples
    • 参考
      • 通配符参考
        • 模式匹配语法
        • 正则表达式语法
      • 状态栏代码
        • 文件和文件夹计数代码
        • 磁盘空间代码
        • 音乐和视频时长代码
        • 图形元素代码
        • 其它代码
        • 条形图和百分比
        • 隐藏状态栏中的部分内容
        • 状态栏上的填充部分
      • 命令参考
        • 参数类型
        • 内部命令
          • CLI
          • Clipboard
          • Close
          • ContextMenu
          • Copy
          • CreateFolder
          • Delete
          • Favorites
          • FileType
          • Find
          • GetSizes
          • Go
          • Help
          • Image
          • Join
          • Marker
          • Play
          • Prefs
          • Print
          • Properties
          • Recent
          • Rename
          • Select
          • Set
          • SetAttr
          • Show
          • Split
          • Toolbar
          • Undo
        • 外部控制代码
          • 用于传递文件名代码
          • 有关路径的代码
          • 对话框显示代码
          • 日期和时间的代码
          • Codes for clipboard and variables
        • 命令修饰符参考
      • 脚本参考
        • 脚本对象
          • AboutData
          • ActivateListerData
          • ActivateTabData
          • AddCmdData
          • AddColData
          • AfterFolderChangeData
          • Alias
          • Aliases
          • Args
          • AudioCoverArt
          • AudioMeta
          • BeforeFolderChangeData
          • Blob
          • BusyIndicator
          • ClickData
          • ClipboardChangeData
          • CloseListerData
          • CloseTabData
          • Column
          • ColumnValue
          • Command
          • ConfigBackupData
          • ConfigRestoreData
          • Control
          • CustomFieldData
          • Date
          • Dialog
          • DialogListColumn
          • DialogListColumns
          • DialogListGroup
          • DialogListItem
          • DialogOption
          • DisplayModeChangeData
          • Dock
          • DocMeta
          • DOpus
          • DOpusFactory
          • DoubleClickData
          • DPI
          • Drive
          • ExeMeta
          • EverythingInterface
          • EverythingResult
          • Favorite
          • Favorites
          • File
          • FileAttr
          • FileGroup
          • FileOperationCompleteData
          • FileSize
          • FilesystemChangeData
          • FiletypeGroup
          • FiletypeGroups
          • Filter
          • FilterParseError
          • FlatViewChangeData
          • FolderEnum
          • FontMeta
          • Format
          • FSUtil
          • Func
          • GlobalFilters
          • GetCopyQueueNameData
          • GetCustomFieldData
          • GetNewNameData
          • HighlightedColumns
          • HTTPRequest
          • Image
          • ImageMeta
          • IncludeFileInitData
          • Item
          • Items
          • Lister
          • Listers
          • ListerResizeData
          • ListerUIChangeData
          • Map
          • Metadata
          • Msg
          • OpenListerData
          • OpenTabData
          • OrderedMap
          • OtherMeta
          • PairedFolder
          • Path
          • Progress
          • QuickFilter
          • Rect
          • Results
          • Script
          • ScriptColorPair
          • ScriptColumn
          • ScriptColumnData
          • ScriptCommand
          • ScriptCommandData
          • ScriptFAYTCommand
          • ScriptFAYTCommandData
          • ScriptConfig
          • ScriptConfigChangeData
          • ScriptInitData
          • ScriptStrings
          • ShellProperty
          • ShutdownData
          • Signature
          • SmartFavorite
          • SmartFavorites
          • SortOrder
          • SourceDestData
          • StartupData
          • StringSet
          • StringTools
          • StyleSelectedData
          • SysInfo
          • SystemSettingChangeData
          • Tab
          • TabClickData
          • TabGroup
          • TabGroups
          • TabGroupTabEntry
          • TabGroupTabList
          • TabStats
          • Toolbar
          • Toolbars
          • UnorderedSet
          • Var
          • Vars
          • Vector
          • Version
          • VideoMeta
          • Viewer
          • Viewers
          • ViewerEventData
          • Wild
          • WinVer
        • 脚本事件
          • OnAboutScript
          • OnActivateLister
          • OnActivateTab
          • OnAddColumns
          • OnAddCommands
          • OnAfterFolderChange
          • OnBeforeFolderChange
          • OnClick
          • OnClipboardChange
          • OnCloseLister
          • OnCloseTab
          • OnConfigBackup
          • OnConfigRestore
          • OnDisplayModeChange
          • OnDoubleClick
          • OnFilesystemChange
          • OnFileOperationComplete
          • OnFlatViewChange
          • OnGetCopyQueueName
          • OnGetCustomFields
          • OnGetNewName
          • OnInit
          • OnInitIncludeFile
          • OnListerResize
          • OnListerUIChange
          • OnOpenLister
          • OnOpenTab
          • OnScriptColumn
          • OnScriptCommand
          • OnScriptConfigChange
          • OnScriptFAYTCommand
          • OnShutdown
          • OnSourceDestChange
          • OnStartup
          • OnStyleSelected
          • OnSystemSettingChange
          • OnTabClick
          • OnViewerEvent
      • 求值器函数
        • AbortFunc
        • Abs
        • Age
        • Arg
        • As
        • Asc
        • Atan
        • Capitalize
        • Cbrt
        • Ceil
        • Chr
        • Cos
        • Clip
        • ClipFormat
        • Count
        • DateDiff
        • DatePart
        • DegToRad
        • DisplayName
        • Elapsed
        • Exists
        • FileCount
        • FileExt
        • FilePart
        • Floor
        • Format
        • Hypot
        • InStr
        • IsAlpha
        • IsChecked
        • IsDigit
        • IsDir
        • IsEnabled
        • IsFile
        • IsLower
        • IsParent
        • IsPath
        • IsPunct
        • IsSelected
        • IsSet
        • IsSpace
        • IsUpper
        • KeyDown
        • LanguageStr
        • LCase
        • Left
        • Len
        • MakeLegal
        • Match
        • Max
        • Mid
        • Min
        • Now
        • Output
        • Parent
        • PathType
        • Pow
        • RadToDeg
        • RegEx
        • RegExS
        • Replace
        • Resolve
        • Reverse
        • Right
        • Root
        • Rnd
        • Round
        • Running
        • Select
        • Sin
        • Space
        • Stem
        • StrCmp
        • String
        • Sqrt
        • Swap
        • SysInfo
        • Tan
        • Trim
        • Truncate
        • TypeOf
        • UCase
        • URLEncode
        • Val
      • DOpusRT 参考手册
        • 文件集合外部操作
        • 检索文件和文件夹信息
      • 元数据关键字
        • 列关键字
        • SetAttr META 的关键字
      • 文本过滤器
      • 图标集
        • 图标集 XML 定义文件
        • 图标大小
        • 图标名称
        • 图标显示名称
        • 图标类别
        • DPI aware Icon Sets
        • 本地化
        • 图标图像
      • 重命名宏语言
    • Directory Opus 13 的新功能有哪些?
      • Directory Opus 13 - 亮点
        • Highlights Page 1
        • Highlights Page 2
        • Highlights Page 3
        • Highlights Page 4
        • Highlights Page 5
        • Highlights Page 6
      • Directory Opus 13 - 详细变更列表
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细的发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发布说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发布说明
        • Directory Opus 13 - 详细的发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发布说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发布说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细版本说明
        • Directory Opus 13 - 详细版本说明
        • Directory Opus 13 - 详细发布说明
        • Directory Opus 13 - 发布说明详情
        • Directory Opus 13 - 详细版本说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发布说明
        • Directory Opus 13 - 发行说明详细
        • Directory Opus 13 - 详细的发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细的发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细版本说明
        • Directory Opus 13 - 详细的发行说明
        • Directory Opus 13 - 详细发行说明
        • Directory Opus 13 - 详细版本说明
      • Directory Opus 13 - 从 Opus 12 升级的提示
  • Manual
    • Copyrights
    • Licenses
      • End-user License Conditions
      • Volume License Conditions
    • Acknowledgements
    • Introduction
    • Basic Concepts
      • Starting Opus
      • The Lister
        • Opening a Lister
        • The Default Lister
        • Navigation
          • Home Folder
          • Up, Forward, Back
          • Folder Tree
          • Location Bar
            • Path Field
          • Drive Buttons and Dropdowns
          • Favorites
          • SmartFavorites
          • Recent and History Lists
          • Aliases
          • Paired Folders
        • Tabs
          • Tab Switcher
          • Locked Tabs
          • Linked Tabs
          • Tab Groups
        • View Modes
        • Dual Display
          • Navigation Lock
        • Toolbars
          • The Default Toolbars
            • Menu Toolbar
            • Operations Toolbar
            • Favorites Bar
            • File Display Toolbar
            • Images Toolbar
          • Dynamic Toolbars
          • Toolbar Sets
        • Find-as-you-type Field
        • Viewer Pane
        • Metadata Pane
        • Utility Panel
        • Layouts
        • Styles
        • Themes
          • Creating your own Themes
        • Status Bar
      • Explorer Replacement
      • Source and Destination
      • Selecting Files
        • Selecting with the mouse and keyboard
          • Single-click mode
          • Checkbox Mode
        • Simple Wildcard Selection
        • Advanced Selection
        • Selecting Cells
      • Searching and Filtering
        • Filter Bar
        • Show Everything
        • Toolbar Filter Fields
        • Quick Search
        • Find Files
          • Simple Find
          • Advanced Find
      • Sorting and Grouping
        • Manual Sorting
      • Folder Format
        • Folder Format Dialog
          • Columns
            • Frozen Columns
          • Sorting
          • Grouping
          • Display
          • Filters
        • Saved Folder Formats
        • Auto-remembered Formats
        • Content Types
        • Identifying the current format
        • Locking the Format
      • Expandable Folders
      • Flat View
      • Folder Sizes
      • Virtual File System
        • System virtual folders
        • File Collections
          • Stored Queries
        • Libraries
        • Archives
        • FTP
        • MTP
    • File Operations
      • Copying, Moving and Deleting Files
        • Copy and Paste
        • Drag and drop
        • Copying using the toolbar buttons
          • Using Wildcards when Copying
        • Copy Queues
          • Copy Overlays and Ghost Files
          • Unattended operation
        • The Jobs Bar
        • The Confirm File Replace Dialog
        • Copying Updated Files
          • Synchronize
        • Deleting Files
      • Renaming Files
        • Inline Rename
        • Simple Wildcard Rename
        • Advanced Rename
          • Rename Presets
          • Rename Modes
            • Standard Wildcard Rename
            • Find and Replace
            • Regular Expressions
            • Regular Expressions + Find and Replace
          • Rename Actions
            • Numbering Files
            • Rename Macros
          • Rename Options
          • Renaming with Metadata
          • Rename Scripts
      • Creating Folders
      • Creating Archives
        • Adding to Archives
        • Add to Archive Dialog
          • Zip Options
          • 7z Options
          • RAR Options
          • TAR BZip2 Options
          • TAR GZip Options
        • Zip Files
          • Zip Comment
          • Read-Only mode
          • Self-Extracting Zip Files
      • Tracking and Undoing File Operations
      • Changing Attributes
      • Labels and Status Icons
      • Editing Metadata
        • Document Properties
        • Picture Properties
        • Music Properties
          • Adding Cover Art
        • Video Properties
        • Extended Properties
        • Programmatic setting of Metadata
        • Time Shifting
      • File Descriptions
      • Filtered Operations
        • Filter Clauses
        • Adding, Removing and Editing Clauses
        • Filter Clause Types
        • Textual Filters
      • UAC and Administrator Mode
    • FTP
      • FTP Address Book
        • Default Settings
        • Site Page
        • Network Page
        • Display Page
        • Index Page
        • Sounds Page
        • Misc Page
        • Speed Page
        • Special Page
        • Transfer Page
        • Proxy Page
      • Adding a new Site
      • FTP Connect
      • Site Properties
      • FTP Log
      • FTP Paths
    • Additional Functionality
      • Viewing Images
        • Viewer Mouse, Keys and Toolbar
        • Image Marking
        • Lister-Linked Viewers
      • Playing Sounds
      • Image Conversion
        • Automated image conversion tasks
      • Print Folder
      • Duplicate File Finder
      • Splitting Files
      • Joining Files
      • Making Links and Junctions
      • Floating Toolbars
        • Controlling Floating Toolbars
      • System-wide Hotkeys
      • Exporting to USB
      • Integration with Everything
      • Erase Empty Space
      • File Type Summary
      • Update Checker
      • CLI
      • Crash Logs
    • Preferences
      • Backing up and Restoring Preferences
      • Preferences Categories
        • Colors And Fonts
          • Dark Mode
          • Themes
          • Color Blending
          • Directory Opus Colors
          • Windows Colors
          • Images
          • Fonts
        • File Displays
          • Folder Expansion
          • Mouse
            • Background Events
          • Navigation
          • Options
            • Info Tips
            • Tab Key
          • Status Bar
          • Title Bar
        • File Display Columns
          • Appearance
          • Evaluator Columns
          • Evaluator Groups
          • Filenames
          • Icons
          • Options
          • Shell Properties
        • File Display Modes
          • Details
          • Power Mode
            • Appearance
            • Buttons
          • Thumbnails
            • Folders
            • Performance
            • Styles
          • Tiles Mode
        • File Operations
          • Copying Files
            • Attributes
            • Confirmation
            • Metadata
            • Security
          • Deleting Files
          • Double-click Files
            • FTP
          • Logging
          • Metadata
            • Metadata Editor
            • Music Genres
          • Options
          • Progress Indicators
            • Counting Files
            • Jobs Bar
          • Renaming Files
            • Control Keys
        • Filtering And Sorting
          • Filters
          • Filter Bar
          • Find-As-You-Type
            • Filter Mode
            • Find Mode
            • Folders Mode
          • Global Filters
          • Quick Keys
          • Sorting
        • Folders
          • Automatic Reading
          • Folder Formats
            • Automatic Formats
          • Folder Images
          • Folder Sizes
            • Junctions And Links
          • Network Servers
          • Special Folders
          • Virtual Folders
            • Desktop
            • File System
            • This PC
        • Folder Tabs
          • Dimensions
          • Edge Colors
          • Folder Tab Bar
          • Groups
          • Locking
          • Options
        • Folder Tree
          • Appearance
          • Contents
          • Expand / Collapse
            • Pins
          • Options
          • Selection Events
        • Frequently Used Paths
          • Favorites List
          • Folder Aliases
          • Home Folder
          • Paired Folders
          • Recent List
          • SmartFavorites
        • Internet
          • Email
          • Updates
        • Labels
          • Label Definitions
          • Label Assignments
            • In Specific Folders
          • Options
        • Launching Opus
          • Explorer Replacement
          • From the Desktop
          • From the Taskbar Icon
          • From the Win + E hotkey
          • Startup
        • Layouts and Styles
          • Default Lister
          • Layouts
          • Styles
        • Location Bar
          • Options
          • Path Fields
            • Appearance
            • Menus
            • Path Completion
          • Toolbars
        • Miscellaneous
          • Advanced
          • External Tools
          • Privacy
          • Shell Extensions
          • Sounds
          • Windows Integration
            • Jump List
          • Windows Startup Delay
        • Toolbars
          • Appearance
          • Folder Toolbars
          • Icons
          • Options
          • Sets
          • View Mode Toolbars
        • User Interface
          • Language
          • Spacing
          • Transition Animations
        • Viewer
          • Standalone Viewer
            • Options
            • Size And Position
            • Mouse Buttons
            • Marked Pictures
            • Slideshow
          • Viewer Pane
          • Viewer Plugins
        • Zip and Other Archives
          • Archive and VFS Plugins
          • Archive Options
          • Context Menu
          • Zip Files
    • Customize
      • The Customize Dialog
        • Toolbars
        • Context Menus
        • Keys
        • Commands
        • User Commands
        • Default Toolbars
      • Creating your own buttons
        • Editing the Toolbar
          • Launch Options
          • Toolbar Context Menus
          • Multiple Function Buttons
          • Drop-down Buttons and Menus
          • Dynamic Buttons
            • Drive Buttons Configuration
          • Field Buttons
            • Path Field Configuration
            • Filter Field Configuration
            • Drives Dropdown Configuration
          • Sharing functions with others
        • Command Editor
          • Simple Command Editor
          • Advanced Command Editor
          • Using the Hotkey Control
        • User-defined commands
        • Synchronous and Asynchronous functions
        • Internal Command Arguments
        • Passing files to external programs
        • Command modifiers
        • MS-DOS Batch commands
        • WSL Commands
        • Embedding Rename Scripts
        • DDE Functions
        • Embedded functions
    • File Types
      • Directory Opus File Types
      • File Type Groups
      • Filetype Editor
        • Actions
        • Events
        • Context Menu
        • Drop Menu
        • Replace Menu
        • Info Tip
        • Tiles Mode
    • Scripting
      • Rename Scripts
        • Custom Fields in the Rename Dialog
      • Script Functions
      • Script Add-ins
        • Include Files
        • Modules
        • Script Package
        • Script Installer Files
      • Script Management
        • Create New Script
        • Script Installer
      • Script Editor
        • Script Assets
        • Editors
          • Code Editor
          • Dialog Editor
            • Dialog Editor Commands
            • Adding Dialog Controls
            • Sizing and Positioning Dialog Controls
            • Using the Layout Commands
            • Dialog Control Tab Order
            • Dialog Control Mnemonics
            • Language Overlays
            • Dialog Control Properties
              • Common Dialog Properties
              • Dialog Properties
              • Static Text Properties
              • Markup Text Properties
              • Edit Control Properties
              • Button Properties
              • Check Box Properties
              • Radio Button Properties
              • Combo Box Properties
              • List Box Properties
              • List View Properties
              • Tab Control Properties
              • Group Box Properties
              • Palette Properties
          • String Editor
        • Snippets
      • Script Dialogs
        • Creating Script Dialogs
        • The Dialog Message Loop
          • Simple Dialogs
          • Detached Dialogs
        • Reading Dialog Control Values
        • Interacting with Dialog Controls
      • Resources
        • String Resources
      • Script Log
      • Example Scripts
        • Example Rename Script
        • Simple Script Function
        • Adding a new Internal Command
        • Adding a new Column
        • Adding a new Column from Shell Properties
        • Extending the FAYT Field
        • Simple Dialogs and Popup Menus
        • Script Dialog Example
        • Responding to Events
    • Evaluator
      • Grammar
      • Variables
      • Applicable Contexts
        • Evaluator Columns
        • Evaluator Groups
        • Filters and Find
        • Info Tips and Tiles
        • Buttons and Functions
          • Labels
          • Colors
          • Icons
          • Tooltips
          • Dynamic State
          • Conditional Behavior
          • Evaluation Clauses
          • Insertion Code
          • Command Lines
        • Rename
        • Generated File Names
        • Rename Control Keys
        • Status Bar
        • Column Context Menus
        • Tab Context Menus
      • Examples
    • Reference
      • Wildcard Reference
        • Pattern Matching Syntax
        • Regular Expression Syntax
      • Status Bar Codes
        • Codes for file and folder counts
        • Codes for disk space
        • Codes for music and video duration
        • Codes for graphical elements
        • Other Codes
        • Bar graphs and Percentages
        • Hiding sections on the status bar
        • Padding sections on the status bar
      • Command Reference
        • Argument Types
        • Internal Commands
          • CLI
          • Clipboard
          • Close
          • ContextMenu
          • Copy
          • CreateFolder
          • Delete
          • Favorites
          • FileType
          • Find
          • GetSizes
          • Go
          • Help
          • Image
          • Join
          • Marker
          • Play
          • Prefs
          • Print
          • Properties
          • Recent
          • Rename
          • Select
          • Set
          • SetAttr
          • Show
          • Split
          • Toolbar
          • Undo
        • External control codes
          • Codes for passing filenames
          • Codes for passing paths
          • Codes to display dialogs
          • Codes for date and time
          • Codes for clipboard and variables
        • Command modifier reference
      • Scripting Reference
        • Scripting Objects
          • AboutData
          • ActivateListerData
          • ActivateTabData
          • AddCmdData
          • AddColData
          • AfterFolderChangeData
          • Alias
          • Aliases
          • Args
          • AudioCoverArt
          • AudioMeta
          • BeforeFolderChangeData
          • Blob
          • BusyIndicator
          • ClickData
          • ClipboardChangeData
          • CloseListerData
          • CloseTabData
          • Column
          • ColumnValue
          • Command
          • ConfigBackupData
          • ConfigRestoreData
          • Control
          • CustomFieldData
          • Date
          • Dialog
          • DialogListColumn
          • DialogListColumns
          • DialogListGroup
          • DialogListItem
          • DialogOption
          • DisplayModeChangeData
          • Dock
          • DocMeta
          • DOpus
          • DOpusFactory
          • DoubleClickData
          • DPI
          • Drive
          • ExeMeta
          • EverythingInterface
          • EverythingResult
          • Favorite
          • Favorites
          • File
          • FileAttr
          • FileGroup
          • FileOperationCompleteData
          • FileSize
          • FilesystemChangeData
          • FiletypeGroup
          • FiletypeGroups
          • Filter
          • FilterParseError
          • FlatViewChangeData
          • FolderEnum
          • FontMeta
          • Format
          • FSUtil
          • Func
          • GlobalFilters
          • GetCopyQueueNameData
          • GetCustomFieldData
          • GetNewNameData
          • HighlightedColumns
          • HTTPRequest
          • Image
          • ImageMeta
          • IncludeFileInitData
          • Item
          • Items
          • Lister
          • Listers
          • ListerResizeData
          • ListerUIChangeData
          • Map
          • Metadata
          • Msg
          • OpenListerData
          • OpenTabData
          • OrderedMap
          • OtherMeta
          • PairedFolder
          • Path
          • Progress
          • QuickFilter
          • Rect
          • Results
          • Script
          • ScriptColorPair
          • ScriptColumn
          • ScriptColumnData
          • ScriptCommand
          • ScriptCommandData
          • ScriptFAYTCommand
          • ScriptFAYTCommandData
          • ScriptConfig
          • ScriptConfigChangeData
          • ScriptInitData
          • ScriptStrings
          • ShellProperty
          • ShutdownData
          • Signature
          • SmartFavorite
          • SmartFavorites
          • SortOrder
          • SourceDestData
          • StartupData
          • StringSet
          • StringTools
          • StyleSelectedData
          • SysInfo
          • SystemSettingChangeData
          • Tab
          • TabClickData
          • TabGroup
          • TabGroups
          • TabGroupTabEntry
          • TabGroupTabList
          • TabStats
          • Toolbar
          • Toolbars
          • UnorderedSet
          • Var
          • Vars
          • Vector
          • Version
          • VideoMeta
          • Viewer
          • Viewers
          • ViewerEventData
          • Wild
          • WinVer
        • Scripting Events
          • OnAboutScript
          • OnActivateLister
          • OnActivateTab
          • OnAddColumns
          • OnAddCommands
          • OnAfterFolderChange
          • OnBeforeFolderChange
          • OnClick
          • OnClipboardChange
          • OnCloseLister
          • OnCloseTab
          • OnConfigBackup
          • OnConfigRestore
          • OnDisplayModeChange
          • OnDoubleClick
          • OnFilesystemChange
          • OnFileOperationComplete
          • OnFlatViewChange
          • OnGetCopyQueueName
          • OnGetCustomFields
          • OnGetNewName
          • OnInit
          • OnInitIncludeFile
          • OnListerResize
          • OnListerUIChange
          • OnOpenLister
          • OnOpenTab
          • OnScriptColumn
          • OnScriptCommand
          • OnScriptConfigChange
          • OnScriptFAYTCommand
          • OnShutdown
          • OnSourceDestChange
          • OnStartup
          • OnStyleSelected
          • OnSystemSettingChange
          • OnTabClick
          • OnViewerEvent
      • Evaluator Functions
        • AbortFunc
        • Abs
        • Age
        • Arg
        • As
        • Asc
        • Atan
        • Capitalize
        • Cbrt
        • Ceil
        • Chr
        • Cos
        • Clip
        • ClipFormat
        • Count
        • DateDiff
        • DatePart
        • DegToRad
        • DisplayName
        • Elapsed
        • Exists
        • FileCount
        • FileExt
        • FilePart
        • Floor
        • Format
        • Hypot
        • InStr
        • IsAlpha
        • IsChecked
        • IsDigit
        • IsDir
        • IsEnabled
        • IsFile
        • IsLower
        • IsParent
        • IsPath
        • IsPunct
        • IsSelected
        • IsSet
        • IsSpace
        • IsUpper
        • KeyDown
        • LanguageStr
        • LCase
        • Left
        • Len
        • MakeLegal
        • Match
        • Max
        • Mid
        • Min
        • Now
        • Output
        • Parent
        • PathType
        • Pow
        • RadToDeg
        • RegEx
        • RegExS
        • Replace
        • Resolve
        • Reverse
        • Right
        • Root
        • Rnd
        • Round
        • Running
        • Select
        • Sin
        • Space
        • Stem
        • StrCmp
        • String
        • Sqrt
        • Swap
        • SysInfo
        • Tan
        • Trim
        • Truncate
        • TypeOf
        • UCase
        • URLEncode
        • Val
      • DOpusRT Reference
        • External Manipulation of File Collections
        • Retrieving File and Folder Information
      • Metadata Keywords
        • Keywords for Columns
        • Keywords for SetAttr META
      • Textual Filters
      • Icon Sets
        • Icon Set XML Definition File
        • Icon Sizes
        • Icon Names
        • Icon Display Names
        • Icon Categories
        • DPI aware Icon Sets
        • Localization
        • Icon Images
      • Rename Macro Language
    • New In Directory Opus 13
      • Directory Opus 13 (Highlights)
        • Highlights Page 1
        • Highlights Page 2
        • Highlights Page 3
        • Highlights Page 4
        • Highlights Page 5
        • Highlights Page 6
      • Directory Opus 13 (Detailed)
        • Dark Mode & Cosmetics
        • File Copying
        • Everything (indexed search)
        • Evaluator
        • Lister Defaults
        • Folder Tree
        • File Display
        • Thumbnails
        • Folder Tabs
        • Location Bar
        • Filter Bar
        • Find As You Type (FAYT)
        • Search Field
        • Find Files
        • Duplicate Files Finder
        • Synchronize
        • Other Utility Panels
        • Metadata
        • Columns
        • Folder Sizes
        • Status Bar
        • Rename
        • Viewer
        • Image Converter
        • File & Folder Labels
        • Folder Aliases
        • Folder Formats
        • Preferences
        • Customize
        • Default Toolbars & Menus
        • Script IDE
        • File Types
        • Set Attributes
        • Print / Export Folder Listing
        • Split / Join
        • Archives
        • Cloud Storage
        • User Interface Spacing
        • Virtual Desktops
        • Shell Extensions
        • Miscellaneous Features
        • Miscellaneous Fixes & Workarounds
        • Miscellaneous Commands
        • Miscellaneous Scripting
        • Removed Functionality
      • Tips for Upgrading from Opus 12
由 GitBook 提供支持
在本页
在GitHub上编辑
  1. Manual
  2. Reference
  3. Scripting Reference
  4. Scripting Objects

Dialog

上一页Date下一页DialogListColumn

最后更新于9个月前

The Dialog object allows you to display dialogs that prompt the user for confirmation, allow them to input text strings or passwords, and select checkbox options or choose from a drop-down list. You can also use this object to display a popup menu on screen.

You can create a Dialog object from the .Dlg, .Dlg, .Dlg, .Dlg and .Dlg methods.

See the section for an example of its use.

There are two different ways to use the Dialog object. You can either:

  • Use the one-shot methods (Folder, GetString, Multi, Open, Request or Save) to display a simple dialog of various types, or

  • Configure the dialog first by setting the values of the various properties, and then call the Show function to display it. This method also lets you create and use .

The one-shot methods accept several parameters but are generally not as flexible as building up the dialog and then calling Show.

Property Name
Return Type
Description

buttons

string

Specifies the buttons that are displayed at the bottom of the dialog. These buttons are used to close the dialog. The Show method returns a value indicating which button was chosen (and this value is also available in the result property).

Multiple button strings must be separated with vertical bar characters (|). If a button has more than one button then by definition the last one is the "cancel" button. For example:

To specify accelerators for the buttons prefix the desired key with an ampersand (&) character. For example:

Buttons can also have drop-down menus attached to them, by separating the drop-down items with plus signs (+). For example:

Within drop-down menus, you can specify that certain menu items can be accessed directly from the main button by holding Shift, Ctrl or Shift+Ctrl. This is done by adding an equals sign and then the label the button should display when the key is held down (usually an abbreviated version of the menu item label, or a repetition of the label itself if it is already short enough). The keys are automatically assigned and you can only do this for at most three items. For example:

<WRAP prewrap>

</WRAP>

choices

  • Drop-down list: By default, the dialog will display a drop-down list allowing the user to select one option. The index of the chosen selection is available via the selection property when the Show method returns.

  • Checkbox list: If the list property is also given the dialog will display a scrolling list of items, each with a checkbox allowing it to be turned on or off.

  • Popup menu: If the menu property is also given, a popup menu will be displayed at the current mouse coordinates. Use a single hyphen ("-") as a menu label to insert a separator.

When shown as a checkbox list the dialog is resizable; you can set the initial size using the cx and cy properties (and retrieve them afterwards if you want to save the size).

confirm

bool

In a text entry dialog (i.e. the max property has been specified) setting confirm to True will require that the user types the entered text again (in a second text field) to confirm it (e.g. for a password).

cx

int

cy

int

defvalue

string

In a text entry dialog (i.e. the max property has been specified) this property allows you to initialize the text field with a default value.

(Old scripts may use "default" instead of "defvalue"; this is deprecated because it does not work in JScript where "default" is a reserved keyword.)

defid

int

Allows you to change the default button (i.e. the action that will occur if the user hits enter) in the dialog. Normally the first button is the default - this has a defid of 1. The second button would have a defid of 2, and so on. If a dialog has more than one button then by definition the very last button is the "cancel" button, and this has a defid of 0.

detach

bool

disable_window

Use this to cause the dialog to automatically disable another window when it's displayed. The user will be unable to click or type in the disabled window until the dialog is closed. Normally if you use this you would set this to the same value as the window property.

icon

Displays one of several standard icons in the top-left corner of the dialog, which can be used, for example, to indicate the severity of an error condition. The valid values for this property are warning, error, info and question.

input

string

In a text entry dialog, this property returns the text string that the user entered (i.e. once the Show method has returned).

language

string

list

In conjunction with the choices property, this will cause the choices to be presented as a checkbox list. You can initialize this Vector or array with the same number of items as the choices property, and set each one to True or False to control the default state of each checkbox. Or, simply set this value to** 0** to activate the checkbox list without having to initialize the state of each checkbox.

max

int

This property enables text entry in the dialog - a text field will be displayed allowing the user to enter a string. Set this property to the maximum length of the string you want the user to be able to enter (or 0 to have no limit).

When the Show method returns the text the user entered will be available in the input property.

menu

In conjunction with the choices property, this will cause the choices to be presented as a popup menu rather than in a dialog. The menu will be displayed at the current mouse coordinates.

You can initialize this Vector or array with the same number of items as the choices property, and set each one to a value representing various flags that control the appearance of the menu item. The available flags are as follows - their values must be added together if you need to specify more than one flag per item.

You can also simply set this value to 0 or 1 to activate the popup menu without having to provide flags for each item (if set to 1, the top item in the menu will appear bolded).

The Show method returns the index of the menu item the user chose (with 1 being the first item), or 0 if the menu was cancelled.

1

bold (indicates the default item)

2

checked (a checkmark will appear next to the item)

4

radio (a radio button will appear next to the item)

8

disabled (the user will not be able to select the item)

message

string

Specifies the message text displayed in the dialog.

msgonly

bool

Set to True before creating the dialog to create a message-only dialog. A message-only dialog will never be visible, but still runs a normal message loop. This lets you use things like WatchTab or HTTPRequest without needing a visible dialog (or resorting to opacity tricks). No dialog template is needed when using this mode. Note that only detached dialogs support this option.

opacity

int

options

This is a collection of five options that will be displayed as checkboxes in the dialog. Unlike the choices / list scrolling checkbox list, these options are displayed as physical checkbox controls. By default the five checkboxes are uninitialized and won't be displayed, but if you assign a label to any of them they will be shown to the user.

password

bool

In a text entry dialog, set this property to True to make the text entry field a password field. In a password field the characters the user enters are not displayed.

position

string

Except when set to "center" the x and y properties can be used to adjust the dialog's position.

center

center the dialog over the parent window (the default)

absolute

specify an absolute position using the x and y properties

parent

position relative to the parent window (using x and y)

monitor

position relative to the current monitor (using x and y)

position_fix

bool

By default, Opus checks the size and position of your dialog just before it opens and fixing them if they would place any of the dialog off-screen. Positioning a dialog off-screen is usually an accident caused by saving window positions on one system and restoring them on another with different monitor resolutions or arrangements. In the rare cases where you want your dialog to open off-screen, where the user cannot see some of all of it, set this property to False.

result

int

This property returns the index of the button chosen by the user to close the dialog. The left-most button is index 1, the next button is index 2, and so on. If a dialog has more than one button then by definition the last (right-most) button is the "cancel" button and so this will return index 0.

If any buttons have associated drop-down menus then the contents of the menus also contribute to the index value. For example, if button index 2 has an additional item in a drop-down menu, then that item would be index 3, and the next button would be index 4.

select

bool

In a text entry dialog, set this property to True to automatically select the contents of the input field (as specified by the defvalue property) when the dialog opens.

selection

int

In a drop-down list dialog (one with the choices property set without either list or menu), this property returns the index of the item chosen from the drop-down list after the Show method returns.

singleton

string

If you only want one instance of your dialog to be open at once, set this property to a unique name before creating the dialog. When the dialog is created, Opus will check if another dialog with same singleton name is already open. If it is, the existing dialog will be brought to the front and your script will receive a False return from the Create or Show methods. You should check for this an exit your script in that case.

sort

bool

Set this property to True if the list of choices given by the choices property should be sorted alphabetically.

state

string

Returns a string indicating the current state of the dialog. Possible values are "visible" (normal state, open and visible), "hidden" (dialog has been hidden), "min" (dialog is minimized), "max" (dialog is visible and maximized).

template

string

title

string

Specifies the title text of the dialog.

top

bool

Set this property to True to make the dialog "top level", or False to allow it to go behind other non-top level windows.

want_close

bool

Set this property to True if you want the script dialog to generate close events in your message loop when the user clicks the window close button. You'll need to close the dialog yourself using the EndDlg method.

want_resize

bool

Set this property to True if you want the script dialog to generate resize events in your message loop when the user resizes the dialog.

window

x

int

y

int

Method Name

Arguments

Return Type

Description

AddCustomMsg

<string:name> [<bool:force>]

bool

Lets a script dialog register one or more custom messages that can then be sent to it from other scripts.

Messages are registered by name. If a message is already registered the method will fail unless you set the optional force parameter to true.

AddHotkey

<string:name> <string:key>

bool

Creates a hotkey (or keyboard accelerator) for the specified key combination. When the user presses this key combination in your dialog, a hotkey event will be triggered.

The name parameter is a name you assign that lets you identify the hotkey. The key parameter specified the actual key combination; this can optionally combine the qualifiers ctrl, shift and alt with a character or name of a special key. For example, ctrl+t or alt+shift+F7.

This method returns true if successful, or false on failure (e.g. if the hotkey already exists).

AutoSize

none

none

If a dialog has auto-sizing controls that depend on the sizes of other controls, and you make changes to their sizes at runtime, you can call this method to force the dialog to recalculate all relative control sizes once you've made the required changes.

CancelWatchClipboard

none

none

Cancels monitoring of the system clipboard for changes previously established by a call to the WatchClipboard method.

CancelWatchDir

<string:id>

none

Cancels folder or file change monitoring previously established by a call to the WatchDir method. The id parameter is the ID you assigned to your watcher when it was created.

Create

none

none

Once the dialog has been created and its controls initialized, you should call Show or RunDlg to make it visible to the user. It will also go visible at the first GetMsg call if it hasn't already been shown.

CreateFont

<string:name> [<int:size>] [<string:styles>]

int

Creates a font object that can be given to dialog controls to make them use a non-standard font. The name parameter specifies the name of the font (e.g. "Arial") - you can also use "*" which means the default dialog font. The size parameter specifies the desired point size (use 0 to get the default dialog font size). The styles string can consist of one or more characters indicating the desired font style - "b" for bold, "i" for italic, "u" for underline.

Fonts you create are automatically destroyed when the dialog closes but if you want to delete them manually to free up resources, use the DestroyFont method.

Control

<string:name> [<string:dialog>] [<string:tab>]

The optional second and third parameters are only used when the control is in a tab control (that is, when it's in a dialog that's a child of another dialog). The dialog parameter specifies the name of its parent dialog. The tab parameter specifies the name of the tab control hosting the child dialog. You would only need to specify the name of the tab if you have multiple tab controls and the same dialog is hosted inside more than one of them (this would be quite a rare occurrence).

Note that none of the controls will exist until Create has been called.

DelHotkey

<string:name>

bool

Deletes a hotkey you previously created with the AddHotkey method.

This method returns true if successful, or false on failure (e.g. if the hotkey does not exist).

Drag

string

Allows the user to drag and drop one or more files from your dialog (and drop them in another window or application).

You would usually call this in response to a drag event you receive from a static or list view control.

The optional second parameter lets you control which actions are available. This should be a string containing one or more of copy, move, link. The default action can be indicated by prefixing it with a * (e.g. copy,*move,link). If you don't specify this parameter the default is to only allow copy.

The string this method returns indicates the result of the drag. For a left button drag, this will be "copy", "move", "link" or "drop". For a right-button drag it will always be "drop". If the drag is cancelled it will return "cancel".

DestroyFont

<int:id>

none

Destroys the specified font using the ID that was returned by the CreateFont method.

EndDlg

<int:result>

none

Folder

<string:title> <string:default> <bool:expand> <object:window>

Displays a "Browse for Folder" dialog letting the user select a folder. The optional parameters are:

  • title - specify title of the dialog

  • default - specify the default path selected in the dialog

  • expand - specify True to automatically expand the initial path

FlushMsg

none

int

Flushes the dialog's message queue. Any unretrieved messages will be discarded. The return value tells you how many messages were in the queue.

GetMsg

none

If the dialog is not already visible (because Show has not been called) then it will become visible when you first call GetMsg.

GetString

<string:message> <string:default> <string:max> <string:buttons> <string:title> <object:window> <byref string:result>

string

Displays a text entry dialog allowing the user to enter a string. The optional parameters are:

  • message - specify message string in the dialog

  • default - specify default string value

  • max - specify maximum string length

  • buttons - specify button labels (in the same format as the buttons property described above)

  • title - specify dialog window title

  • result - for scripting languages that support ByRef parameters, this can specify a variable to receive the string the user enters.

The return value is the entered string, or an empty value if the dialog was cancelled. The index of the button selected by the user will be available via the result property once this method returns. The left-most button is index 1, the next button is index 2, and so on. If a dialog has more than one button then by definition the last (right-most) button is the "cancel" button and so this will return index 0.

KillTimer

<string:name>

none

Stops the specified timer. The timer must previously have been created by a call to the SetTimer method.

LoadPosition

<string:id> <string:type>

none

The id string is a string that Opus can use to identify your dialog or the script it comes from. The template name of the dialog will be automatically appended to this. For example, you might specify id as "kundal" - Opus would then internally save the position of a dialog called "dialog1" as "kundal!dialog1". Make sure you pick a string that other script authors are unlikely to use as Opus has no other way of telling the saved positions apart.

The optional type parameter lets you control which position elements are restored - specify "pos" to only restore the position, "size" to only restore the size, or "pos,size" to restore both (this is also the default, so you can also omit the argument all together).

Multi

<string:title> <string:default> <object:window> <string:type>

Displays a "Browse to Open File" dialog that lets the user select one or more files. The optional parameters are:

  • title - specify title of the dialog

  • default - specify the default file selected in the dialog (if a folder is specified this specifies the default location but no file will be selected)

  • type - A list of filetypes to populate the "Save as Type" dropdown in the save dialog. (See below.)

The optional type parameter consists of one or more pairs of strings, separated by exclamation marks (!). The first string of each pair is the plain text string shown in the drop-down, and the second string of each pair is the actual file extension. You can also specify multiple extensions for the one type by separating them with semicolon. If you want the default "All files" item to be added to the list, add a # character at the start of the string. For example, #Text Files!*.txt!Doc Files!*.doc.

NewHTTPReq

none

Events from HTTP requests will come through your dialog's message loop, so you must use a detached dialog in order to use this functionality.

NotifyIcon

<string:method> arguments...

none

Allows a script to add an icon to the system taskbar notification area.

The method argument specifies one of four actions, each of which has its own set of arguments.

The tooltip argument provides a tooltip string that the system will display when the user moves the mouse over the icon. If the dialog's title property has been set then the title will be used if no explicit tooltip is given.

The icon is automatically removed when your dialog closes. It's also restored automatically if Explorer restarts after the icon has been added.

Please note that only one icon per dialog is supported.

method

Arguments

Description

add

<icon>, <tooltip>

Add icon to the toolbar.

update

<icon>, <tooltip>

Updates icon or tooltip.

remove

none

Removes the icon.

notify

<title>, <message>, <flags>

Displays a system notification message (or bubble tooltip in Windows 7).

Open

<string:title> <string:default> <object:window> <string:type>

Displays a "Browse to Open File" dialog that lets the user select a single file. The optional parameters are:

  • title - specify title of the dialog

  • default - specify the default file selected in the dialog (if a folder is specified this specifies the default location but no file will be selected)

  • type - A list of filetypes to populate the "Save as Type" dropdown in the save dialog. (See below.)

The optional type parameter consists of one or more pairs of strings, separated by exclamation marks (!). The first string of each pair is the plain text string shown in the drop-down, and the second string of each pair is the actual file extension. You can also specify multiple extensions for the one type by separating them with semicolon. If you want the default "All files" item to be added to the list, add a # character at the start of the string. For example, #Text Files!*.txt!Doc Files!*.doc.

Request

<string:message> <string:buttons> <string:title> <object:window>

int

Displays a dialog with one or more buttons. The optional parameters are:

  • message - specify message string in the dialog

  • buttons - specify button labels (in the same format as the buttons property described above)

  • title - specify dialog window title

The return value is the index of the button selected by the user, and this is also available in the result property once the method returns. The left-most button is index 1, the next button is index 2, and so on. If a dialog has more than one button then by definition the last (right-most) button is the "cancel" button and so this will return index 0.

RunDlg

none

int

The return value is the same as the object's result property, and represents the index of the close button selected by the user.

If the dialog is not already visible (because neither Show nor GetMsg were called) then it will become visible when you call RunDlg. (Compatibility note: Prior to Opus 12.22, scripts needed to call Show explicitly.)

Save

<string:title> <string:default> <object:window> <string:type>

Displays a "Browse to Save File" dialog that lets the user select a single file or enter a new filename to save. The optional parameters are:

  • title - The dialog's title.

  • default - The default file selected in the dialog. (If a folder is given, it sets the dialog's starting location, but no file will be selected.)

  • type - A list of filetypes to populate the "Save as Type" dropdown in the save dialog. (See below.)

The optional type parameter consists of one or more pairs of strings, separated by exclamation marks (!). The first string of each pair is the plain text string shown in the drop-down, and the second string of each pair is the actual file extension. You can also specify multiple extensions for the one type by separating them with semicolon. If you want the default "All files" item to be added to the list, add a # character at the start of the string. For example, #Text Files!*.txt!Doc Files!*.doc.

SavePosition

<string:id>

none

Saves the position (and size) of the dialog to your Opus configuration. The position can then be restored later on by a call to LoadPosition.

Normally you would call LoadPosition before displaying your dialog, and SavePosition after the dialog has been closed.

The id string is a string that Opus can use to identify your dialog or the script it comes from. The template name of the dialog will be automatically appended to this. For example, you might specify id as "kundal" - Opus would then internally save the position of a dialog called "dialog1" as "kundal!dialog1". Make sure you pick a string that other script authors are unlikely to use as Opus has no other way of telling the saved positions apart.

SetTimer

<int:period> <string:name>

string

Creates a timer that will generate a periodic timer event for your script. The period must be specified in milliseconds (e.g. 1000 would equal one second).

You can optionally specify a name for the timer - if you don't provide a name, one will be generated automatically (and the name of the new timer will be returned).

Show

none

int

Displays the dialog that has been pre-configured using the various properties of this object. See the properties section above for a full description of these.

If the detach property is False, the call will not return until the dialog has been closed. The return value is the index of the button selected by the user, and this is also available in the result property once the method returns. The left-most button is index 1, the next button is index 2, and so on. If a dialog has more than one button then by definition the last (right-most) button is the "cancel" button and so this will return index 0.

If the detach property is True, the call will return immediately and the return value is meaningless. You should then either run a message loop for the “detached” dialog, or call RunDlg to run the standard loop.

Note that calling Create implicitly sets the detach property to True. If you need to create the dialog to modify some of its controls before it is displayed, but do not want to run your own message loop once it is displayed, you should call RunDlg rather than Show.

SetTaskbarGroup

<string:group>

bool

Used to change how custom dialogs are grouped with other Opus windows on the taskbar. Specify a group name to move the window into an alternative group, or omit the group argument to reset back to the default group. If one or more windows are moved into the same group, they will be grouped together, separate from other the default group.

This only works on Windows 7 and above, and only when taskbar grouping is enabled. Group names are limited to 103 characters and will be truncated if longer. Spaces and dots in group names are automatically converted to underscores.

Only works with custom script dialogs (i.e. when you are using the template property). Must be called after the dialog has been created (i.e. after Show has been called -- see the RunDlg method if you want to avoid writing your own message loop just for this). Returns true on success.

Vars

<string:id>

The id string is a string that Opus can use to identify your dialog or the script it comes from. The template name of the dialog will be automatically appended to this. For example, you might specify id as "kundal" - Opus would then internally save these variables for a dialog called "dialog1" as "kundal!dialog1". Make sure you pick a string that other script authors are unlikely to use as Opus has no other way of telling the saved variables apart.

WatchClipboard

none

bool

Establish monitoring of the system clipboard. Whenever the system clipboard contents change, the dialog's message loop receives a clipboard event.

Use the CancelWatchClipboard method to cancel monitoring.

WatchDir

<string:id> <string:path> <string:flags>

int

Establish monitoring of a folder or file for changes. Returns 0 for success or an error code on failure.

The id argument lets you provide an ID for this watcher that's used to identify it when changes occur. dir is the full path to a filesystem folder, or a file if the i flag is set.

The optional flags are:

Use the CancelWatchDir method to cancel monitoring.

f

monitor for file change in folder (e.g. file created)

d

monitor for directory change in folder (e.g. directory created)

r

recursive - monitor sub-folders

a

monitor for file attribute changes

s

monitor for file size changes

w

monitor for last write time changes

i

monitor a single file rather than a folder

WatchTab

bool

These are the events you can watch for. Note that some are equivalent to the existing script events (e.g. OnActivateTab):

Once notification has been established you will be notified of all requested events when they occur. Note that no specific information is sent with notifications - e.g. for the "change" event, you aren't told which items have changed, only that something has.

You can change the events you're monitoring for by calling the WatchTab method again with the same tab and new event list.

To stop monitoring an existing tab, call WatchTab with the second parameter set to stop. Monitoring is automatically cancelled if your dialog closes (and also if the tab closes).

select

items in the tab are selected or deselected

navigate

the folder is changed in the tab

add

items are added to the folder

delete

items are deleted from the folder

change

items in the folder are changed (size, date, name, etc)

activate

tab activated or deactivated

srcdst

source/destination state changed

view

view mode changed

flat

flat view state changed

filter

quick filter changed

WindowCmd

<string:command>

none

Sends a command to the dialog window to change how it's displayed. Possible commands are:

min

minimize the window

max

maximize the window

restore

restore the window (from minimize/maximize)

show

show the window if it's currently hidden

showna

show the window but don't activate it

hide

hide the window

front

activate the window and bring it to the front

object:(string) or array(string)

This property uses either a or an array of strings to provide a list of multiple options that can be shown to the user. The list can be presented in one of three ways:

For marked as resizable, this property lets you override the width of the dialog defined in the resource - although note you can't resize a dialog smaller than its initial size.

For marked as resizable, this property lets you override the height of the dialog defined in the resource - although note you can't resize a dialog smaller than its initial size.

Set to True if you want a to run in “detached” mode, where your script provides its .

object: or object: *or object:*Dialog\ or int

You can provide either a or a object, or another Dialog. If you are showing this dialog in response to the event, you can also pass the value of the .window property.

string or object:

When used with a this property lets you control the icon shown in the dialog's title bar. In this instance, instead of a string you can also provide an object that you obtained from the .LoadImage or .LoadImage methods. Note that the image must have been loaded from a .ico file.

Set this property to create a in a particular language (if one or more have been provided), rather than the currently selected language.

object:(bool) or array(bool)\ or// int//

When the Show method returns, this property will return a of bools that provide the state of each checkbox as set by the user.

object:(int) or array(int) or int

For this property retrieves or sets the current dialog opacity level, from 0 (totally transparent) to 255 (totally opaque).

collection:

When the Show method returns you can obtain the state of the checkboxes using the state property of each object.

When used with a this property lets you control the dialog's position on screen. Accepted values are:

Lets you create a . The template property can be set to the name of the script dialog to display (as defined in your script resources), or a string that contains raw XML defining the dialog.

object: or object: or *object:*Dialog or int

Use this to specify the parent window of the dialog. The dialog will appear centered over the top of the specified window. You can provide either a or a object, or another Dialog. If you are showing this dialog in response to the event, you can also pass the value of the .window property.

You only need to set this property if you obtain the Dialog option from the .Dlg method. If the Dialog object comes from one of the other objects (e.g. .Dlg) then its parent window will already be set to the window which launched the action your script is responding to.

Specifies the x-position of a . Use the position property to control how the position is interpreted. After the dialog has been displayed you can change this property to move the dialog around on-screen.

Specifies the y-position of a . Use the position property to control how the position is interpreted. After the dialog has been displayed you can change this property to move the dialog around on-screen.

Use .SendCustomMsg to send messages to dialogs. The dialog will receive a "custom" in their message loop.

When creating a , calling this method creates the underlying dialog but does not display it. This lets you create the dialog and then initialize its controls before it is shown to the user.

Using Create implies a ; the detach property will be set True automatically. However, you can call RunDlg afterwards if you don't need a custom message loop and just want to set up some controls before displaying the dialog.

The return value can be used with the .SetFont method.

object:

Returns a object corresponding to one of the controls on a script dialog. The control is identified by its name, as defined in the script dialog resource.

object: <string:actions>

The first parameter is an object representing the files to be dragged. (You can also pass a of or objects, or full path strings, instead of an object. Or a or of full path strings.)

Ends a running in detached mode. Normally dialogs end automatically when the user clicks the close button or another button that has its Close Dialog property set to True. This method lets you end a dialog under script control. The optional parameter specifies the result code that the Dialog.result property will return.

object:

window - specify parent window for the dialog (a or a ). If not specified, the Dialog object's window property will be used.

A object is returned to indicate the folder chosen by the user. This object will have an additional result property that will be False if the user cancelled the dialog - the other normal Path properties will only be valid if result is True.

object:

Returns a object representing the most recent input event in a (only used in ).

The return value will evaluate to False when the dialog is closed, which is when you should exit your .

window - specify parent window for the dialog (a or a ). If not specified, the Dialog object's window property will be used.

Restores the previously saved position of a . The position must have previously been saved by a call to the SavePosition method.

object:

window - specify parent window for the dialog (a or a ). If not specified, the Dialog object's window property will be used. (Omit the window argument entirely if you don't want to use it; the type argument, if used, works whether third or fourth.)

An object is returned to indicate the files selected by the user. The returned object will have a result property that you should check first - the collection of items is only valid if result returns True. If it returns False it means the user cancelled the dialog.

object:

Creates a new object attached to this dialog. This object provides a simple way to send an HTTP request to a server asynchronously, and retrieve the response.

method
Arguments
Description

For the add and update methods, the icon argument can be a string or object - see the documentation for the icon property above for more details. If the dialog has been assigned an icon via this property then that icon will be used automatically if none is provided.

The notify method lets you show a system notification associated with your dialog. This method is similar to the .Notify method - see the description of that method for more information on the arguments.

Once your script has added an icon, the user can interact with it using the mouse. Mouse activity will generate click, dblclk and rclick events in your dialog's message loop. The .control property will be set to notifyicon.

object:

window - specify parent window for the dialog (a or a ). If not specified, the Dialog object's window property will be used. (Omit the window argument entirely if you don't want to use it; the type argument, if used, works whether third or fourth.)

A single object is returned to indicate the file selected by the user. This object will have an additional result property that will be False if the user cancelled the dialog - the other normal Item properties will only be valid if result is True.

window - specify parent window for the dialog (a or a ). If not specified, the Dialog object's window property will be used.

Turns a previously into a non-detached one, by taking over and running the default message loop. The RunDlg method won't return until the dialog has closed. You might use this if you created a dialog using Create, in order to initialize its controls, but don't actually want to run an interactive message loop.

object:

window - The dialog's parent window (a or a ). If not specified, the Dialog object's window property will be used. (Omit the window argument entirely if you don't want to use it; the type argument, if used, works whether third or fourth.)

A object is returned to indicate the file chosen by the user. This object will have an additional result property that will be False if the user cancelled the dialog, and the other normal Path properties will only be valid if result is True.

object:

Returns a object that represents the variables that are scoped to this particular dialog. This allows scripts to use variables that persist from one use of the dialog to another.

When a change occurs to a monitored file or folder, the dialog's message loop receives a dirchange event. The .control property identifies the watcher's ID.

<object:> <string:events> <string:id>

Allows a to monitor events in a folder tab. You will receive notifications of the requested events through your message loop.

The tab parameter specifies the you want to watch. The events string is a comma-separated list of events you want to watch for. The id string is an optional parameter; it lets you assign your own ID to the tab to make it easier to tell where events are coming from (if you're monitoring multiple tabs, for instance).

You will receive notification events in your message loop. The various properties of the object let you determine what happened.

The .event property will be set to tab for notifications from a watched folder tab.

The .control property tells you which tab the change occurred in; if you specified an ID when you called the WatchTab function, this will be in the .control property - otherwise, it will be the numeric handle of the tab. Note that it's *not* the actual object. You can access the object via the .tab property but this can be inefficient, as it requires a new object to be created every time. If you're only monitoring one tab it's better to store the object in your own variable - and if you're monitoring multiple tabs you could, e.g. use a unique ID for each one and keep the objects in a .

The .value property tells you which notification event occurred. Possible values are select, navigate, filechange, activate, srcdst, view, flat, filter and close (sent if the tab is closed while you are monitoring it).

For the filechange event, the .data property contains a bit mask indicating which file events occurred. 1 = add, 2 = delete, 4 = change. The values will be added together (so e.g. 6 indicates at least one item was changed and at least one was deleted). It's up to your script to determine exactly what changed.

dlg.buttons = "OK|Retry|Cancel"
dlg.buttons = "&OK|&Retry|&Cancel"
dlg.buttons = "OK|Retry+Retry All|Cancel"
dlg.buttons = "OK|Retry+Retry All=Retry All|Skip+Skip if same modified time=Skip Same Time|Cancel"

1

bold (indicates the default item)

2

checked (a checkmark will appear next to the item)

4

radio (a radio button will appear next to the item)

8

disabled (the user will not be able to select the item)

center

center the dialog over the parent window (the default)

absolute

specify an absolute position using the x and y properties

parent

position relative to the parent window (using x and y)

monitor

position relative to the current monitor (using x and y)

add

<icon>, <tooltip>

Add icon to the toolbar.

update

<icon>, <tooltip>

Updates icon or tooltip.

remove

none

Removes the icon.

notify

<title>, <message>, <flags>

Displays a system notification message (or bubble tooltip in Windows 7).

f

monitor for file change in folder (e.g. file created)

d

monitor for directory change in folder (e.g. directory created)

r

recursive - monitor sub-folders

a

monitor for file attribute changes

s

monitor for file size changes

w

monitor for last write time changes

i

monitor a single file rather than a folder

select

items in the tab are selected or deselected

navigate

the folder is changed in the tab

add

items are added to the folder

delete

items are deleted from the folder

change

items in the folder are changed (size, date, name, etc)

activate

tab activated or deactivated

srcdst

source/destination state changed

view

view mode changed

flat

flat view state changed

filter

quick filter changed

min

minimize the window

max

maximize the window

restore

restore the window (from minimize/maximize)

show

show the window if it's currently hidden

showna

show the window but don't activate it

hide

hide the window

front

activate the window and bring it to the front

DOpus
Lister
Tab
Func
Command
Example Scripts
script dialogs
Vector
Vector
script dialogs
script dialogs
script dialog
message loop
Lister
Tab
Lister
Tab
OnAboutScript
AboutData
Image
script dialog
Image
DOpus
Script
script dialog
language overlays
Vector
Vector
Vector
script dialogs
DialogOption
DialogOption
script dialog
script dialog
Lister
Tab
Lister
Tab
OnAboutScript
AboutData
DOpus
Tab
script dialog
script dialog
DOpus
Msg
script dialog
detached dialog
Control
Control
Control
Items
Items
Vector
Item
Path
Items
StringSet
UnorderedSet
script dialog
Path
Lister
Tab
Path
Msg
Msg
script dialog
detached mode
message loop
Lister
Tab
script dialog
Items
Lister
Tab
Items
HTTPRequest
HTTPRequest
Image
DOpus
Msg
Item
Lister
Tab
Item
Lister
Tab
detached dialog
Path
Lister
Tab
Path
Vars
Vars
Msg
Tab
script dialog
Tab
Msg
Msg
Msg
Msg
Tab
Tab
Msg
Tab
Tab
Map
Msg
Msg