OSX for Dart

Tools for working with OSX

Features

  • Easy to use
  • Dictation (Speech Recognition and TTS)
  • Application Interaction (High Level API for working with applications)
  • Scripting Helpers
  • System Information
  • User Interface

Example

import "package:osx/osx.dart";

void main() {
  say("Your computer is named: ${SystemInformation.getComputerName()}");
  say("You are running OSX ${SystemInformation.getVersion()}");
  say("Battery is at ${Battery.getLevel()}%");
  say("There are ${Applications.list().length} apps installed");

  if (Finder.getWindowCount() == 0) {
    say("Finder is not open.");
  } else {
    say("Finder is open.");
  }

  var app = Applications.get("Textual 5");

  if (app.isInstalled()) {
    say("Textual 5 is installed");
  } else {
    say("Textual 5 is not installed.");
  }

  var result = UI.displayDialog("Open Mission Control?", buttons: [
    "Yes",
    "No"
  ]);

  if (result.button == "Yes") {
    say("Opening Mission Control");
    MissionControl.activate();
  }
}

Libraries

osx
osx.record_parser
osx.utils