1

我正在使用我的 mac mini 创建一个 HTPC。我需要能够启动 RealPlayer 剪辑并将其设置为全屏(不是最大化窗口)。到目前为止我已经得到了这个。

tell application "RealPlayer"
 open clip with URL "<url>"
end tell
delay 5
tell application "RealPlayer"
 set is full screen of player to true
end tell

但是当我运行它时,我得到了这个错误:

错误“无法将 «class R1PC» 的 «class Pfsc» 设置为 true。” 来自 «class R1PC» 的 «class Pfsc» 的编号 -10006

打开剪辑工作正常,我只是无法将其设置为全屏。任何帮助,将不胜感激。

谢谢


这是全屏的属性

球员 n [inh. item] : 视频播放器。

元素包含窗口;包含在应用程序、窗口中。

特性

...

is full screen (boolean) : 是否全屏播放剪辑

...

4

2 回答 2

1

原始脚本的问题是您说的是“玩家”而不是“玩家 0”。“玩家”是一个类。“玩家 0”是该类别的特定示例/证实。零是第一个开始的玩家,是您通常拥有的所有玩家,但理论上您可以同时打开多个玩家,称为“play 1”、“play 1”、“play 2”等。

于 2011-11-12T06:39:15.550 回答
0

尝试使用适当的击键。在示例中,它执行 Command + F。这就像按命令按钮 ( using command down),然后按字母F

tell application "System Events" to keystroke "f" using command down
于 2011-01-22T19:34:29.023 回答