Forums > Dev

Dev. OSX Service – New From Clipboard – Request / Suggestion

April 30, 2010 | 8:54 am

Hi
I started looking into developing something like this myself but could not quite kick it off so I thought I would put it out to the broader Dev community.
I think it would be quite handy and convenient if the ‘New From Clipboard’ function could be exposed to Safari (and other browsers/apps) as a ‘service’ on Mac OSX.
Then it would be as easy as highlighting the patch code and using the pull-down menu (or hotkey combo) to open it up in Max, and start up Max if needed.
I realise this may seem a bit lazy but often I have heaps of windows and spaces going that complicate things.
Just a thought – will still look into it myself but figured someone on list could probably code it quicker

Cheers
MM


May 5, 2010 | 8:07 am

Hello there – I spent some time a few months ago digging in AppleScript and Automator for XCode dev acceleration.

I created this service in like 10 minutes – and you can too – I thought I’d show you how instead of just uploading it.

1. Launch the app "Automator."
2. Select "Service" as the type of workflow you are going to create.
3. Goto the "Library" on the side of the screen (If it’s not there, goto view, show library)
4. Goto the "Utilities" category in the "Library" and drag the "Copy to Clipboard" action into your blank workflow.
5. Next, drag the "Run AppleScript" action beneath the "Copy to Clipboard" action.
6. Clear out the contents of the "Run AppleScript" action and paste in the following:

on run {input, parameters}
tell application "/Applications/Max5/MaxMSP.app"
activate
end tell

repeat while application "/Applications/Max5/MaxMSP.app" is not frontmost
delay 1
end repeat

tell application "System Events"
keystroke "n" using {command down, option down}
end tell
end run

7. At the top of the screen you configure the service. In response to your post, my config was: "Service receives "text" in Safari."
("Replaces Selected Text" box is left UNCHECKED)

8. Click Save, name it, and you r good2go!

Cheers,

a


May 6, 2010 | 7:05 am

Thanks
Unfortunately ( I should have mentioned this ) I am still on Leopard (PPC;~{) . . .
Automator does not have the ‘Service’ startpoint in 10.5 so no luck for me there . . .
Have found app called ‘ThisService’ to convert .scpt to services but not found Service code . .
Can you post the version you made – if you think it is 10.5 compatible . . .
Hope others enjoy implementing your instructions . . .
Cheers

MM


Viewing 3 posts - 1 through 3 (of 3 total)