[mac4theblind] 10.6: Create new AppleScript document Service

  • From: Sarah Alawami <marrie12@xxxxxxxxx>
  • To: mack for the blind list <mac4theblind@xxxxxxxxxxxxx>
  • Date: Thu, 24 Mar 2011 13:01:09 -0700

YOu can find the hint at the mac osx hints website. I don't have a link at the 
moment.



10.6: Create new AppleScript document Service

I got tired of copy-pasting AppleScripts I found online into the AppleScript 
Editor, so I made a simple Automator Service to do it for me.

Just launch Automator, choose new service (that receives text), add the Run 
AppleScript action and replace the script body with this:
on run {input, parameters}
  
  tell application "AppleScript Editor"
    activate
    if contents of document 1 is "" then
      set contents of document 1 to (input as string)
    else
      make new document with properties {contents:(input as string)}
    end if
  end tell
  
  return input
end run

Save it as 'New AppleScript Document with selection' or whatever name you 
prefer.

...

    
 

Other related posts: