Mar 17, '04 09:48:00AM • Contributed by: Anonymous
Finally, replace the script you see in Script Editor with my Garage Band AppleScript. Save it, then drag the script from " Scripts" over to " Clicker items". This puts it in your phones "Accessories" menu. Read the rest of the hint for the script...
[robg adds: I can't test this one, as I have no Bluetooth phone ... and I apologize for the width of the code in the remainder of the hint, but there's not a good way to easily break the longer lines.]
Controls:
- * - Record
- # - Help
- Clear - Delete Selection
- Yes/Joystick push - Play/Stop
- Joystick Left - Rewind
- Joystick Right - Fast Forward
- Joystick Down - Next Track
- Joystick Up - Previous Track
- 0 - Return
- 1 - Previous Event
- 3 - Next Event
- 7 - Save
- 8 - New Track
property soiko : "Stop"
property keymap_info : {¬
{key_code:"s", key_title:"Play/Stop", key_description:"Toggles between play and stop."}, ¬
{key_code:"<", key_title:"Rewind", key_description:"Moves the song pointer to the previous bar. Keeps moving when you hold the button."}, ¬
{key_code:">", key_title:"Forward", key_description:"Moves the song pointer to the next bar. Keeps moving when you hold the button."}, ¬
{key_code:"c", key_title:"Delete", key_description:"Delete the highlighted selection"}, ¬
{key_code:"*", key_title:"Record", key_description:"Starts recording."}, ¬
{key_code:"1", key_title:"Previous Event", key_description:"goes to the next recorded event."}, ¬
{key_code:"0", key_title:"Return", key_description:"Return."}, ¬
{key_code:"8", key_title:"New Track", key_description:"New Track."}, ¬
{key_code:"7", key_title:"Save", key_description:"Save."}, ¬
{key_code:"3", key_title:"Next Event", key_description:"Selects previous recorded event."}, ¬
{key_code:"^", key_title:"Previous track", key_description:"Select previous track."}, ¬
{key_code:"v", key_title:"Next track", key_description:"Select next track."} ¬
}
tell application "SEC Helper"
enter keypad mode text "GarageBand" & return & "(# for help)"
end tell
on key_was_depressed(keyCode)
tell application "GarageBand"
activate
end tell
if keyCode is ">" then
tell application "SEC Helper"
simulate keyboard virtual keycode 124
show screen message "Forward" duration 2.5
end tell
else if keyCode is "<" then
tell application "SEC Helper"
simulate keyboard virtual keycode 123
show screen message "Rewind" duration 2.5
end tell
else if keyCode is "^" then
tell application "SEC Helper"
simulate keyboard virtual keycode 126
show screen message "Previous track" duration 2.5
end tell
else if keyCode is "v" then
tell application "SEC Helper"
simulate keyboard virtual keycode 125
show screen message "Next track" duration 2.5
end tell
else if keyCode is "1" then
tell application "SEC Helper"
simulate keyboard virtual keycode 123
show screen message "Previous Event" duration 2.5
end tell
else if keyCode is "7" then
tell application "SEC Helper"
simulate keyboard virtual keycode 1 modifiers {"command"}
show screen message "Save" duration 2.5
end tell
else if keyCode is "0" then
tell application "SEC Helper"
simulate keyboard virtual keycode 36
show screen message "press return" duration 2.5
end tell
else if keyCode is "8" then
tell application "SEC Helper"
simulate keyboard virtual keycode 45 modifiers {"command", "option"}
show screen message "New Track" duration 2.5
end tell
else if keyCode is "3" then
tell application "SEC Helper"
simulate keyboard virtual keycode 124
show screen message "Next Event" duration 2.5
end tell
else if keyCode is "s" then
if soiko is "Stop" then
tell application "SEC Helper"
push keypad text "GarageBand" & return & "playing..."
simulate keyboard virtual keycode 49
end tell
set soiko to "Play"
else if soiko is "Play" then
tell application "SEC Helper"
push keypad text "GarageBand" & return & "stopped"
simulate keyboard virtual keycode 49
end tell
set soiko to "Stop"
end if
else if keyCode is "c" then
tell application "SEC Helper"
push keypad text "GarageBand" & return & "selection deleted"
simulate keyboard virtual keycode 51
end tell
set soiko to "Stop"
else if keyCode is "*" then
tell application "SEC Helper"
push keypad text "GarageBand" & return & "recording..."
simulate keyboard virtual keycode 15
show screen message "Record" duration 2.5
end tell
else if keyCode is "#" then
tell application "SEC Helper"
show keypad help keymap keymap_info title "GarageBand Help"
end tell
end if
end key_was_depressed
on key_is_repeating(keyCode)
try
tell application "GarageBand" to activate
if keyCode is ">" then
tell application "SEC Helper"
simulate keyboard virtual keycode 124
end tell
else if keyCode is "<" then
tell application "SEC Helper"
simulate keyboard virtual keycode 123
end tell
else if keyCode is "^" then
tell application "SEC Helper"
simulate keyboard virtual keycode 126
end tell
else if keyCode is "v" then
tell application "SEC Helper"
simulate keyboard virtual keycode 125
end tell
end if
set repeatTimes to (repeatTimes + 1)
on error
beep
end try
end key_is_repeating
