• Please review our updated Terms and Rules here

Did MacOS ever have any sort of scripting ability?

Chuck(G)

25k Member
Joined
Jan 11, 2007
Messages
44,954
Location
Pacific Northwest, USA
Here's the situation--I've got a lot (>400) Adobe Persuasion files to convert to PDFs. Right now, I can do this one file at a time (open file, export, close under Persuasion 4.0). I'd like to automate the process. Is there any way to do this? Is there an ability scan through a volume and section out files of a certain type?

I'm using MacOS 8.5.
 
My mind starts to wonder into what you could do with the HFS (presumably) volume on other systems, i.e. Basilisk II or HFS Explorer. But if you could script it within Basilisk you could script it on the machine, though, probably infinitely faster in basilisk.

https://en.wikipedia.org/wiki/AppleScript might do the trick though either way.
 
DeBabelizer was popular for batch conversion, but AppleScript or Frontier might be a good scripting solution.

The immortal GraphicConverter would be good for images, but I doubt it handles Persuasion or PDF.
 
On Sheepshaver, I'm mounting the volume as a second hard disk.
I'm reading the AppleScript description for OS 8.5. Right now, it's as clear as mud.

 
I'm reading the AppleScript description for OS 8.5. Right now, it's as clear as mud.
I used AppleScript quite a bit back in the day to automate things. The easiest way to get a handle on the language is to use the recording capability, do your actions by hand, and then read the script that gets auto-generated. The AppleScript language is quite obtuse and a bit weird, but once you get the handle of it is very powerful. It's also quite buggy, as it's never been all that well supported. That said I saved thousands of hours automating stuff back in the day.
 
The current OS has an app called 'Automator'.
It's been in there for quite a while, but I've never used it.

smp
 
