开发者

applescript: set fullscreen of RealPlayer application

I'm in the process of creating a HTPC using my mac mini. I need to be able to start a RealPlayer clip and set it to fullscreen(not maximize window). I've got this so far.

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

but when I run it I get this error:

error "Can’t set «class Pfsc» of «class R1PC» to true." number -10006 from «class Pfsc» of «class R1PC»

Open clip works fine, I just can't set it to fullscreen. Any help would be appreciated.

Thank you


here is the property for full screen

player n [inh. item] : A video player.

elements contains windows; contained by application, windo开发者_StackOverflow社区ws.

properties

...

is full screen (boolean) : is clip playback in full screen

...


The problem with the original script was that you said "player" instead of "player 0". "player" is a class. "player 0" is a specific example/substantiation of that class. The zero is the first player started and is all you usually have but in theory you can have multiple players open at the same time called "play 1", "player 2" and so on.


Try using the appropriate keystroke. On the example, it executes Command + F. It's like pressing the command button (using command down), and then the letter F

tell application "System Events" to keystroke "f" using command down
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