Automators 3: Converting Numbers Sheets to Keynote Graphs with Sal Soghoian

4 Likes

A big thanks to @Sal for being our first guest!

5 Likes

@rgottlieb on Twitter said:

AppleScript was one of those languages that I wasn’t sure about learning myself, after all, it has a limited use case, doesn’t it? But it has been so useful that I actually use it more frequently than some other programming languages I know!

1 Like

Great show, guys, thank you!

I was in attendance with David at Macworld all these years ago for the 2-day AppleScript bootcamp Sal was facilitating. His passion for the topic was — and still is — infectious.

In case you’ve experienced an issue with opening the Table to Keynote Chart.scpt file that Sal gave us (I did), follow these steps:

1.Navigate to Sal’s special Automators page
2. About halfway down the page, where the script is displayed, click on the “Edit Script” button and when asked, select “Allow” to open the uncompiled script in Script Editor. Then — and because we’re automators that probably use keyboard shortcuts, too — type Command-K to compile the script and save it.
3. Say “Woot!”

1 Like

One more thing I wanted to add for those interested…

As you listen to this episode and Sal’s breakdown of the code and what it does, you can add multi-line comments right in the script’s window by enclosing your notes inside (* and *) for an easy, inline step-by-step explanation of the various parts of the script. Six or twenty-six months down the line, you’ll be glad to have these comments. :slight_smile:

Have a great rest of your weekend, everyone.

3 Likes

This was a great introduction to Applescript. The Script Debugger is a real improvement on the standard editor. Agree with David that playing with AppleScript will take you down a real rabbit hole, to a new world like Alice found!

3 Likes

Thanks @JFBmusic!

I was having a problem with that script. The other two ran straight out of the box.

Your solution fixed it. Would I have achieved the same result by editing the script I downloaded in the zip file and re-compling it? (I am new to scripting).

Thanks again!

Steffan

Hello @steffan,

Glad my solution helped. As it turns out, at least in my case, the .scpt file for that script (Table to Keynote Chart) seemed corrupted and I couldn’t open it. That’s what led me to that workaround.

Welcome to scripting!

Jean-François

1 Like

I am new to AppleScript. I downloaded the three scripts Sal (Big thanks Sal!!) sent, but I cannot get them to open in AppleScript editor. I have tried option pulldown from the tool bar and I have navigated to the library from File>Open and nothing happens…

Any advice is appreciated.

Phil

Let’s figure this out together!

Which version of macOS are you using?

  1. Did the scripts correctly install into the Home > Library > Scripts > Applications > Numbers script folder?

  2. Do the scripts appear in the Script Menu when Numbers is the front application?

  3. Hold down the Option key when selecting a script from the Script Menu. That should open the script for editing.

2 Likes

Check out this related script or generating a pie chart in Keynote for either the selected row or column in Numbers. And if you go to the bottom of the page you can see the script turned into a Touch Bar Quick Action for macOS Mojave!

https://iworkautomation.com/numbers/keynote-pie.html

1 Like

This episode was a great listen, I’m going to get into it in detail tomorrow with my MacBook and give some of this a try. As a scientist, I’m CONSTANTLY working with data, and have been storing it in Numbers, then transfer that data to statistical software, presentation slides, etc. It just never occurred to me that I could set things up so easily until this episode. Really powerful stuff!

1 Like

Ah… Is there any way we can remotely attend Sal’s cmd-d conferences / masterclasses ?? I’d be glad to pay for an interactive feed? @Sal @RosemaryOrchard
I love the cmd-d videos, but as a European it’s just too far to travel to attend.

I know there’s an electronig pass for cmd-d, but I only need the videos (way) after the conference.

I would love to attend cmd-d this year but timing won’t work out. Hopefully in the future. I have to agree, Sal’s passion alone makes me want to learn AppleScript!

2 Likes

Always great to hear @Sal on anything!

You guys mentioned the wonder Script Debugger app for creating and editing AppleScript. There is nothing better! Get it, if you want to get into AppleScript.

I just wanted to pipe in some serious love for an app called UI Browser that is a magnificent tool to go along with Script Debugger. UI Browser saves you HOURS of time by allowing you to start with clicking a button or check box in an app, then seeing the app hierarchy of where that element falls so you can script it..

It’s hard to explain how incredibly useful this is.

Let’s say that you want to see if a particular box is checked (or check it) in Handbrake. How on earth do you know what element is or how to script it? Easy. Open UI Browser, go click on it, copy code into Script Debugger or Keyboard Maestro or whatever. Done

Did you hear that? UI BROWSER WRITES THE APPLESCRIPT FOR YOU!

Here is a video that shows this in action.

So awesome for beginning scripters to get going!

A couple things to know about UI Browser as a heads up:

  1. It’s $55. Not cheap, but SO worth it if you really want to get serious.
  2. The website is horrible. Like 1994 horrible. Just let that go.
  3. The app itself isn’t that pretty. Get over that to. It literally generates magic for you.

Just a helpful heads up to those wanting to get going into scripting after listening to this episode. Script Debugger and UI Browser are the essential tools.

Thanks MacSparky and @RosemaryOrchard for this great podcast.

3 Likes

I’m having the same issue. I run the installer and select the folder you suggested, and then I get this:

I assume this is user error?

Thank you very much for this great podcast.

All three of you: David, Rosmary and Sal have already done so much for the Mac, it is a pleasure to follow you from here in Switzerland. Please go on…

1 Like

Just to check, you are running it as a user with administrative privileges?

Yes. crisis averted. I took JFBmusic’s suggestion and saved the script from the web page, and then opened the numbers and keynote files from the zip. all good!

1 Like

Great third episode! You don’t give yourselves enough credit for how listenable this is in the car! Of course, I will have to go back over everything once I am in front of a computer, but the general principals were clear, and Sal is one of the first people I have heard teach AppleScript who actually understands how to break down the concept for a first time beginner.

My first question is - How is everyone here launching AppleScripts? I can’t imagine you go to all this trouble to automate these actions, to have to locate the script, launch the Script Editor, and Run. What are some of the best ways to launch scripts once written?