June 29, 2007
It's got an AppleScript dictionary!
Now...guys...why didn't you just say this in the first place? I wouldn't have been so quick to uninstall you.
Technorati Tags: AppleScript, Google Desktop Mac
Comments
Warning for Notes users: The commenting system uses HTML.I know this will be scary for some of you, especially Notes fans. However, open standards, rah-rah.
If you want to use less-than or greater-than signs, or other similar charachters that HTML reserves,
you'll simply have to learn to do it the HTML way. Luckily, HTML is kind of popular, no matter what
your re-educators have told you, and you can easily find help on the intertubes.
April 8, 2007
Sharing content between blogs in ecto
As most of you might guess, I've more than one blog in this world, and often, like to post the same things to multiple places. Unfortunately, most of the MovableType-to-other plugins I've seen and tried kind of suck. So I just hacked together a way to do it in ecto with AppleScript (Duh!):
tell application "ecto"
set theDocument to document 1
set theTitle to entry title of theDocument
set theBody to entry body of theDocument
set theCrossPost to make new document at beginning of documents with properties {current personality:"ecto account name", current blog:"blog title", entry title:theTitle, entry body:theBody, publish status:true, categories:{}}
set current blog of theCrossPost to "blog title"
end tell
This is pretty easy to read code, so I left off the comments. The only odd part is this line:
set current blog of theCrossPost to "blog title"
Which is necessitated by ecto's suboptimal blog listing facility. (It lists "personalities" and blogs as colon delimited text in one big string, with one line per entry. So no matter what initial blog you set it to, it's always going to pick the first one by default. So you have to re-set the actual blog. Annoying.) However, this is still better than manual copy and paste. I did post some of the issues with ecto's dictionary in the ecto forums, so we'll see what happens.
Technorati Tags: AppleScript, ecto
Comments
Warning for Notes users: The commenting system uses HTML.I know this will be scary for some of you, especially Notes fans. However, open standards, rah-rah.
If you want to use less-than or greater-than signs, or other similar charachters that HTML reserves,
you'll simply have to learn to do it the HTML way. Luckily, HTML is kind of popular, no matter what
your re-educators have told you, and you can easily find help on the intertubes.
March 8, 2007
Looking for an Acrobat Javascript Genius/PDFKit Genius
So, as some of you may know, I derive great pleasure in projects that not only solve a problem, but prove someone wrong.
My last one was showing that you indeed can create a structured PDF from an Entourage email message. It's a hack, and not the most elegant thing.
That's 1/4th of the Office suite
The acrobat team keeps saying you can't get Word/PPT/Excel to PDF conversions any better than what you have now, which is print to file with some preservation of internet URL links. I have a large set of AppleScript dictionaries in Office that say bullshit, it can be much better. So here's the thing.
I can handle the AppleScript side of things. Not as elegantly as the true geniuses, but I can get it to work in a consistent basis. What I'm no good at is Acrobat Javascript, (or anyone else's javascript for that matter. Yes, I have Dori's book, just no damned time). So if you're good enough at Acrobat JS to handle turning a dead document into a live structured PDF with live tables of contents, etc, or even better, can build that from AppleScript document data in PDFKit, let me know. I would LOVE to build a set of Office -> Structured PDF Macros for Office 2004, (and since they'd be based on AppleScript, they'd move into Office 2008 with little problem) for two reasons:
- It solves a real problem, one that Acrobat team refuses to consider, because they're all stupid about EVERYTHING MUST BE EXACTLY THE SAME, and since you can't do it with VBA on a Mac, they won't do it at all.
- It would stick a lovely finger into the Acrobat team's eye, and maybe push them to be a little more up front with the difference between "can't" and "won't"
But doing something that Adobe says "can't be done", (even though we know it's crapola)?
That's cool right there.
So if you have the skills and want to have some evil genius fun, and help a lot of people out, let me know, and we'll have us some fun.
Technorati Tags: Acrobat, Adobe, AppleScript, Microsoft, Microsoft Mac BU, TEH COOL
Comments
Warning for Notes users: The commenting system uses HTML.I know this will be scary for some of you, especially Notes fans. However, open standards, rah-rah.
If you want to use less-than or greater-than signs, or other similar charachters that HTML reserves,
you'll simply have to learn to do it the HTML way. Luckily, HTML is kind of popular, no matter what
your re-educators have told you, and you can easily find help on the intertubes.
February 20, 2007
Problem with Structured PDF from Entourage Message 1.0
Here's the problem with the script.
In some cases, based on:
- Acrobat Reader on your system
- What is the default PDF application on your system
First, the scripts both most definitely state Acrobat Professional. I've triple-checked those. However, the problem is one of what happens the first time the script runs. Depending on how your OS is set up, I think that AppleScript is saying "Oh, use the default application that matches the File Type and Creator Code", which unfortunately, can mean Acrobat Reader.
The problem seems to be that both Acrobat Reader and Acrobat Professional look almost the same to the OS. Let me illustrate:
These are the pertinent results for AppleScript's "Info For" on Acrobat Professional version 8:
- file creator: CARO
- file type: APPL
- bundle identifier: com.adobe.Acrobat.Pro
- kind: Application
- name extension: app
- short name: Acrobat
- displayed name: Adobe Acrobat Professional
- type identifier: com.apple.application-bundle
Now, for Acrobat Pro version 7:
- file creator: CARO
- file type: APPL
- bundle identifier: com.adobe.Acrobat.Pro
- kind: Application
- name extension: app
- short name: Acrobat
- displayed name: Adobe Acrobat 7.0 Professional
- type identifier: com.apple.application-bundle
Now for Acrobat Reader 8:
- file creator: CARO
- file type: APPL
- bundle identifier: com.adobe.Reader
- kind: Application
- name extension: app
- short name: Adobe Reader
- displayed name: Adobe Reader
- type identifier: com.apple.application-bundle
So now what to do? Well, I've filed a bug report with Apple and until I'm absolutely sure of what exactly is going on, I'm not going to change the code. For one, I'm not sure that there's much I can do to fix this. What I am not going to do though is rig up some fragile patch that may cause more problems than it solves.
There is however, a workaround that is reliable, and relatively easy. The line with the tell block that is getting repurposed is at line 233, and should read:
tell application "Adobe Acrobat Professional" for Acrobat 8 Professional or
tell application "Adobe Acrobat 7.0 Professional" for Acrobat 7 Professional.
IF you are getting this script trying to use Reader, open it up in Script Editor and look for that line. When you find it, change it so it lists the correct name for your version of Acrobat Pro. Save the script and quit Script Editor. As long as you have Acrobat Pro on your Mac, that will fix the script to only use the correct version of Acrobat Pro.
Once I come up with a proper fix, I'll post another article here letting you know.
Thanks for your patience, and I'm really sorry about this, especially because I'm not sure there's an easy fix.
Technorati Tags: Acrobat, Adobe, AppleScript, puppy
Comments
Warning for Notes users: The commenting system uses HTML.I know this will be scary for some of you, especially Notes fans. However, open standards, rah-rah.
If you want to use less-than or greater-than signs, or other similar charachters that HTML reserves,
you'll simply have to learn to do it the HTML way. Luckily, HTML is kind of popular, no matter what
your re-educators have told you, and you can easily find help on the intertubes.
February 14, 2007
New fun script!!
Structured PDF from Entourage 1.0 is out and available at: http://homepage.mac.com/jcwelch/structuredpdffromentourage.zip
I spent a bit of time with the readme, so do read it if you want to use it.
It's a "if I feel like paypalling john a five spot for this I might"-ware. I tried to get as many bizarre messages as possible with this. Spam filters are damned handy here.
I also included some sample PDFs so people can see the difference.
Yeah, I know, I don't write clever code. However, it works pretty well, and it beats the HECK out of anything from the OS *or* Acrobat 7 or 8. Unfortunately you DO need Acrobat 7 or 8 pro. It should work with Standard, but I've not a copy of that, so I don't know.
Anyway, if you want better PDFs from E'rage, this is one option. As always, many thanks and much love to Late Night Software and the Entourage team, past and present.
Oh yeah, thanks to the Acrobat team for ignoring AppleScript, otherwise I wouldn't have had the joy of spending as much time as I did on this.
ED: It's actually up to version 1.0.2...took care of some edge cases, and got a nice speedup by dumping more of the text munging out to the shell. Look here: http://www.versiontracker.com/dyn/moreinfo/macosx/31901 for the current version
Technorati Tags: Acrobat, Adobe, AppleScript, Mac OS X, Microsoft Entourage, Microsoft Mac BU
Comments
Warning for Notes users: The commenting system uses HTML.I know this will be scary for some of you, especially Notes fans. However, open standards, rah-rah.
If you want to use less-than or greater-than signs, or other similar charachters that HTML reserves,
you'll simply have to learn to do it the HTML way. Luckily, HTML is kind of popular, no matter what
your re-educators have told you, and you can easily find help on the intertubes.

