Legacy Automation package
- Updated: 2025/06/19
Legacy Automation package
actions Legacy Automation 中的 package 仅用于迁移的 bots 中,以确保它们在 Automation 360 中无缝运行。 我们不推荐使用此软件包进行新 bot 开发。
表达式
表达式显示在 action 输入字段中。 此 package 包含以下表达式:
表达式 | 描述 | 使用示例 |
---|---|---|
DictionaryToString
|
将字典变量转换为字符串变量 |
{{$dictionaryVar.LegacyAutomation:dictionaryToString$}}
输出为具有以下值的字符串变量: |
GetAbsolutePath
|
为您提供系统上所有(非Automation Anywhere)文件的相对路径,路径开头有一个全局变量。 在 Enterprise 11 或 Enterprise 10 中,GetAbsolutePath 的等同项位于
在 Enterprise 11 或 Enterprise 10 中,存储库中的任何文件夹都可以用作 |
|
GetBotPath
|
修改 bot 或 Enterprise 11
Enterprise 10 中 bots 路径变量的值,并根据 bot 存储库将其替换为相对 Automation 360 路径。 bot 路径的值基于本地路径或网络路径的 ApplicationPath 。 |
|
GetDecrementedNumber
|
将相应变量的值减少 1。 它主要用于列表、录制、数组或表变量的索引位置。 |
$myArray[$Loop-Counter-1.LegacyAutomation:getDecrementedNumber$][0]$
|
GetIncrementedNumber
|
将相应变量的值增加 1。 它主要用于列表、录制、数组或表变量的索引位置。 |
$Loop-Counter-1.LegacyAutomation:getIncrementedNumber.Number:toString$
myNumber 的输出随着循环的每次迭代而增加 1。 |
GetKeystrokeCount
|
计算短语/文本中的击键值 注: 特殊字符,如 [TAB]、[END] 或 [PAGE DOWN],被计为一个击键。
|
$KeyStroke-CharLength.LegacyAutomation:getKeystrokeCount.String:toNumber$
输出为每个击键的平均延迟。 |
GetLegacyIndexValue
|
从 bots 或 Enterprise 11 中迁移的 Enterprise 10 列表变量的特定索引位置检索值。 如果索引位置大于列表变量的大小,系统会从迁移的 bots 列表中的第一个索引位置检索值。 | |
ListToString
|
将列表变量转换为字符串变量。 |
{{$listVar.LegacyAutomation:listToString$}}
输出为具有以下值的字符串变量: |
ListToTable
|
将列表变量转换为表变量。 |
{{$my-list-variable.LegacyAutomation:listToTable$}}
输出为一个表变量,其中每个列表值都是单列中的单元格。 |
ParseLegacyKeys
|
确保存储在变量中的 Enterprise 10/Enterprise 11
bots 的 Insert Key Stroke 命令在执行时成功。 此表达式在执行过程中将其转换为等效 Automation 360 的击键。 注: 某些特殊字符的外观在 Version 11.3 和 Automation 360 之间有所不同。 例如,Page Up 键在 Version 11.3 中显示为 [PAGE UP],在 Automation 360 中显示为 [PAGE-UP]。 此差异不会影响 bot 函数。
|
$Test.LegacyAutomation:parseLegacyKeys$
|
ParseVariableOperation
|
解析 Enterprise 10/Enterprise 11 Variable Operation 命令中提供的表达式。 此表达式可确保在执行 Automation 360 时返回与 Enterprise 10/Enterprise 11 bots 相同的输出。 |
$prompt-assignment.LegacyAutomation:parseVariableOperation$
|
TableToString
|
将表变量转换为字符串变量。 您还可以使用分隔符(例如冒号、分号或空格)分隔输出中的字符串变量值。 |
{{$tableVar.LegacyAutomation:tableToString$}}
输出为具有以下值的字符串变量: 使用冒号、分号或空格作为 <"delimiter">: {{$tableVar.LegacyAutomation:tableToString(<"delimiter">)$}} 例如:
输出为具有以下值的字符串变量: |
TableToList
|
将表变量转换为列表变量。 |
{{$DataTable.LegacyAutomation:tableToList(<column_index>)$}} 例如:{{$DataTable.LegacyAutomation:tableToList(2)$}}
输出为具有以下值的列表变量: |
StringToList
|
将字符串类型变量转换为列表类型变量 |
$SampleString.LegacyAutomation:stringToList$
输出是一个大小为 1 的列表变量,其值与“SampleString”相同。 |
StringToTable
|
将字符串类型变量转换为数据表类型变量 |
$SampleString.LegacyAutomation:stringToTable$
输出是一个数据表变量,大小为 (1*1),索引 [0,0] 处的值与 SampleString 相同。 |