Swift with Cocoa Applescript

Using Swift with ApplescriptObjC and Cocoa-AppleScript.

Seems like a nice tutorial although I’ve not tried it yet. (Quite busy) I’d tried to get this same thing working during the summer and never did. Maybe I’ll give it an other whirl. It’s pretty close to what I tried. Effectively you’re mixing the old way to mix Applescript and ObjC together and throwing a little Swift in the mix.

I think Swift would be a fantastic replacement for Applescript if there was a simple non-convoluted way to run scripts. Something on par with Python + Appscript. (What I used to use for all my scripting)

I should note that I’ve tried using Apple’s Javascript replacement for Applescript. However I do a lot of GUI scripting in most of my scripts and for some reason Javascript didn’t like some of those GUI objects. 

Multi-Item Edit

The more I use iTunes 12 the more I find equal parts annoyance and happiness. There are a lot of little UI fixes I wished they’d done years ago. Yet, continuing the process started by iTunes 11, heavy tagging by power users has become more difficult. In particular using the Get Info window to tag numerous files with the same tag no longer works. Fortunately Multi-Item Edit from Doug’s AppleScripts comes to the rescue. This gives you a window akin to the old school Get Info window to make batch changes in iTunes.

Continue reading

iTunes 12

Tidbits has a good post on iTunes 12’s interface.

I don’t think it’s as bad as some. But let’s be honest. 11 was a huge step back from 10 — not the least of which was losing multiple windows. I like how they’ve cleaned it up compared with 11. That said I don’t understand why they changed some things and left long standing annoyances. If you’re going to change the Get Info window as much as they (and it looks fantastic) at least get rid of its modal behavior. There are several annoying bugs such as several of my TV shows not having artwork show up properly. I’m sure they’ll fix that quickly though. My biggest complaint is that several tagging apps like Identify stopped working with it.

Dial Daylite Number

One of the things I was excited for in Yosemite was dialing numbers on my iPhone from my Mac. In particular I really wanted my CRM app, Daylite, to support Yosemite dialing. Unfortunately it doesn’t. You can still only call via Skype or Dialectic.

To fix this I wrote a quick little script that utilizes Yosemite to dial the current number. I’ve been trying to move away from my traditional Appscript + Python to do my scripting since Apple script isn’t supported anymore. So this is pure Applescript with all the pain that entails.1 

Since this involves GUI scripting it’s a lost cause trying to explain it too much. Basically it just checks to see if the view is in Company mode or People mode and gets the phone number from the associated UI element. It checks the mode by looking at the value of the button on the top of the window. When you’re in Company mode it’ll say “New Company” and in People mode it’ll say “New Person.” I use a “try” block so it doesn’t fail in an ugly way if you’re in some other mode.

It’s not perfect since you can have a pop up person when in Company Mode. I’ll probably add that condition in later if I find the time.

Continue reading

  1. I actually tried to do it in Javascript but Apple’s Javascript doesn’t work well with UI scripting. At least I couldn’t get it to function correctly for getting values.

A Long Time Coming

Against my better nature, let me make some predictions for next week’s Apple event. I had low expectation for the iPhone event because most was pretty easy to figure out months earlier. The only surprised was Apple Pay but that didn’t really excite me much. This event, even though it’s not as “big” as the iPhone event seems much more intriguing.

First off and much to my surprise, it seems like retinal iMacs are coming. I had not expected them before ’15.1 There’s enough smoke around the 27” that I think it’s fairly sure there’s fire. That surprises me. I had thought the 27” would be the last one to get retinal. Rumors are the 24” won’t get it at all. I’m not so sure. A lot depends upon pricing. Somehow I can’t see a 27” retinal iMac price matching the current 27” iMac. A 24” retinal iMac might be more affordable for those who want retinal in a desktop. On the other hand a $5000.00 27” iMac is pretty doable – more so than perhaps a $3000.00 24”. 

Continue reading

  1. That might still be the case. The 2012 27″ iMac, which I own, didn’t end up becoming available until January. I got mine in April. It’s still a fantastic machine. One of my favorite Macs of all time. But they might announce the retinal iMac and not have it appear until as late as February.

Problem of Yearly Releases

Gigaom has a good post on the problem of yearly releases. iCloud drive is a mess since there’s not a simultaneous Yosemite and iOS8 release. Honestly though the signs of change are there. With iOS8 there are major changes coming with 8.1 (Apple Pay) and then large 8.2 and 8.3 releases. (One of which will be the watch release) Ideally we’d stop syncing phone releases with the major OS release.

Ideally we’d have WWDC in March and then the iOS release in August and the phones released the end of September but with major releases – 3 or 4 – throughout the year with major features that don’t require a lot of developer work to integrate. Heck, remember the year OSX’ new release was announced in January with betas in February? We need more of that.

The other thing we need is something akin to Snow Leopard again. Those of you who’ve been using Macs a long time remember that was the release that didn’t add many, if any, noticeable features. But it did clean up all the internal code.

Continue reading

Bending Phones Aren’t New

Bending phones aren’t new. “Any phone made of metal is still subject to the laws of physics, but to reiterate that this isn’t exactly a problem exclusive to the iPhone 6, here’s a look at other Android and Apple phones that have bending problems.” 

People keep buying the 6+ and then are surprised that it acts like a 5.5″ device. Yet not one would sit on an iPad Mini at an angle and be shocked that it bent or broke.

If people want pocketability petition for the return of the 4″ iPhone.

On Extensions

Probably the most exciting feature of iOS81 is Extensions. Right now there are only a few extensions. They also are far more convoluted to set up than they should be.2 The ones I’m using are the 1Password extension and the Instapaper extension. They finally let me use those apps from Safari on iOS the way I could on OS X. I’d actually stopped using Instapaper as much just because of hassles. I’m starting to put it back into my workflow more.

As excited as I am about extensions on iOS8 I might be even more excited once OS X starts using them as well. It seems to me that telephony should become extremely powerful on OS X given a combination of Hand Off and Extensions. I’m really looking forward to OS X apps dialing a number using my iPhone.

Now I’ve not looked up on this in too much detail. There have well complained about bugs and limits developers have encountered. This is a functionality I’ve wished OS X had since the iPhone was first introduced years ago. Too bad it took so long.

  1. Beyond Siri actually finally recognizing my voice. If you’d given up on Siri give it an other try.
  2. I’d be completely shocked if the interface isn’t significantly simplified in iOS9.

Set Recipient & Sender in Mail

Surprisingly Applescript in Mail has a ton of weird limitations that haven’t been addressed in years. For instance the only way to script much of anything in an active compose window is via GUI Scripting. The following quick script sets the recipient and sender of your message.1

I use this with a philosophy mailing list I belong to. For some reason the “reply to” fields aren’t set right by the listserv software. But if I type the name Apple mail will sometimes grab an old email address from the server.2 

Continue reading

  1. Yes it’s a simple script. But I have readers who don’t do a lot of scripting who may find this helpful.
  2. I have the last 15 years of interesting messages from the listserv in my archives. Apple mail sometimes will autocomplete based upon the “from” of one of these old messages regardless of what I have in the Contacts app.

Trying to figure it all out a post at a time