Re: Interacting with Project Builder via AppleScript
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.