Can AppleScript do this?

I’m trying to decide if I should start learning AppleScript. I have absolutely no experience with it, and very little with Mac in general. But I can be quite tenacious if I think I can do something, especially if it will take just a few weeks of reading/futzing around. I have some basic experience with PHP/MySQL (creating webpage-linked surveys, document libraries with administrative screens), so programming isn’t completely new to me (but I’m still an amateur).

Both ideas involve Quark 6.

  1. Importing tables
    Clients give us a spreadsheet with about a hundred worksheets, one unformatted (save merged cells) table per sheet. Each sheet is individually labeled with the corresponding text citation (e.g., T.1.3).

Right now, we have to draw a table box, select “link to external data,” browse to the file, select the sheet, deselect hidden rows, etc., and wait for it to finish importing. A little later, the process starts all over again. Lots of repetitive clicking, lots of downtime just waiting for Quark to process/import the table.

Could AppleScript automate this process? Even running a script that pulls each sheet into Quark will allow us to simply copy/paste between Quark documents, making things vastly simpler.

  1. Renumbering footnotes
    Three hundred footnotes. A call from a client. Numbers X,Y, and Z need to be deleted, the rest renumbered. Egad. All manually at the moment.

Could AppleScript help with this? Intuitively, I’d assign footnotes a particular tag (style? Variable?), and write a routine that slogs though adding one to a base count, but don’t know the power and flexibility of AppleScript, nor how easy an implementation like the above would be to do.

I’m not quite asking HOW to do this, but whether or not it’s something that a rank beginner can figure out in a few weeks—whether I should try and figure it out on my own or leave the programming to the professionals. (Of course, if there is a pre-scripted app out there that already does this, feel free to let me know!)

Thanks,

Rhythm

I don’t know how scriptable Quark is, which will make or break your first question. Applescript can handle files, and do basic data manipulation, but if you are trying to tell Quark to do something specific, it’s not going to work unless that function is scriptable in Quark. (Actually, there is a way around this sometimes, by using a feature called “UI Scripting”, which basically sends clicks to UI elements in an Application).
The second questions sounds easier - would you still do this from within Quark, or just process a text file?

Well, there’s an AppleScript Support Resources page on Quark.com, and its help files refer to AppleScript, so I assume there’s a fair amount of integration. The page, though, seems somewhat out of date. Is there a way I can tell how scriptable Quark is, or is that something I’d have to be AppleScript-savvy to begin with?

The footnote issue would be much easier if it was still Word-based, but by the time it gets this far in the process it’s already been laid out in Quark. Given the time involved for that, there’s no going back. How do I tell if certain Quark elements (I don’t even know what the manipulable things are called) can be passed back and forth with AppleScript?

You can use Script Editor to open Quark, and take a look at it’s Dictionary, which will have the Applescript elements in it.

Applescript is really, really cool, but it can be amazingly frustrating to use. The “English-like” syntax can be almost spiteful in it’s finickiness.