AppleScript: what do you want to see in the Scrivener Suite?

Thanks all for feedback. AppleScript is now unlikely to make it into anything like 1.1 and probably will, after all, be held back until 1.5 or 2.0. Further investigation has revealed just how much work this would be - too much for the time being, unfortunately. Still, I will keep this thread open and use it for reference when the time comes.

Oh, and you are all banned from mentioning Leopard. Apple’s refusal to make the WWDC beta available to paying ADC members (despite the fact that pirates can already download it as a torrent) makes me so mad that I can’t actually name the spotted cat without spitting venom. :imp:

Best,
Keith

Now, I just don’t get that. Assuming, as I do, that just about every corporation out there is bent on one thing and one thing only - making money - this whole thing still just doesn’t make sense. Withholding that beta from developers isn’t going to make Appleany money, not that I can see, and it wouldn’t hurt them at all to make it available. I’m just not seeing the reasoning behind the whole thing. If there’s no benefit to them, why is it happening? Doing such a thing on purpose will only make people mad. Is there more to this that I’m not understanding here?

/me injects precautionary anti-venom

Here is my outsider, unsubstantiated, unfounded, and completely clueless guess: They rushed a beta distribution out for WWDC attendees which may or may not be stable enough to push out to all ADC members. They are probably collecting initial bug reports from the recipients right now, but are unable to fully act on them because–as we all know–the L*@pard team is gutted and on the iPhone project which goes mainstream in a little over a week. Firmware work can be done up until a much later date than fabrication work, so I wouldn’t doubt they are pushing long hours on that project.

So once again, I curse the iPhone as the bane of Leo&ar!.

I’m afraid for once, AmberV, your reasoning doesn’t hold. You forget that those of us who have paid for ADC membership are already running older, less stable Leopard seeds. I’m running a seed from two months ago to develop Scrivener (it has to be linked using the latest version of Xcode to run on both Leopard and Tiger) and Xcode crashes on me regularly.

And I’ve already moaned elsewhere how the Leopard Early Start Kit page actually advertises access to the “latest” versions of Leopard, so really, there is even a case for dodgy advertising here, too. Nope, I am really, really angry about this. It is Apple at their worst.

Best,
Keith

It’s been a while since anyone posted to this topic - I suppose you’ve got the latest Leopard seed by now though (I hope!)

My question is when will Scrivener be available for Leopard, given it smells like the cat is close?

My trial expired just as a few other more immediate expenses piled up, but I do plan to buy in about a month (I really miss the program!) so I’m wondering about your Leopard timing? Any comments you can make?

Oh, and in the meantime (after you put up your Leopard version but before I can afford it!), will you be updating your site with nice-looking screenshots, so I can know what I’m missing out on? :slight_smile:))

Hi,

The beta in the Beta Testing forum is Leopard-ready. The 1.09 beta will be out in a day or two, then 1.1 will be released officially before Leopard hits the shelves (unless Apple just drops it on the shelves without announcing it). The site will be updated with new screenshots at the same time as 1.1 comes out.

And by the way, the 1.08 beta in the Beta Testing forum restarts the trial and gives you 30 days of actual use, so you can continue using the program for a while longer if you download it. :slight_smile:

All the best,
Keith

Thanks, I downloaded it and it looks great!

It’s even better than I remember from a few weeks ago.

Definitely on my “buy” list.

I just got my first Mac, and saw the plug for Scrivener on Slashdot, so I gave it a try. It looks GREAT. The first thing I thought after running through the tutorial is how this would help in writing blog posts. The research and link collection features would be helpful, and if the posts are all collected in Scrivener, it would make selecting certain ones and merging them into a book (someday) really easy as well.

I’m not familiar with Apple script (yet), but I’m guessing the uploading could be automated if there is script access to the files in the binder and the file metadata, especially status, so the script could know what articles and associated files (images, etc) need to go up. The ability to add arbitrary custom metadata fields would be very helpful to this as well. I think this feature would be inappropriate for the main program, but very doable with AS/Cocoa given the right interface exposure.

AUTOMATOR SUPPORT
developer.apple.com/macosx/automatormarket.html

developer.apple.com/documentatio … mator.html

macdevcenter.com/pub/a/mac/2 … mator.html

spiderworks.com/books/automator.php

Am I the only one who doesn’t know what AppleScript or Automator are for?

