FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Script for beatiful program COVER FLOW
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac
View previous topic :: View next topic  
Author Message
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Sat Jan 14, 2006 11:26 pm    Post subject: Script for beatiful program COVER FLOW Reply with quote

if you havenīt seen this absolutely gorgeus prgram Cover Flow, i Highly Recommend you to check it ut; itīs a program that lets you browse your itunes library by artwork in pure frontrow style, like if you had a stack with Lp:s, you pick one out and play it..

hereīs the url : http://www.steelskies.com/coverflow/HomePage.html

Anyways, i wonder if theres anyone good att scripting that could write
a script that lets you flip trough Lpīs , play them, and search by name to maybe..

That would be soo cool..

thanx in advance.

//jerry
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
shaneuk
Newbie


Joined: 05 Oct 2005
Posts: 5

PostPosted: Sun Jan 15, 2006 7:20 pm    Post subject: Reply with quote

the potential for that program is amazing.
it could be really great, lets hope development continues.
Back to top
View user's profile Send private message
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Sun Jan 15, 2006 7:24 pm    Post subject: Reply with quote

yeah imagine if you could flip over an artwork and choose song from the backside.. ohh that would be soo nice.. and a fullscreen mode like frontrow, so you donīt see the menubars.. and a salling script too ut!

apple should by this app and integrate it in frontrow..

anyone who can make a script for this?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
shaneuk
Newbie


Joined: 05 Oct 2005
Posts: 5

PostPosted: Mon Jan 16, 2006 1:03 am    Post subject: Reply with quote

apple would really benefit from giving front row a quick facelift with a solution like this.
Back to top
View user's profile Send private message
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Mon Jan 16, 2006 2:41 am    Post subject: Reply with quote

My bet is they present a new intel mac mini media center with frontrow 2.0 on 1 of april (apples 30 year anniversary) will be intresting to see whats gonna be new there.

Wont see Cover Flow though... :cry:

No script anyone!?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Mon Jan 16, 2006 5:11 pm    Post subject: Reply with quote

Hmm hard to get replys on this forum?

Is this really a Macforum? :shock:

come on boys, someones gotta know if its possible at least to script cover flow.. i wish i could do it myself..
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mark hunte
Junior Member


Joined: 20 Dec 2005
Posts: 39

PostPosted: Tue Jan 17, 2006 1:57 am    Post subject: Reply with quote

Ok this is Very, Very basic.. and very quickly thrown together.
Its just an illustration to show it can be done.

It accepts a search string from your mobile and plays the first Album it finds.

if you select the script again your last string should still be there for you to define more if its the wrong album.

I used parts of a SC iTunes script to quickly throw this together.



But thats all I'm going to do. (Sorry)

The reason is that the app is so young it does not have a applescript dictionary.
So you have to rely on GUI scripting which is also hard in this app because of the lack of elements.



[code:1]property trks : {}
property names : {}
property pSearchTerm : ""
using terms from application "SEC Helper"

on process invoke a_terminal
tell a_terminal
push (make new text field dialog with properties Ž
{name:"Text", title:"Find by Name", prompt:"Find:", value:pSearchTerm, max length:40})
end tell
end process invoke

on process dialog ok the_widget
if name of the_widget is "Text" then
set txt to value of the_widget
set pSearchTerm to txt
if length of txt is less than 2 then
my show_error(terminal of the_widget, "2 or more characters are required.")
return true -- Keep the text field controller
end if


tell application "CoverFlow"
activate
end tell
delay 1
tell application "System Events"
tell process "CoverFlow"
click menu item "Find" of menu 1 of menu bar item "Edit" of menu bar 1

keystroke txt

click menu item "Launch Album" of menu 1 of menu bar item "Album" of menu bar 1
delay 1
click menu item "Jump to Current Album" of menu 1 of menu bar item "File" of menu bar 1

end tell
end tell


end if

return
end process dialog ok

end using terms from


