跳到主要内容

GetLoopUntilStopped

返回演示文稿是否持续循环播放直到用户停止。

语法

expression.GetLoopUntilStopped();

expression - 表示 ApiPresentation 类的变量。

参数

此方法没有任何参数。

返回值

boolean

示例

此示例展示如何获取演示文稿的循环播放直到停止设置。

const presentation = Api.GetPresentation();
presentation.SetLoopUntilStopped(true);

const slide = presentation.GetSlideByIndex(0);
slide.RemoveAllObjects();

const fill = Api.CreateSolidFill(Api.RGB(255, 111, 61));
const stroke = Api.CreateStroke(0, Api.CreateNoFill());
const shape = Api.CreateShape("rect", 300 * 36000, 130 * 36000, fill, stroke);

const content = shape.GetContent();
const paragraph = content.GetElement(0);
const isLooping = presentation.GetLoopUntilStopped();
paragraph.AddText("Loop until stopped: " + isLooping);
slide.AddObject(shape);