FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Salling Clicker and Remote Buddy

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


Joined: 12 Jul 2006
Posts: 6

PostPosted: Sat Feb 03, 2007 1:47 am    Post subject: Salling Clicker and Remote Buddy Reply with quote

Hello,

And yes, i know there has been a similar topic. But no one replied to that one, so i open a new one.

Has there been any workable solutions with remote buddy, or is it completely hard coded to the apple remote?

Regards,

Řyvind
Back to top
View user's profile Send private message
RevJonn
Newbie


Joined: 10 Aug 2005
Posts: 9

PostPosted: Fri May 11, 2007 5:14 pm    Post subject: Reply with quote

i'm STILL looking for the Same!!!...

Any Ideas Anyone!?!
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Fri May 11, 2007 5:17 pm    Post subject: Reply with quote

Not sure what commands Remote Buddy listens to, but did you try the Front Row controller in Salling Clicker 3.5? The RB guys might be able to make this work by responding to the keys we're sending (should they want to).

Best.
--
Jonas

[quote="RevJonn"]i'm STILL looking for the Same!!!...

Any Ideas Anyone!?![/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RevJonn
Newbie


Joined: 10 Aug 2005
Posts: 9

PostPosted: Wed May 23, 2007 5:52 pm    Post subject: Reply with quote

Yeah i've tried the Front Row controller with3.5 but to no avail...i'm gonna get onto the remote buddy guys!! :lol:
Back to top
View user's profile Send private message
RevJonn
Newbie


Joined: 10 Aug 2005
Posts: 9

PostPosted: Fri Jul 20, 2007 3:46 pm    Post subject: Reply with quote

This was the reply i got from Felix at Remote Buddy...


Hi,

first of all: Apple® Remote != Front Row != Remote Buddy. If you can
control Front Row, you don't automatically have an Apple® Remote
Emulation. Usually just key presses are used for that. I assume this
is also the case for the FR script of Clicker. And even with an
Apple® Remote Emulation, you can't automatically control Remote Buddy
with it (you can under some circumstances, but not per se).

So, I would be surprised if it would work. That said, I have never
seen Clicker in action and thus also don't know what the FR script is
doing.

What should work - in general, but with limitations - though, is if
you can get Clicker to issue key presses for the HotKey Remote. You
can configure the HotKeys Remote Buddy should listen and react to in
Preferences > Hardware > HotKey Remote > Options.

The event would then be routed like this:

Clicker > Keypress > Remote Buddy's Hotkey Remote > mapped to button
press > button press mapped to action > triggers action in Remote Buddy.

Hope that helps.

Best regards,
Felix \



Any suggestions on how i can make this work...gotta be honest i aint the most technical when it comes to scripts...rebuilding Macs no Problem...fixing Guitars, Easy...Scripts = another language....

Pls Help!!!
Back to top
View user's profile Send private message
akrug
Newbie


Joined: 09 Aug 2008
Posts: 6

PostPosted: Sat Aug 09, 2008 8:00 pm    Post subject: Reply with quote

Remote Buddy is scriptable, which should make it pretty straightforward:

[quote]scriptremote v : The Script Remote is a virtual remote control input device in Remote Buddy. It enables you to f.ex. send events from driver software to Remote Buddy and use Remote Buddy as if it would directly support the hardware supported by that driver software.
Sample code:

-- Below line should be executed by the driver software when the play/pause button is pressed
tell application "Remote Buddy" to scriptremote button "playPause" event "press"

-- Below line should be executed by the driver software when the play/pause button is released
tell application "Remote Buddy" to scriptremote button "playPause" event "release"

-- Below line should be executed by the driver software, if it can only execute a script at the time the button is pressed
tell application "Remote Buddy" to scriptremote button "playPause" event "click"


scriptremote

button text : Name of the button to send an event for. The core set of buttons is "left", "right", "plus", "minus", "playPause", "menu". The advanced multimedia button set is "mute", "mmStop", "mmPlay", "mmPause", "mmSkipBackward", "mmSkipForward", "mmFastForward", "mmRewind", "mmVolumePlus", "mmVolumeMinus".

event text : The kind of event. "press" to press the button, "release" to release the button and "click" to quickly press and release the button.[/quote]
Back to top
View user's profile Send private message
akrug
Newbie


Joined: 09 Aug 2008
Posts: 6

PostPosted: Thu Mar 19, 2009 2:07 am    Post subject: Reply with quote

Here's a script I wrote to control Remote Buddy via its scriptremote command. I also added a function to type text from the phone, since I mainly wrote the script to use it with Plex and wanted to be able to search YouTube from the sofa:

[code:1]property keymap_info : {{key_code:"s", key_title:"Play/Pause", key_description:""}, {key_code:"<", key_title:"|<<", key_description:""}, {key_code:">", key_title:">>|", key_description:""}, {key_code:"^", key_title:"+", key_description:""}, {key_code:"v", key_title:"-", key_description:""}, {key_code:"f", key_title:"Menu", key_description:""}, {key_code:"5", key_title:"Play", key_description:""}, {key_code:"1", key_title:"Stop", key_description:""}, {key_code:"2", key_title:"Skip backward", key_description:""}, {key_code:"6", key_title:"Skip forward", key_description:""}, {key_code:"4", key_title:"Rewind", key_description:""}, {key_code:"3", key_title:"Volume -", key_description:""}, {key_code:"9", key_title:"Volume +", key_description:""}, {key_code:"7", key_title:"Mute", key_description:""}, {key_code:"*", key_title:"Text entry", key_description:""}, {key_code:"0", key_title:"Recent text entries", key_description:""}}

property savedTextInput : {}

using terms from application "SEC Helper"

on process invoke a_terminal
tell a_terminal
set my_keypad to make new keypad screen
set title of my_keypad to "Remote Buddy"
tell my_keypad
make new text row with properties {horizontal alignment:center, font size:medium}
end tell
push my_keypad
end tell
end process invoke

on update keypad the_keypad
set textual content of the first text row of the_keypad to "The directional controls and the Menu button correspond to the standard menu buttons. Use the numerical keyboard for extra functionality. " & return & "Press # for Help"
end update keypad

on process key down the_key sent from the_keypad
if the_key is "#" then
show keypad help keymap keymap_info title "RB Remote Help"
else if the_key is "*" then
tell terminal of the_keypad to push (make new text field dialog with properties ¬
{name:"textEntry", title:"Text entry", prompt:"Text entry"})
else if the_key is "0" then
tell terminal of the_keypad to push (make new list screen with properties ¬
{item labels:savedTextInput, title:"Recent text entries", selected item:1, name:"recentTextEntry"})
else
RM(the_key, "press")
end if
return true
end process key down

on process key up the_key sent from the_keypad
RM(the_key, "release")
return true
end process key up

on process dialog ok the_widget
typewriter(value of the_widget)
end process dialog ok

on process updated value a_widget for property a_property
if number of items of savedTextInput > 0 then typewriter(item (selected item of a_widget) of savedTextInput)
return false
end process updated value

end using terms from

on typewriter(txt)
using terms from application "SEC Helper"
repeat with char in characters of txt
simulate keyboard charcode (ASCII number (char))
delay 0.01
end repeat
end using terms from
set newSavedTextInput to {}
set counter to 0
repeat with x in savedTextInput
if x as text is not txt as text then
set newSavedTextInput to (newSavedTextInput as list) & x as list
set counter to counter & 1
end if
if counter is 9 then exit repeat
end repeat
set savedTextInput to (txt as list) & newSavedTextInput as list
end typewriter

on RM(the_key, action)
if the_key is in {"s", ">", "<", "^", "v", "f", "1", "2", "3", "4", "5", "6", "7", "8", "9"} then
if the_key is "s" then
set remoteButton to "playPause"
else if the_key is ">" then
set remoteButton to "right"
else if the_key is "<" then
set remoteButton to "left"
else if the_key is "^" then
set remoteButton to "plus"
else if the_key is "v" then
set remoteButton to "minus"
else if the_key is "f" then
set remoteButton to "menu"
else if the_key is "1" then
set remoteButton to "mmStop"
else if the_key is "2" then
set remoteButton to "mmSkipBackward"
else if the_key is "3" then
set remoteButton to "mmVolumePlus"
else if the_key is "4" then
set remoteButton to "mmRewind"
else if the_key is "5" then
set remoteButton to "mmPlay"
else if the_key is "6" then
set remoteButton to "mmFastForward"
else if the_key is "7" then
set remoteButton to "mute"
else if the_key is "8" then
set remoteButton to "mmSkipForward"
else if the_key is "9" then
set remoteButton to "mmVolumeMinus"
end if
tell application "Remote Buddy" to scriptremote button remoteButton event action
end if
end RM[/code:1]

The key pad setup is as follows (of course you could easily change this by editing the script):

s: Play/Pause
f: Menu
<: |<<
>: >>|
^: +
v: -

5: Play
1: Stop
4: Rewind
6: Fast forward
2: Skip backward
8: Skip forward
3: Volume up
9: Volume down
7: Mute

*: Text entry
0: Recent text entries
#: Help

/Akrug
Back to top
View user's profile Send private message
starshipSS
Newbie


Joined: 08 May 2009
Posts: 3

PostPosted: Fri May 08, 2009 11:42 am    Post subject: Reply with quote

Please, you guys are genius's - but help a fella out. How, where exactly do I put this code/script?

Salling Clicker excepts only .cgz scripts I think and hard pressed to find a scripting guide anywhere.

Cheers.
Back to top
View user's profile Send private message
akrug
Newbie


Joined: 09 Aug 2008
Posts: 6

PostPosted: Sat May 09, 2009 12:00 am    Post subject: Reply with quote

[quote="starshipSS"]Please, you guys are genius's - but help a fella out. How, where exactly do I put this code/script?

Salling Clicker excepts only .cgz scripts I think and hard pressed to find a scripting guide anywhere.

Cheers.[/quote]

Salling Clicker allows applescript files (.scpt) as well, so just copy the above script and paste into a new document in Script Editor, save it as a script and pull it into Salling Clicker's configuration.
Back to top
View user's profile Send private message
starshipSS
Newbie


Joined: 08 May 2009
Posts: 3

PostPosted: Sat May 09, 2009 5:33 pm    Post subject: Reply with quote

[quote="akrug"]
Salling Clicker allows applescript files (.scpt) as well, so just copy the above script and paste into a new document in Script Editor, save it as a script and pull it into Salling Clicker's configuration.[/quote]

Thanks. When I save the script, Script Editor gives a syntax error - Expected end of line, etc. but found identifier.

Sounds so easy to figure out but I can't get it?!
Back to top
View user's profile Send private message
akrug
Newbie


Joined: 09 Aug 2008
Posts: 6

PostPosted: Mon May 11, 2009 2:10 am    Post subject: Reply with quote

[quote="starshipSS"]When I save the script, Script Editor gives a syntax error - Expected end of line, etc. but found identifier.[/quote]

I tried to copy the script above and save as an applescript and did not get an error message.

You are not allowed to upload applescript files to this forum, so I have saved the script as a text file and attached to this message. Download it and change the extension from txt to scpt and see if it works that way.
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Mon May 11, 2009 12:03 pm    Post subject: Reply with quote

Hi,

You are allowed to upload cgz files, so you could export the script from Clicker, to share with others.

I think you might also be allowed to upload zip files.

Script files are problematic to upload, as they are (or can be) bundles (i.e. folders) or 0-size files with resource forks. Not very stable for internet transportation.

Best.
--
Jonas

[quote="akrug"][quote="starshipSS"]When I save the script, Script Editor gives a syntax error - Expected end of line, etc. but found identifier.[/quote]

I tried to copy the script above and save as an applescript and did not get an error message.

You are not allowed to upload applescript files to this forum, so I have saved the script as a text file and attached to this message. Download it and change the extension from txt to scpt and see if it works that way.[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
akrug
Newbie


Joined: 09 Aug 2008
Posts: 6

PostPosted: Mon May 11, 2009 12:20 pm    Post subject: Reply with quote

[quote="salling"]Hi,

You are allowed to upload cgz files, so you could export the script from Clicker, to share with others.

I think you might also be allowed to upload zip files.[/quote]

Thanks Jonas. Here's the script compressed as a zip file.
Back to top
View user's profile Send private message
starshipSS
Newbie


Joined: 08 May 2009
Posts: 3

PostPosted: Wed May 13, 2009 12:55 am    Post subject: Reply with quote

Hey Akrug - many thanks. I extracted the script from the zip file, dragged it to Salling Clicker and now works a treat. I was considering buying an apple remote and infrared receiver for my Hackintosh - but this is a perfect combo-solution.

I didn't see your script included in the Salling Clicker downloads section - you deserve that plus some royalties since I will now buy the full version. Cheers.

(Seems like the download link has gone missing ?-) ... oh nope it's still there!
Back to top
View user's profile Send private message
akrug
Newbie


Joined: 09 Aug 2008
Posts: 6

PostPosted: Tue Feb 23, 2010 11:14 am    Post subject: Reply with quote

[quote="starshipSS"]Hey Akrug - many thanks. I extracted the script from the zip file, dragged it to Salling Clicker and now works a treat. I was considering buying an apple remote and infrared receiver for my Hackintosh - but this is a perfect combo-solution.

I didn't see your script included in the Salling Clicker downloads section - you deserve that plus some royalties since I will now buy the full version. Cheers.

(Seems like the download link has gone missing ?-) ... oh nope it's still there![/quote]

Thank you! All I've done though is to look at other peoples scripts and put them together.
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