on showOSDMessage(txt)
tell application "SEC Helper"
show screen message txt
end tell
end showOSDMessage

on show_error(the_terminal, errM)
tell application "SEC Helper"
tell the_terminal
push (make new popup dialog with properties Ž
{textual content:errM})
end tell
end tell
end show_error

[/code:1]
Back to top
View user's profile Send private message
mark hunte
Junior Member


Joined: 20 Dec 2005
Posts: 39

PostPosted: Tue Jan 17, 2006 3:04 am    Post subject: Reply with quote

Ok I lied..

here is an other part.
This shows how to scroll through the albums.

I use a Nokia 6230i

So the left menu is left, right is right center is Play.

Again this is just to show. I am new to SEC scripting, so Someone else would probably do a better job...

i may play some mre actually, but there is no promises here or it will be pretty

[code:1]property repeatTimes : 1
property keymap_info : {{key_code:"s", key_title:"Nothing", key_description:"This is just a place holder"}, {key_code:"<", key_title:"Nothing", key_description:"This is just a place holder"}}

using terms from application "SEC Helper"

on process invoke a_terminal
tell a_terminal
--- Add the boolean argument "pen deltas" to make Clicker report pen/stylus movements, taps, and drags (new in 2.1)
--- You may check the property in the "current terminal" object to find out if the current terminal
--- supports pen event reporting
set my_keypad to make new keypad screen
tell my_keypad
make new text row with properties {textual content:"one", horizontal alignment:left, font size:small}
make new text row with properties {textual content:"two", horizontal alignment:center, font size:medium}
make new text row with properties {textual content:"three", horizontal alignment:center, font size:large}
end tell
push my_keypad
end tell
end process invoke

--- This handler is called (as per prefpane setting) repeatedly. Use it to update the
--- keypad object's properties to show current status of your script.
--- NOTE 1: Make sure your script behaves reasonably even if this handler is never called; the user
--- may have chosen to never idle-update the display (prefpane setting).
--- NOTE 2: This script handler *must* execute quite quickly.
--- NOTE 3: Setting the keypad text often will cause the battery to drain more quickly as there's more
--- Bluetooth activity and some devices will turn on backlighting when the display is updated.
on update keypad the_keypad
end update keypad

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

--
-- Key handling
--

on process key down the_key sent from the_keypad
set repeatTimes to 1

if the_key is "#" then
show keypad help keymap keymap_info title "Sample Help"

else if the_key is ">" then

my keypressRight()

else if the_key is "<" then

my keypressLeft()
else if the_key is "s" then

my keypressPlay()

show screen message "'" & the_key & "' was pressed"
end if
return true -- make sure the keypad stays up (prevents stray returns value from above to pass)
end process key down

on process key repeat the_key sent from the_keypad
show screen message "'" & the_key & "' # " & repeatTimes
set repeatTimes to (repeatTimes + 1)
return true -- make sure the keypad stays up (prevents stray returns value from above to pass)
end process key repeat

on process key up the_key sent from the_keypad
show screen message "'" & the_key & "' was released"
return true -- make sure the keypad stays up (prevents stray returns value from above to pass)
end process key up

--
-- Pen handling
--
on keypressRight()
tell application "CoverFlow"
activate
end tell

tell application "System Events"
tell application process "CoverFlow"
keystroke (ASCII character 28)

end tell
end tell

end keypressRight
on keypressLeft()
tell application "CoverFlow"
activate
end tell

tell application "System Events"
tell application process "CoverFlow"
keystroke (ASCII character 29)

end tell
end tell

end keypressLeft
on keypressPlay()
tell application "CoverFlow"
activate
end tell

tell application "System Events"
tell process "CoverFlow"

click menu item "Launch Album" of menu 1 of menu bar item "Album" of menu bar 1

click menu item "Jump to Current Album" of menu 1 of menu bar item "File" of menu bar 1

