Return

完成另一個指令碼中Runsub所觸發的子指令碼。

ReturnReturnValue 屬性中存儲一個值,並將其傳回給調用子指令碼的指令碼。ReturnValue 存儲在 Runsub 動作的 ReturnVariable 屬性中。

Return應始終將控制權返回給主指令碼。最佳做法是不要在子指令碼中時結束指令碼。

Supported Script Types

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

The icon for the Digital script type - a computer monitor with a smartphone next to it.

一般

電郵 聊天 電話 語音郵件 工作項目 SMS 數位

Input Properties

這些屬性定義了動作執行時使用的資料。

屬性

描述

Caption

輸入在指令碼中唯一標識此操作的短語。標題出現在指令碼畫布上的動作圖示下。The default is the action name.

ReturnValue

保留您要傳遞給主指令碼的值的變數。此值儲存在主指令碼中Runsub actionReturnVariable 屬性中。

Result Branch Conditions

None

Tips & Tricks

ReturnValue可以是一個陣列或動態資料物件。如果您使用動態資料物件,請使用asjson()asxml()函數將其轉換成 JSON 或 XML。然後可以將 JSON 或 XML 作為單個字串值傳遞給主指令碼。在主指令碼中,可以將該值轉回為動態資料物件。

Script Example

此範例不是一個完整的指令碼。使用此動作時需要額外的指令碼編寫工作。

The example below is a subscript that uses three Return actions to values back to a main script.

Would you like to download this script?