Using the "of me" part at the end is just something I've used to call 
functions in the same file that are outside of the "tell application" block 
that I'm currently in. I've not used the "my" keyword like you were using.

Doing a quick AppleScript keyword lookup 
(https://developer.apple.com/library/mac/#documentation/applescript/conceptual/applescriptlangguide/reference/ASLR_keywords.html)
 
shows the two are synonyms so it would have had the same effect.

-Kendall



On Wednesday, November 28, 2012 8:02:00 AM UTC-5, Jason Brown wrote:
>
> Well, I believe this was me saving the file in the wrong location. 
>  I originally save the file in ~/Library/BBEdit/Scripts.  Not sure if I was 
> looking at old documentation or what.  After saving the script to 
> ~/Library/Application Support/BBEdit/Scripts it appears to work fine.
>
> Kendall, can you explain your comment in case I run into something else. 
>  Thanks.
>
> On Tuesday, November 27, 2012 12:28:55 PM UTC-5, Jason Brown wrote:
>>
>> Someone was kind enough to put this script on git to send a selection from 
>> BBEdit to OmniFocus.  The script works fine if I run it from Apple Script 
>> Editor, but if I run it from BBEdit I get the following error message.
>>
>> A scripting error has occurred: <script> doesn't understand the makeOfTask 
>> message.  Complete noob here so any advice is greatly appreciated.
>>
>> tell application "BBEdit"
>>      set _sel to the selection
>>      set _lines to lines in selection
>>      set tasks_added to {}
>>      repeat with _line in _lines
>>              if length of _line is not 0 then
>>                      my makeOFTask(_line as text)
>>                      set end of tasks_added to _line as text
>>              end if
>>      end repeat
>>      my growlNotify(tasks_added)
>> end tell
>>
>> on makeOFTask(_text)
>>      tell application "OmniFocus"
>>              tell default document
>>                      parse tasks with transport text _text
>>              end tell
>>      end tell
>> end makeOFTask
>>
>> on growlNotify(tasks_added)
>>      set _count to length of tasks_added
>>      set AppleScript's text item delimiters to return
>>      set tasks_added to tasks_added as text
>>      set AppleScript's text item delimiters to ""
>>
>>      tell application "System Events"
>>              set growl_running to (count of (every process whose name is 
>> "Growl")) > 0
>>      end tell
>>
>>      set subj to (_count as text) & " Tasks Added"
>>      set msg to tasks_added
>>
>>      if growl_running then
>>              tell application "Growl"
>>                      set the allNotificationsList to {"Tasks Added"}
>>                      register as application "OF-BBEdit" all notifications 
>> allNotificationsList default notifications allNotificationsList icon of 
>> application "OmniFocus"
>>
>>                      notify with name "Tasks Added" title subj description 
>> msg application name "OF-BBEdit"
>>              end tell
>>      end if
>>
>> end growlNotify
>>
>>

-- 
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>



Reply via email to