end tell
end tell
end keypressPlay
on process pen lock the_keypad
--- This handler is called when the user locks the "mouse button" in preparation
--- for a drag operation by tapping the device display one-and-a-half times (the
--- stylus is left on the display in the course of the second tap) and proceeds by
--- slowly moving the stylus.
end process pen lock

on process pen move the_keypad vertical amount delta_x horizontal amount delta_y
--- This handler is called when the user drags the stylus across the device display
end process pen move

on process pen state the_keypad changed to new_state
--- This handler is called when the user drops and removes the pen from the device display
--- NOTE: The event handlers above are normally sufficient to implement trackpad-like
--- functionality. This handler is primarily present to allow for gesture-type scripts
--- to know when the pen has left the device display.
--- IMPORTANT: Do NOT try to implement tap and drag detection with this handler. Doing so
--- properly requires pen location awareness (for hysteresis). Instead, rely on the handlers
--- above for this, as hysteresis is better implemented on the device.
end process pen state

on process pen tap the_keypad
--- This handler is called when the user taps the device display
end process pen tap

end using terms from
[/code:1]
Back to top
View user's profile Send private message
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Tue Jan 17, 2006 1:01 pm    Post subject: Reply with quote

ok thanx for the help!

it kind a works, it lets me go to the next album click by click..
what need to improve is if i hold the button for "left" it should
start flipping the albums, now it does it just click by click.

and also it gives a message every time "">" was realeased.

if i didnīt get the message, and if i could start an album then it would be all i need..

thanx for the help, itīs a good start!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Tue Jan 17, 2006 1:11 pm    Post subject: Reply with quote

i Delete the string with "show message" and now i can flip the albums..

basically what i need now is a string that lets me start an album too.

then it would be great. :P
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mark hunte
Junior Member


Joined: 20 Dec 2005
Posts: 39

PostPosted: Tue Jan 17, 2006 1:53 pm    Post subject: Reply with quote

I left the show message in so you could see what keycodes your device sends to the mac.
Your buttons may be different to mine.

Also if I press my Center Menu Button it will play the album.

The keycode sent to the mac from my Center Menu Button is 's' so I tell it when 's' is pressed, play


How did the search script work for you
Back to top
View user's profile Send private message
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Tue Jan 17, 2006 2:02 pm    Post subject: Reply with quote

ok then i know.. ( im new to all this, sorry)

yeah the script works kinda good, i can change albums, but i cant play an album.. and also i cant flow the albums by holding the joystick tp the side only by every click.

im using a SE K700
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mark hunte
Junior Member


Joined: 20 Dec 2005
Posts: 39

PostPosted: Tue Jan 17, 2006 2:08 pm    Post subject: Reply with quote

Ok just woke here so.

I added a bit for the scroll repeat. works here.


Also what Button do you press which is your enter (select) button on the device.
What key pressed comes up for it.

[code:1]property repeatTimes : 1
property keymap_info : {{key_code:"s", key_title:"Nothing", key_description:"This is just a place holder"}, {key_code:"<", key_title:"Nothing", key_description:"This is just a place holder"}}

using terms from application "SEC Helper"

on process invoke a_terminal
tell a_terminal
--- Add the boolean argument "pen deltas" to make Clicker report pen/stylus movements, taps, and drags (new in 2.1)
--- You may check the property in the "current terminal" object to find out if the current terminal
--- supports pen event reporting
set my_keypad to make new keypad screen
tell my_keypad
make new text row with properties {textual content:"one", horizontal alignment:left, font size:small}
make new text row with properties {textual content:"two", horizontal alignment:center, font size:medium}
make new text row with properties {textual content:"three", horizontal alignment:center, font size:large}
end tell
push my_keypad
end tell
end process invoke

--- This handler is called (as per prefpane setting) repeatedly. Use it to update the
--- keypad object's properties to show current status of your script.
--- NOTE 1: Make sure your script behaves reasonably even if this handler is never called; the user
--- may have chosen to never idle-update the display (prefpane setting).
--- NOTE 2: This script handler *must* execute quite quickly.
--- NOTE 3: Setting the keypad text often will cause the battery to drain more quickly as there's more
--- Bluetooth activity and some devices will turn on backlighting when the display is updated.
on update keypad the_keypad
end update keypad

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

