Search code examples
macosapplescriptfullscreenrealplayer

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, windows.

properties

...

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

...


Solution

  • 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