Categories
AppleScript CurrentKey Stats

Room-specific radio stations with Broadcasts

Read the full tutorial at my personal blog.

Famous indie developer Steve Troughton-Smith released a very cool internet radio app called Broadcasts recently. Basically, it lets you pick from thousands of streaming sources and organize them into collections in a simple user interface. What caught my eye in particular was that it supported AppleScript commands.

💡 With CurrentKey 3.0's Room Change alerts, you can write a simple AppleScript that will change your radio station based off which Room (named Space) you're in.

So, as you move between your Rooms, you could trigger live radio that fits the context? Like, say you're a college student studying foreign languages – you could set spanish talk radio each time you revisit your spanish space. Or, you're a Yankees fan, set your sports space to switch to playing sports radio when you enter. This instantly immerses you in what you're there for!

Categories
AppleScript CurrentKey Stats

Assign specific scripts to run when you visit certain Mac Spaces 🖥 🎯

Most of us know about the MacOS feature called Spaces, and many of us love splitting our projects, work, and hobbies across our virtual desktops. Some find it unweildy because each Space is generic out of the box. Spaces don't come with the ability to be named or personalized other than setting a desktop background image.

CurrentKey Stats gives you a way to assign names, custom icons, and even custom auto-run scripts to each MacOS Space (the app calls Spaces "Rooms").

Now CurrentKey Stats recently gained the ability to trigger specific events upon entering/leaving specific Rooms, via the Background Services panel accessed in settings, as well as the ability to respond to AppleScript queries.

Between those two new features, the potential to personalize and automate workflows in Spaces skyrocketed. Want to set a custom internet radio station to each Space? You can do that!

Would you like to hook up your own scripts to CurrentKey's powerful app stats dataset? You can do that.

Check out the extensive list of brainstormed ideas as to what you could trigger with Room Change alerts – workflows that: automatically bring a specific app to the front? ✅ take a screenshot? ✅ mute the volume? ✅ toggle macOS dark mode? ✅ activate LED desk lights? ✅ trigger and IFTTT routine? ✅ You can even pass parameters along to a Python script. Here's a tutorial.

Scripts can be aware of when you leave a Room, and can query what the list of active Rooms are. They can also ask a bunch of other questions about stats (like what is your most-used app today, or in a specific Room). Scripts can even request CurrentKey go to a specific Room.

Anyhoo, most people don't know that it's possible to create Space-specific automated workflows, and now you do! 😎

For a broader overview of CKStats, check out its homepage, App Store listing, or browse the demo below. Thanks!

Categories
AppleScript CurrentKey Stats

How to give each of your Mac’s Spaces a custom sound 👂🏻

We all know about the MacOS feature called Spaces, and many of us love splitting our projects, work, and hobbies across our virtual desktops.

What if you could not just assign a name to each Space but also assign a custom Internet radio station to each one too? As you move between them, immersive sound would automatically start playing. Thanks to AppleScript support in Broadcasts (by Steve Troughton-Smith), this is possible! (Skip ahead to the video below to see it in action.) Here's a common use case:

Say you're studying a second language and arrange your learning materials in a Space you call "Spanish". I'll share a script below that…. When you move into your "Spanish" Space, will tell Broadcasts to play a radio station by its name, in this case "Cadena SER España". Let's say you want another Space for all things related to your hometown sports team. In my case, this would be the Texas Longhorns. So when I move into "Sports", we'll play from the "104.9 The Horn Austin Sports Talk" station. Great! I love programming to electronica, so I've set my "coding" Room to play the excellent station "Monstercat", and – just for kicks – set the OS to Dark Mode.

A quick demo of the apps and script in action.

But there's just one thing though… What about our other Spaces? In this demo, the script has been written to tell Broadcasts to automatically pause its playback when it goes to any other Room (and turn off Dark Mode).

For more ideas on what could be automatically triggered upon entering/leaving Spaces, check out this blog post! 💡

How it's done

First, you're going to need to have Broadcasts. Check it out, and if you like it, grab the full version (it's currently a $5 in-app purchase).

Next, you're going to need CurrentKey Stats (App Store link), which is free.

The tutorial video below will show you how to do everything from scratch in under five four minutes!

The steps in the video involve:

  1. Opening CurrentKey and Broadcasts.
  2. Adding the Stations you want in Broadcasts.
  3. Naming the Spaces you want in CurrentKey.
  4. Enabling AppleScript support in CurrentKey.
  5. Moving this script (modified for the Stations/Spaces you want), to CurrentKey's Scripts folder.
  6. Clicking OK on the Mac's permissions dialog so CurrentKey can talk to Broadcasts (and if you want the Dark Mode functionality, the System Preferences).

That's it!

For more about the other new features in CurrentKey Stats 3.0, check out the latest blog posts.

The idea had a minor splash on Twitter, and that was fun to see.

That advertisement on the Sports channel 😂
Categories
AppleScript CurrentKey Stats

CurrentKey Stats 3.0 resource pages

It finally felt like time to tackle a few ideas I'd been mulling for a long time for CurrentKey Stats. Here are links to a few resource pages on the new features:

Automatically Generated Stats Reports

And bi-directional AppleScript support, allowing for:

Room Change Alerts (which you can set to trigger custom events), and

Support for 14 AppleScript commands

Please let me know what you think @[email protected] or at currentkeystats at gmail.com

Enjoy! – Spencer