• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Interacting with Project Builder via AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interacting with Project Builder via AppleScript


  • Subject: Re: Interacting with Project Builder via AppleScript
  • From: Philip Aker <email@hidden>
  • Date: Mon, 26 Aug 2002 19:21:33 -0700

Hello Angela,

You will have to use a combination of Keyboard Maestro (or some other utility that can post key commands) and AppleScript and/or shell scripts. If you search the archives of this list for the topic "scripting mail" for posts by David Meieran and myself you will find explanations on how to do this (by a choice of methods). The Cocoa frameworks currently don't have a clue about Cut/Copy/Paste or dealing with "the selection". BBEdit implements it's own convenient scripting commands and doesn't rely on Cocoa frameworks for its AppleScript.


Regards,

Philip Aker


On Sunday, August 25, 2002, at 11:02 PM, Angela Miro wrote:

Hi,

I have been trying to get a simple apple script going with the editor in Project Builder to grab a selection of text modify it and paste the modified text back into the active selection in Project Builder. I am using MacOSX Jaguar 6C115 with the standard Developer tools of Jaguar installed.

I can achieve this with BBEdit 6.5 but I am having problems with Project Builder. Here is the script which I am using which works with BBEdit:

tell application "BBEdit 6.5"
activate
get selection as text
copy result to tempString
set shellResult to do shell script ("python /Users/angela/bin/simplescript.py \"" & tempString & "\"")
set text of selection to shellResult
end tell

However if I modify the above script and instead 'tell application "Project Builder"' I get the following error:
Project Builder got an error:
NSCannotCreateScriptCommandError.

Even simpler scripts seem to fail with Project Builder. Can someone tell me what am I doing wrong?

Thank you,
Angela

Philip Aker
http://www.aker.ca
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Interacting with Project Builder via AppleScript (From: Angela Miro <email@hidden>)

  • Prev by Date: Converting Date?
  • Next by Date: Re: Moving Mail....
  • Previous by thread: Interacting with Project Builder via AppleScript
  • Next by thread: OE reply to list
  • Index(es):
    • Date
    • Thread