• 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: problems with scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with scripting


  • Subject: Re: problems with scripting
  • From: Vitaly Ovchinnikov <email@hidden>
  • Date: Sat, 13 Jun 2009 08:40:08 +0400

Yes, I read many of them and the command I created should work, as it
almost similar the one you described in your tutorial.
My suite seems to be correct as the property already works, but the
command still doesn't. Am I wrong with the command/suite or with the
script?

Thank you.

On Fri, Jun 12, 2009 at 11:20 PM, Matt Neuburg<email@hidden> wrote:
> On or about 6/12/09 11:21 AM, thus spake "Vitaly Ovchinnikov"
> <email@hidden>:
>
>> MyDocument is derived from NSDocument and has property sourceFile and method
>> - (id) handleDoSomethingScriptCommand: (NSScriptCommand *) cmd
>> {NSLog(@"got it"); return nil; }
>>
>> I wrote a simple script:
>> tell application "My App"
>> activate
>> make new document
>> set source of first document to "/some/path/here"
>> --tell first document to dosomething
>> close first document
>> end tell
>>
>> This works until I remove comments from the line that calls my method.
>> I receive an error that there is no variable "dosomething".
>> I tried another syntax: "dosomething first document" and received an error
>> too.
>
> Have you tried reading one of the many tutorials on how to make your app
> scriptable? Mine is here:
>
> http://www.tidbits.com/matt/scriptability/scriptabilityTutorial.html
>
> But there are many others, plus there's more info in my book. m.
>
> --
> matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
> pantes anthropoi tou eidenai oregontai phusei
> Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
> AppleScript: the Definitive Guide, 2nd edition
> http://www.tidbits.com/matt/default.html#applescriptthings
> Take Control of Customizing Leopard, http://tinyurl.com/2t9629
> TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
>
>
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: problems with scripting
      • From: Vitaly Ovchinnikov <email@hidden>
References: 
 >Re: problems with scripting (From: Vitaly Ovchinnikov <email@hidden>)
 >Re: problems with scripting (From: Matt Neuburg <email@hidden>)

  • Prev by Date: "Leaks" utility
  • Next by Date: Detecting text under mouse
  • Previous by thread: Re: problems with scripting
  • Next by thread: Re: problems with scripting
  • Index(es):
    • Date
    • Thread