Return

完成另一個指令碼中Runsub所觸發的子指令碼。 Return 將單個值存儲在 ReturnValue 屬性中,並將其傳遞回調用子腳本的腳本。 ReturnValue 存儲在 Runsub 動作的 ReturnVariable 屬性中。

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

支援的指令碼類型

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 數位的

輸入屬性

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

屬性

描述

Caption

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

ReturnValue

保留您要傳遞給主指令碼的值的變數。 此值存儲在主腳本中ReturnVariable屬性的Runsubaction中。

結果分支條件

無

貼士與技巧

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

指令碼範例

下面是一個範例,說明如何在指令碼中使用此動作。 這不是一個完整的指令碼。 可能需要額外的指令碼。

下面是使用三個 Return 動作將值返回主指令碼的子指令碼範例。

是否要下載此指令碼?