--
-- Key handling
--

on process key down the_key sent from the_keypad
set repeatTimes to 1

if the_key is "#" then
show keypad help keymap keymap_info title "Sample Help"

else if the_key is ">" then

my keypressRight()

else if the_key is "<" then

my keypressLeft()
else if the_key is "s" then

my keypressPlay()

show screen message "'" & the_key & "' was pressed"
end if
return true -- make sure the keypad stays up (prevents stray returns value from above to pass)
end process key down

on process key repeat the_key sent from the_keypad
show screen message "'" & the_key & "' # " & repeatTimes
set repeatTimes to (repeatTimes + 1)
if the_key is ">" then

my keypressRight()

else if the_key is "<" then

my keypressLeft()
else if the_key is "s" then

my keypressPlay()
end if
return true -- make sure the keypad stays up (prevents stray returns value from above to pass)
end process key repeat

on process key up the_key sent from the_keypad
show screen message "'" & the_key & "' was released"
return true -- make sure the keypad stays up (prevents stray returns value from above to pass)
end process key up

--
-- Pen handling
--
on keypressRight()
tell application "CoverFlow"
activate
end tell

tell application "System Events"
tell application process "CoverFlow"
keystroke (ASCII character 28)

end tell
end tell

end keypressRight
on keypressLeft()
tell application "CoverFlow"
activate
end tell

tell application "System Events"
tell application process "CoverFlow"
keystroke (ASCII character 29)

end tell
end tell

end keypressLeft
on keypressPlay()
tell application "CoverFlow"
activate
end tell

tell application "System Events"
tell process "CoverFlow"

click menu item "Launch Album" of menu 1 of menu bar item "Album" of menu bar 1

click menu item "Jump to Current Album" of menu 1 of menu bar item "File" of menu bar 1

end tell
end tell
end keypressPlay
on process pen lock the_keypad
--- This handler is called when the user locks the "mouse button" in preparation
--- for a drag operation by tapping the device display one-and-a-half times (the
--- stylus is left on the display in the course of the second tap) and proceeds by
--- slowly moving the stylus.
end process pen lock

on process pen move the_keypad vertical amount delta_x horizontal amount delta_y
--- This handler is called when the user drags the stylus across the device display
end process pen move

on process pen state the_keypad changed to new_state
--- This handler is called when the user drops and removes the pen from the device display
--- NOTE: The event handlers above are normally sufficient to implement trackpad-like
--- functionality. This handler is primarily present to allow for gesture-type scripts
--- to know when the pen has left the device display.
--- IMPORTANT: Do NOT try to implement tap and drag detection with this handler. Doing so
--- properly requires pen location awareness (for hysteresis). Instead, rely on the handlers
--- above for this, as hysteresis is better implemented on the device.
end process pen state

on process pen tap the_keypad
--- This handler is called when the user taps the device display
end process pen tap

end using terms from
[/code:1]
Back to top
View user's profile Send private message
Jerryskate
Junior Member


Joined: 14 Jan 2006
Posts: 21
Location: gothenburg

PostPosted: Tue Jan 17, 2006 2:17 pm    Post subject: Reply with quote

yeah this did let me flow the albums, nice! didnīt work to start the albums though, i said "s" was released for my "enter" button..
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
mark hunte
Junior Member


Joined: 20 Dec 2005
Posts: 39

PostPosted: Tue Jan 17, 2006 2:38 pm    Post subject: Reply with quote

ermm. the enter works here.

ok if you just run this in script editor what happens.

[code:1]tell application "CoverFlow"
activate
end tell

tell application "System Events"
tell process "CoverFlow"

click menu item "Launch Album" of menu 1 of menu bar item "Album" of menu bar 1

end tell
end tell
[/code:1]


Also
The scroll repeat a bit buggy. looking at why
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
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
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