Re: problems with scripting

2009-06-13 Thread Vitaly Ovchinnikov
Finally fixed it, thanks to sdp. The problem was with the command code that should has 8 characters. Mine has 4. Now all seems to work. Thank you. On Sat, Jun 13, 2009 at 8:40 AM, Vitaly Ovchinnikov wrote: > Yes, I read many of them and the command I created should work, as it > almost similar th

Re: problems with scripting

2009-06-12 Thread Vitaly Ovchinnikov
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,

Re: problems with scripting

2009-06-12 Thread Matt Neuburg
On or about 6/12/09 11:21 AM, thus spake "Vitaly Ovchinnikov" : > 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 Ap

Re: problems with scripting

2009-06-12 Thread Vitaly Ovchinnikov
Hello Matt, I finally did something using the following suite definition:

Re: problems with scripting

2009-06-12 Thread Matt Neuburg
On Fri, 12 Jun 2009 14:45:48 +0400, Vitaly Ovchinnikov said: >Hello, > >I completely stumped with allowing my application to be called from >apple-script. After reading of apple docs, I added simple sdef file >and two keys to info.plist. Sdef file contains only standard suite and >nothing added by

Re: problems with scripting

2009-06-12 Thread Arjun SM
>>My application has opened documents, but script returns "can't get name of document 1". i think you should change your Applescript. tell application "MyApp" end tell is the one that you have mentioned in the .Sdef file . In your Xcode when you click on the Sdef file , check

problems with scripting

2009-06-12 Thread Vitaly Ovchinnikov
Hello, I completely stumped with allowing my application to be called from apple-script. After reading of apple docs, I added simple sdef file and two keys to info.plist. Sdef file contains only standard suite and nothing added by me, but even with this I can't run the simplest script like this on