Nope. I say that as someone who does know, but who has provided others a longwinded and meandering answer several times lately. It all boils down to providing you the ability to extend, automate, or combine various components of your system. When you need to use either, they will suddenly start making sense.

At least I think it all boils down to that.

I’d love to see robust Applescript support. Of the mac word processors I think Pages has the best Applescript support – I’d look at the Pages dictionary for an idea of the possibilities.

To give an example of its advantages – Jim Harrison has been able to write a BibDesk (BibTex-focused bibliography manager) for Pages using Applescript – jhh.med.virginia.edu/main/CiteInPages. I thought about doing the same thing for Nisus Writer Pro & realized that NWP’s Applescript support is pretty limited, with not much more than TextEdit and developers who are focusing on a proprietary Perl-based macro language instead of Applescript (don’t get me started on that…).

I would expect that Pages would have the best AppleScript support given that it is written by Apple themselves. :slight_smile: The trouble is that Pages isn’t really comparable to Scrivener, as Scrivener isn’t a straight word processor. There are a thousand other commands you would need to control the binder and stuff too…

I’m hoping to look more at AppleScript support after the next update, though.

All the best,
Keith

Think of Applescript as a way to automate multiple applications and you’ve got what you need to add as a minimum. For example, I think of Applescript more in terms of what I want to DO than what functionality a specific application would have. One I know what I want to do, then I can determine what to add to an application.

For example:

  1. I’d like to be able to automate the whole process of collecting and moving a draft into a word processor and them imposing some standard template to it for my publisher. On the Scrivener side, I’d need to be able to select all of the draft documents, assemble them, then export them (I’m assuming I understood all this in the tutorial, so forgive my ignorance if I’ve got something wrong). You can see the need … one the file exists, Applescript can handle the rest from there as long as my target application can handle the other parts.

  2. I’d like to be able to automate producing a sample chapter as part of a proposal so I can collect all the stuff I need to get to an agent or publisher formatted appropriately. Again, the formatting can be handled by the Word Processor or layout program, that’s not your issue, but choosing the draft elements, assembling them, and passing them out to the word processor are your parts.

  3. I’d like to be in a word processor or online web surfing or somewhere else and be able to hit run a script that would take some element (say a web page) and insert it into a Scrivener project under the appropriate research heading without having to run Scrivener directly. Apple script will allow me to automate things like that if the applications I’m using allow it.

Here’s a specific task I’d like to be able to do with Applescript.

With text selected, 1. copy the selection, 2. create a new document in a folder called Cuts, 3. paste the selected text in the new document, 4. set the synopsis of the new document to the first 20 words of the selected text, 5. delete the selection from the source document.

I do this all the time with stuff that I want to cut but keep around - it would be great to automate it. Steps 1, 3, and 5 are all doable with Applescripts core language features. So what’s needed from Scrivener is a way to create the new document and make its body and synopsis available as a target for pasting, and to switch back to the source document.

That’d be awesome!

What Derick said. Good idea.

ps

Actually, you do not have the ability to do step 3 via Applescript unless you mean invoking the menu Paste function. But you would not want to have to do that in your script (because it means changing what is in an editor window, etc.). Rather, you would just want the ability to get and set the contents of a document’s body and synopsis.

Another, related application would be to loop through every folder and document within a source folder, and create a corresponding empty folder in a new folder.

e.g. one could start with

Drafts
…intro
…body
…part one
…part two
…conclusion

run the script on it and create a new folder hierarchy with a root folder Cuts

Cuts
…intro
…body
…part one
…part two
…conclusion

Alternatively the actual program flow could be to duplicate the source, then set the text of each document/folder in the target to be blank.

To accomplish these sorts of tasks in Applescript all that would need to be supplied in the Applescript Suite by the application is the ability to get and set the contents of documents together with the ability to interrogate the binder list and create new folder/docs in it.

From the Suite perspective, this is just to supply language for addressing oneself to the basic scrivener objects–no scrivener-specific functions would yet be involved.

I guess making an app Applescriptable can be hairy, but when Applescriptability comes to Scrivener, the kinds of procedures you are imagining require only basic access to Scrivener objects, it seems pretty well assured they would be possible.

–Greg

Here’s another problem I’d like to solve with Applescript. I have a document in which footnotes are currently in the text, with FN: at the start of the paragraph. I’d like to loop through each paragraph in the document, and if it begins with FN:, delete the text FN: and convert the paragraph to a Scrivener footnote.

More food for thought.