{"id":13473214,"url":"https://github.com/unforswearing/applescript","last_synced_at":"2025-05-15T15:04:14.357Z","repository":{"id":10242840,"uuid":"12347640","full_name":"unforswearing/applescript","owner":"unforswearing","description":"Applescript applets, snippets, resources, and links","archived":false,"fork":false,"pushed_at":"2025-01-02T05:21:51.000Z","size":331,"stargazers_count":498,"open_issues_count":3,"forks_count":65,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-07T20:09:42.885Z","etag":null,"topics":["applescript","automation","macos","scripting","snippets"],"latest_commit_sha":null,"homepage":"","language":"AppleScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unforswearing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yaml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"unforswearing","custom":"https://paypal.me/unforswearing"}},"created_at":"2013-08-24T18:15:02.000Z","updated_at":"2025-04-01T03:57:01.000Z","dependencies_parsed_at":"2025-01-10T20:14:23.799Z","dependency_job_id":"1f6dfb52-d94a-45cc-88c4-4cd020bf021c","html_url":"https://github.com/unforswearing/applescript","commit_stats":{"total_commits":380,"total_committers":15,"mean_commits":"25.333333333333332","dds":"0.25526315789473686","last_synced_commit":"5557f2796a2634d4998e030e4b82e11a8eb79131"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Fapplescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Fapplescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Fapplescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unforswearing%2Fapplescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unforswearing","download_url":"https://codeload.github.com/unforswearing/applescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["applescript","automation","macos","scripting","snippets"],"created_at":"2024-07-31T16:01:01.792Z","updated_at":"2025-05-15T15:04:14.304Z","avatar_url":"https://github.com/unforswearing.png","language":"AppleScript","readme":"Applescript\n============\n\nThis repository is a collection of Applescript snippets that can be used individually or part of a larger project. Many of these snippets were written as I was learning to use Applescript and may not represent the best method of undertaking a particular task. Feel free to open an issue or pull request if you find that any of these files do not work for you. You may also open a pull request if you would like to add a script or snippet.\n\nCopies of this repository exist at [Github](https://github.com/unforswearing/applescript) and [Gitlab](https://gitlab.com/unforswearing/applescript).\n\u003cBR\u003e\u003cBR\u003e\n\n\u003c!--\n# Index\n\n[Script Categories](https://github.com/unforswearing/applescript#script-categories)  \n[Links / Dependencies](https://github.com/unforswearing/applescript#linksdependencies)  \n[Resource Libraries](https://github.com/unforswearing/applescript#other-applescript-resourceslibraries)  \n[Bugs / Contributing](https://github.com/unforswearing/applescript#bugs--contributing)  \n[To Do](https://github.com/unforswearing/applescript#to-do)  \n--\u003e\n\n## Script Categories\n\n- [Application Services](./Application%20Services)\n- [Battery Monitor](./Battery%20Monitor)\n- [Display Settings](./Display%20Settings)\n- [File and Folder Actions](./File%20and%20Folder%20Actions)\n- [Location Helper Scripts](./Location%20Helper%20Scripts)\n- [Markdown Tools](./Markdown%20Tools)\n- [Notational Velocity](./Notational%20Velocity)\n- [Pandoc and Textutils](./Pandoc%20and%20Textutils)\n- [Reminders App](./Reminders%20App)\n- [Snippets](./Snippets)\n- [Sound Scripts](./Sound%20Scripts)\n- [Temperature Conversion](./Temperature%20Conversion)\n- [Terminal](./Terminal)\n- [Time and Date](./Time%20and%20Date)\n  \u003cBR\u003e\u003cBR\u003e\n\n\n## Links/Dependencies\n\n- [Caffeine App](http://lightheadsw.com/caffeine/) - a menu bar application that prevents your monitor from sleeping. There are also [several](https://itunes.apple.com/us/app/caffeinated-anti-sleep-app/id1362171212?mt=12) [other](https://itunes.apple.com/us/app/amphetamine/id937984704?mt=12) [applications](https://github.com/newmarcel/KeepingYouAwake) that achieve the same goal.\n  - If you don't want an extra application in your menubar you can use [`pmset noidle`](https://apple.stackexchange.com/a/1459)\n    - [this command must be run as `do shell script \"/usr/bin/pmset noidle \u003e /dev/null 2\u003e\u00261 \u0026\"`](https://discussions.apple.com/thread/323661?answerId=323661021#323661021) to prevent the script from waiting for the shell command to complete.\n  - Or if you're on 10.8+ you can use the built-in `caffeinate` command, though [it may be broken after Yosemite (10.10)](https://discussions.apple.com/thread/7858428).\n  - `caffeinate` and `pmset noidle` can be run via the `do shell script` Applescript command.\n- [Pandoc](http://johnmacfarlane.net/pandoc/) and [Textutil](https://ss64.com/osx/textutil.html) - document conversion via the command line.\n- \u003cs\u003e`Youtube-Post.scpt` requires [GoogleCL](https://code.google.com/p/googlecl/), which is also useful for blogger, google calendar, and contacts\u003c/s\u003e\n  - GoogleCL is sadly defunct. Any associated scripts remain for posterity.\n- I have also created [a few Gists](https://gist.github.com/unforswearing?s=applescript) for more specific applescript/bash related tasks.\n\n\u003cBR\u003e\u003cBR\u003e\n\n## Other Applescript Resources/Libraries\n\n**Tools for Developing Scripts**\n\n*Free*\n\n- [Location Helper](http://www.mousedown.net/mouseware/LocationHelper.html) - use core location in applescripts.\n- [Twitter Scripter](http://www.mousedown.net/mouseware/TwitterScripter.html) - interact with Twitter via applescript.\n- [Platypus](https://sveinbjorn.org/platypus) - package applescripts with various other scripts (Shell, Python, etc) to create native MacOS applications.\n\n*Paid*\n\n- [CursorCoordinates](http://www.limitpointstore.com/products/cursorcoordinates/)  - get x,y coordinates for clicking and window positions.\n- [Dialog Maker](https://itunes.apple.com/us/app/dialog-maker/id457389999?mt=12) - tool to help create dialog boxes\n- [Script Debugger](https://latenightsw.com/) - An integrated development environment for Applescript\n\n\u003cbr\u003e\n\n**A non-exhaustive list of interesting Applescript resources on Github:**\n\n**[Github Applescript Projects](https://github.com/search?l=AppleScript\u0026q=applescript\u0026type=Repositories)**\n\u003cbr\u003e\u003cbr\u003e\n\n*Note Taking/Task Management*\n- [OmniFocus and Evernote (and etc)](https://github.com/geekcomputers/Applescript)\n\n*Coding*\n- [iTerm and Sublime Text](https://github.com/fallroot/applescript-applets)\n- [Custom Iterm Applescripts for Alfred](https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred)\n- [Execute Applescript with Node.js](https://github.com/TooTallNate/node-applescript)\n- [Execute Applescript with Go](https://github.com/everdev/mack)\n\n*Productivity*\n- [Window Layouts with Alfred and Applescript](https://github.com/jgallen23/layouts)\n- [Time Tracking with Omnifocus, Tyme, and Fantastical 2](https://github.com/fuxialexander/Applescript)\n\n\u003cbr\u003e\n\n**Other useful Applescript resources / tutorials / etc**\n\n- [Basics of Applescript](http://downloads.techbarrack.com/books/programming/AppleScript/website/index.html)\n  - Free ebook covering the foundations of applescript scripting. Published in 2014.\n- [Introduction to AppleScript Language Guide](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html#//apple_ref/doc/uid/TP40000983)\n- [MacOSX Automation/Applescript](https://macosxautomation.com/applescript/)\n    - written by [Sal Soghoian](http://macosautomation.com/about.html), the former Apple product manager for automation technologies\n- [MacScripter Forums](http://www.macscripter.net/index.php)\n- [MacRumors/Mac Programming Forum](https://forums.macrumors.com/forums/mac-programming.73/)\n    - not explicitly applescript related, but [searching for \"Applescript\"](https://forums.macrumors.com/search/4005546/?q=Applescript\u0026o=date) provides some useful results\n- [A thorough explanation of \"do shell script\" in Applescript](https://developer.apple.com/library/archive/technotes/tn2065/_index.html)\n\n\u003cbr\u003e\n\n**For JavaScript Users**\n\n- [JavaScript for Automation Cookbook](https://github.com/JXA-Cookbook/JXA-Cookbook/wiki)\n  - JavaScript was added as a MacOS automation tool in version 10.10. If you are familiar with (or would prefer to learn) JavaScript, this cookbook is a great resource.\n\n\u003cbr\u003e\n\n## Bugs / Contributing\n\nScripts in this repo were tested on OS X/MacOS **Lion** through **High Sierra**. Please open an issue or pull request if a script does not work as intended.\n\nIf you have a script, snippet, or resource that you'd like me to include in this repo, feel free to open a new pull request.\n\n## To Do\n\n*To be completed as I have time*\n\n- [ ] Actually update this repo\n- [ ] Reorganize and rename variables, folder structure, docs, readme\n- [ ] (Maybe) Build tests (via python nsapplescript)\n","funding_links":["https://github.com/sponsors/unforswearing","https://paypal.me/unforswearing"],"categories":["AppleScript","automation"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funforswearing%2Fapplescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funforswearing%2Fapplescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funforswearing%2Fapplescript/lists"}