2007年5月5日星期六

给sallingClicker添加realplayer的控制功能

Salling Clicker 是一款远端控制软件,类似苹果自带remote control的frontrow服务端,
支持使用蓝牙协议的手机﹑palm等来控制mac OS X。
安装完后带有dvd player,iPhoto,iTunes,VLC等的控制脚本,但是没有带realplayer控制
脚本。它的脚本使用的是applescript,可以自己编写realplayer控制脚本。
使用它提供的脚本模板keypad widget可以很快自己编写一个realplayer的控制脚本。
下面列出需要响应控制事件的部分脚本:
if the_key is "#" then
show keypad help keymap keymap_info title "Sample Help"
else
-- show screen message "'" & the_key & "' was pressed"
if the_key is ">" then
show screen message "play"
tell application "RealPlayer"
activate
play
end tell
else if the_key is "<" then
show screen message "pause"
tell application "RealPlayer"
activate
pause
end tell
else if the_key is "^" then
show screen message "up volume"
tell application "SEC Helper"
set system sound volume to system sound volume + 0.1
end tell
show screen message (system sound volume as string)
else if the_key is "v" then
show screen message "down volume "
tell application "SEC Helper"
set system sound volume to system sound volume - 0.1
end tell
show screen message (system sound volume as string)
else if the_key is "6" then
show screen message "un mute"

tell application "RealPlayer"
--activate
tell player 1
set is muted to false
end tell
end tell
else if the_key is "5" then
show screen message "mute"
tell application "RealPlayer"
-- activate
tell player 1
set is muted to true
end tell
end tell
else if the_key is "1" then
show screen message "full"
tell application "RealPlayer"
-- activate
tell player 1
set is full screen to true
end tell
end tell
else if the_key is "2" then
show screen message "un full"
tell application "RealPlayer"
-- activate
tell player 1
set is full screen to false
end tell
end tell
else
show screen message the_key
end if

全屏幕代码还没有调好。
手机按键说明:
上 提高系统音量
下 降低系统音量
左 暂停realplayer
右 播放
5 静音
6 停止静音
在nokia 6600 + MacBookPro上面测试通过。

1 条评论:

iKevin 说...

比特,你好!我是macfans网上的Chaconne,意欲询问下有关于Salling Clicker破解的问题.网上所提供的Patch是个PPC软件,而我的mac上的Rosetta被误删除了,所以打不开 @_@ .特想知道,你那里有否UB的Patch软件??若没有,因为Salling Clicker本身是UB的,能否麻烦你将已Patch好的那个Salling Clicker.prefPane email给我呢??就是PreferencePanes里那个东东!!非常感谢啦~~ chaconne219@gmail.com