FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Simple DVDpedia remote

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac
View previous topic :: View next topic  
Author Message
kseiferlin
Junior Member


Joined: 05 Jun 2006
Posts: 28

PostPosted: Tue Sep 05, 2006 1:56 pm    Post subject: Simple DVDpedia remote Reply with quote

DVDpedia ([url]http://www.bruji.com/[/url]) is in my view the best DVD catalog program, and is excellently supported by the team behind it. I love the program, but unfortunately it currently doesn't support applescript through an interface. Nevertheless, basic functions can be controlled by sending keystrokes to DVDpedia. This allows to control at least a basic functionality. The script below implements 4 cursor keys for navigation in the table view, cover view or fullscreen mode, it allows to switch the info pane on and off, to switch between table and cover view, to toggle fullscreen, and to start "play" if a play-able file is linked. However, the "play" command is activated by either "p" (in fullscreen mode) or "command-p" in normal mode - therefore, the script contains 2 play commands. In addition there are two commands that control Quicktime (which would most probably be opened when you clicked "play"): it allows to close the frontmost quicktime window, and to toggle fullscreen mode for Quicktime.

The script can be added by creating a new script the salling clicker preference pane. Select "Option list widget" as type and replace the default contents by the following:

[code:1]
using terms from application "SEC Helper"

on process invoke a_terminal
tell a_terminal
set the_list to make new list screen with properties {title:"DVDPedia", selected item:2}
set item labels of the_list to {"Table view", "Cover view", "Left", "Right", "Up", "Down", "Show/hide info", "Toggle full screen", "Play", "Play (DVDpedia in fullscreen mode)", "(Quicktime) Close frontmost", "(Quicktime) Fullscreen"}
push the_list
end tell
end process invoke

on process updated value the_widget
--show screen message "item " & (selected item of the_widget) & " was selected"
set sel to (selected item of the_widget)
tell application "DVDpedia" to activate

if sel is 1 then
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "t") modifiers {"option", "command"}
return
end if
if sel is 2 then
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "c") modifiers {"option", "command"}
return
end if

if sel is 3 then
tell application "SEC Helper" to simulate keyboard virtual keycode 123
return
end if
if sel is 4 then
tell application "SEC Helper" to simulate keyboard virtual keycode 124
return
end if
if sel is 5 then
tell application "SEC Helper" to simulate keyboard virtual keycode 126
return
end if
if sel is 6 then
tell application "SEC Helper" to simulate keyboard virtual keycode 125
return
end if
if sel is 7 then
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "i") modifiers {"command"}
return
end if
if sel is 8 then
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "F") modifiers {"option", "command"}
return
end if
if sel is 9 then
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "p") modifiers {"option"}
return
end if
if sel is 10 then
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "p")
return
end if
if sel is 11 then
tell application "QuickTime Player" to activate
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "w") modifiers {"command"}
return
end if
if sel is 12 then
tell application "QuickTime Player" to activate
tell application "SEC Helper" to simulate keyboard charcode (ASCII number "f") modifiers {"command"}
return
end if

return true -- dismiss the list when an item is selected
end process updated value

on process screen exit the_screen
--show screen message "exit"
end process screen exit

end using terms from
[/code:1]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group