Well, here's what I want to do:
  1. Scan a volume for files of type "Adobe Persuasion"
  2. Open each file in Persuasion 4.0
  3. Export the file to PDF, using a name derived from the original (Persuasion uses "untitled 1.pdf" for the default. Export will be to the shared /UNIX volume
  4. Close the file without changes
If I were doing this under DOS or Linux, this would be simple. How do I go about this in Applescript?
 
Here's the situation--I've got a lot (>400) Adobe Persuasion files to convert to PDFs. Right now, I can do this one file at a time (open file, export, close under Persuasion 4.0). I'd like to automate the process. Is there any way to do this?
You need to find out if Adobe Persuasion is scriptable. If you have the manual, check it and it may say so. In any case, you can open the AppleScript Script Editor application, then from Editor, open the Adobe Persuasion application as a scripting dictionary.

If you find that Persuasion has a script suite, then you may be in luck, and be able to write an AppleScript to automate making PDFs.
 
It looks like the version 4 CD at one of the usual repositories says it's for MacOS and Windows. Perhaps you could use the windows version instead?
 
I'll have a look. FWIW, Finder only identifies the files as type "Document", which isn't terribly helpful.
Otherwise, it looks as if I have to do the 400+ files manually.
Reinforcing my opinion of why I'm not an Apple fan.

The distro CDs that come with Persuasion include both Win32 and MacOS versions. Predictably, files created with either type are not recognized by the other. Windows files are of type .PN4 and look very different internally from the MacOS version.

I'm hoping that someone can disabuse me of this opinion.
 
Yeah, it looks like you are right. They don't seem to support each other's files:

In the techinfo document on the CD is says this:

"To transfer Persuasion 4.0 presentations to another platform, you save files from Persuasion 4.0for the Macintosh or for Windows in Persuasion's interchange file format, which both Persuasion 4.0 for the Macintosh and for Windows can open. The interchange file format supportsonly those features supported by both Persuasion 4.0 for the Macintosh and for Windows.Features supported by Persuasion's interchange file format are detailed below"
 
In my case, I use the same "export" dialog to save them as PDFs.
Persuasion was an old Aldus project, which Adobe decided wasn't worth continuing, in light of the prevalence of Powerpoint. While Persuasion can import Powerpoint files, it can't go the other way.

Is this one of those "You can't get there from here" Apple-isms?
 
Last edited:
Here's the situation--I've got a lot (>400) Adobe Persuasion files to convert to PDFs. Right now, I can do this one file at a time (open file, export, close under Persuasion 4.0). I'd like to automate the process. Is there any way to do this? Is there an ability scan through a volume and section out files of a certain type?

I'm using MacOS 8.5.
So here is one of the AppleScript guides: https://archive.org/details/apple-script-language-guide/page/n2/mode/1up

What you would do is, you would start the AppleScript dialog thing (I forget what it is called) which shows up in the Finder menu across the top. Then, start Persuasion. Then, go back to the Finder and there is a method by which you can see if there are "verbs" that Persuasion makes available.

From there, you would have to figure out the AppleScript commands, something like (this is not the actual AppleScript)
Tell app Persuasion
Open myfilename
ExportAs myfilename.exported.pdf type PDF

etc. Of course you will want to loop over the filenames instead of doing it one by one.

If that DOESN'T seem to be possible, there are multiple hotkey / macro tools out there that might be able to drive Persuasion. I would suggest a combination of Googling, plus looking at old Mac magazines either at archive.org etc. plus, seeing what you can find at macintoshgarden.org - there is OneClick and probably others. Maybe a search for "macro" would turn up both forum and software info?
 
Nice thought, but when I drop the Adobe Persuasion application icon onto the Script Editor I get the message "Could not read the dictionary of the application or extension because it is not scriptable". So batting 000 there.
When I use the Script "Record" function, the only thing recorded is the selection of the file.

Did MacOS 8.5 have any sort of remote command facility, like telnet?
 
Last edited:
There was a telnet server but I am not sure what kind of commands you could run in it.

Adobe Persuasion was kind of a weird beast in that Adobe bought Aldus (original makers of Persuasion) and then killed off a lot of their products: https://adobe.fandom.com/wiki/Adobe_Persuasion .

You can run emulated MacOS 8 in a web browser: https://osxdaily.com/2020/07/29/mac-os-8-emulator-macintosh-js/ and could probably add in Persuasion and your files, somehow.

Basically what you need to do, is download a few of the Macro-helper tools that were made, record a keyboard macro, then figure out how to make it in a loop (in some cases you may be able to drag and drop a bunch of selected files on top of the macro you have created). Don't know if this would be a good one to test or not: https://macintoshgarden.org/apps/quickeys-353 .

You can also check out MPW (Macintosh Programmer's Workbench) which gives you something resembling a "csh" interface. Whether it can send keys to applications (probably it can) or not, you will have to research.

Once you have it fully debugged with one file at a time, then, there should be a way to apply it to multiple files.
 
I remember that Aldus has the killer app at the time for Mac, PageMaker. At the time, preferred over any of the PC tools.

With only 400 files, it's probably easier to knock them off one at a time, rather than immerse myself in Classic OS arcana, which will be promptly forgotten.
 
I remember that Aldus has the killer app at the time for Mac, PageMaker. At the time, preferred over any of the PC tools.

With only 400 files, it's probably easier to knock them off one at a time, rather than immerse myself in Classic OS arcana, which will be promptly forgotten.
That is understandable, I would try one of the keyboard-macro tools and if it worked within 5 minutes, great; otherwise put on some music or a TV show and waste an hour 😁
 
Reinforcing my opinion of why I'm not an Apple fan.
Well, Apple makes the most user-friendly products in the world. So if you're having a problem with any Apple product, it's clearly a problem with you, not Apple. Surely you do not dare to question the wisdom of Steve Jobs!

With only 400 files, it's probably easier to knock them off one at a time, rather than immerse myself in Classic OS arcana, which will be promptly forgotten.
There you go! Now you're getting the idea! All hail user-friendliness!
 
The Mac Telnet servers I encountered mostly were ways to access the MPW Shell remotely (basically a hack to inject remotely-received commands into ToolServer). That probably wouldn't be too helpful here.
 
It's also complicated by the fact that Persuasion insists on using "untitled 1.pdf" for exported files, unless corrected manually. Not a lot of thought--one would think that it would use the name of the original source file as basis. Thrown-together non-scriptable piece of trash--when it works. (I've had cases where it could get to the postscript file and then bomb out).

I'm using Persuasion 4 because of the export capabilities on 2.1 files. I suspect that the original 68K 2.1 was even more limited.
 
Back
Top