Mac Applescript Text In App

  1. Applescript Do Script
TutorialApplescript

AppleScript, a built-in Mac automation tool, is a little-known (at least until recently) enabling technology that works like a cassette recorder for programs that support AppleScript recording. And scripts do look like computer programs. (Could that be because they are computer programs?

Mac Applescript Text In App

Commands

  • create project-- Creates a new project.
    • nametext-- The name of the new project.
    • [parent projectproject]-- The parent project of the new project.
    • [colortext]-- The color associated with the new project, in the form #RRGGBBAA.
    • [productivity ratingreal]-- The productivity rating of the new project, between 0 and 1.
    • [rule datatext]-- A string representing the new project's rules. Note that this data's format is not documented and should be treated as opaque. If you want to create projects with custom rules, please request assistance from support.
    • Result: project-- The newly-created project.
  • update project-- Updates an existing project's properties.
    • [nametext]-- The new name of the project.
    • [isArchivedboolean]-- Whether the project is archived.
    • [colortext]-- The new color associated with the project, in the form #RRGGBBAA.
    • [productivity ratingreal]-- The new productivity rating of the project, between 0 and 1.
    • [rule datatext]-- A string representing the project's new rules. Note that this data's format is not documented and should be treated as opaque. If you want to create projects with custom rules, please request assistance from support.
    • Result: project-- The updated project.
  • delete project-- Deletes an existing project and all of its children.
    • Result: text-- A string confirming deletion of the project.
  • pause tracking-- Pauses tracking for the given time period.
    • [forreal]-- The time to pause tracking for, in seconds. Omit to pause indefinitely.
  • resume tracking-- Resumes tracking.
  • get time summary-- Returns usage statistics for the specified date range.
    • betweendate-- The start date for which to return a summary.
    • anddate-- The end date for which to return a summary.
    • Result: time summary-- Usage statistics for the specified date range.
  • start task-- Starts tracking time for a new task.
    • [with titletext]-- The title of the new task.
    • [projectproject]-- The name of the project to assign the task's time to.
    • [notestext]-- The notes of the new task.
    • [for aboutreal]-- The number of seconds after which Timing should ask you whether you want to keep tracking.
  • stop current task-- Stops tracking time for the currently running task.
    • [notificationboolean]-- Whether to display a notification that the current task was stopped.
    • Result: boolean-- True if a task was active that could be stopped.
  • add task-- Starts tracking time for a new task.
    • fromdate-- The start date of the new task.
    • todate-- The end date of the new task.
    • [with titletext]-- The title of the new task.
    • [projectproject]-- The name of the project to assign the task's time to.
    • [notestext]-- The notes of the new task.
  • save report-- Generates a report and saves it.
    • with report settingsreport settings-- The report settings, e.g. how to group and what data to include.
    • export settingsexport settings-- The export settings, e.g. what file format to save.
    • tofile
    • betweendate-- The start date for the report.
    • anddate-- The end date for the report.
    • [for projectslist of project]-- The projects to include in the report.

Classes

Applescript Do Script

  • application-- The TimingHelper application.
    • Plural name:
      • applications
    • Properties:
      • root projects(r/o)list of project-- The application's top level projects.
      • scripting support available(r/o)boolean-- Indicates whether your license includes support for automating Timing via AppleScript.
    • Elements:
      • project -- byname, index, relative, range, test, id
  • project-- A project that tasks and app activities can be associated with.
    • Plural name:
      • projects
    • Properties:
      • id(r/o)text-- The unique identifier of the object.
      • name(r/o)text-- The name of the object.
      • color(r/o)text-- The color associated with the project, in the form #RRGGBBAA.
      • productivity rating(r/o)real-- The productivity rating of the project, between 0 and 1.
      • rule data(r/o)text-- A string representing the project's rules. Note that this data's format is not documented and should be treated as opaque. If you want to create projects with custom rules, please request assistance from support.
      • name chain(r/o)text-- The name of the object and all its parents, in the form 'Parent ▸ Child ▸ Grandchild'.
      • parent project(r/o)project-- The project's parent project.
      • container(r/o)project-- The project's parent project. Same as 'parent project'.
    • Elements:
      • project -- byname, index, relative, range, test, id
  • time summary-- A container for various usage statistics.
    • Plural name:
      • time summarys
    • Properties:
      • id(r/o)text-- The unique identifier of the object.
      • productivity score(r/o)real-- The overall productivity score over the given period, between 0 (very unproductive) and 1 (very productive).
      • overall total(r/o)real-- The total time recorded over the given period, in seconds.
      • overall total without tasks(r/o)real-- The total time recorded over the given period, excluding tasks (i.e. app usage only), in seconds.
      • times per project(r/o)record-- A record with the names of projects as keys and the corresponding recorded times, in seconds.
      • times per project without tasks(r/o)record-- A record with the names of projects as keys and the corresponding recorded times (excluding tasks), in seconds.
  • report settings-- Holds settings to modify how a report is generated.
    • Plural name:
      • report settingss
    • Properties:
      • id(r/o)text-- The unique identifier of the object.
      • first grouping modeby year / by month / by week / by day / by hour / by project / by parent project / by toplevel project / by secondlevel project / raw-- The first criterion to group data by.
      • second grouping modeby year / by month / by week / by day / by hour / by project / by parent project / by toplevel project / by secondlevel project / raw-- The second criterion to group data by.
      • tasks includedboolean-- Whether to include tasks. in the report
      • task title includedboolean-- When tasks are included, whether to also provide the task's title.
      • also group by task titleboolean-- When including tasks and task titles, whether to also group by task title.
      • task timespan includedboolean-- When tasks are included, whether to also provide the task's timespan.
      • task notes includedboolean-- When tasks are included, whether to also provide the task's notes.
      • app usage includedboolean-- Whether to include app usage data in the report.
      • application info includedboolean-- When app usage is included, whether to also provide the application's name.
      • title info includedboolean-- When app usage is included, whether to also provide the activity's title.
      • path info includedboolean-- When app usage is included, whether to also provide the activity's path
      • timespan info includedboolean-- When app usage is included, whether to also provide the activity's time span.
      • also group by applicationboolean-- When including app usage and application info, whether to also group by application.
      • include app activities covered by a taskboolean-- When including both app usage and tasks in a report, whether to include app usage that is already contained in a task.
  • export settings-- Holds settings to modify how a report is saved to disk.
    • Plural name:
      • export settingss
    • Properties:
      • id(r/o)text-- The unique identifier of the object.
      • file formatExcel / CSV / HTML / JSON-- The file format to export.
      • duration formathhmmss / xhymzs / seconds / hours-- How to format durations in the export.
      • short entries includedboolean-- Whether to include entries below the threshold provided in the main app's settings.