1

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

...

purplecones
  • 77
  • 1
  • 9

2 Answers2

1

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.

Don Hutton
  • 11
  • 1
0

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
FRAGA
  • 5,078
  • 1
  • 15
  • 13
  • you're welcome! so choose this as the answer, to avoid people answering unnecessarily :) – FRAGA Jan 22 '11 at 20:19
  • another thing im running into now is, checking if it is fullscreen or not. which means i have to get into the properties of player and check whether 'is full screen' is true. For some reason I'm having a hard time understanding applescript coming from c++/java – purplecones Jan 23 '11 at 07:20