-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 52c1e5b
Showing
15 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tell application "Mail" | ||
set _sel to get selection | ||
set _links to {} | ||
repeat with _msg in _sel | ||
set _messageURL to "message://%3c" & _msg's message id & "%3e" | ||
set end of _links to _messageURL | ||
end repeat | ||
set AppleScript's text item delimiters to return | ||
set the clipboard to (_links as string) | ||
end tell |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleAllowMixedLocalizations</key> | ||
<true/> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>applet</string> | ||
<key>CFBundleIconFile</key> | ||
<string>applet</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.temochka.AppleScript.AppleNotesUrl</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>Open Note URL</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>aplt</string> | ||
<key>CFBundleURLTypes</key> | ||
<array> | ||
<dict> | ||
<key>CFBundleURLName</key> | ||
<string>Apple Notes</string> | ||
<key>CFBundleURLSchemes</key> | ||
<array> | ||
<string>shortcuts</string> | ||
</array> | ||
</dict> | ||
</array> | ||
<key>LSMinimumSystemVersionByArchitecture</key> | ||
<dict> | ||
<key>x86_64</key> | ||
<string>10.6</string> | ||
</dict> | ||
<key>LSRequiresCarbon</key> | ||
<true/> | ||
<key>NSAppleEventsUsageDescription</key> | ||
<string>This script needs to control other applications to run.</string> | ||
<key>NSAppleMusicUsageDescription</key> | ||
<string>This script needs access to your music to run.</string> | ||
<key>NSCalendarsUsageDescription</key> | ||
<string>This script needs access to your calendars to run.</string> | ||
<key>NSCameraUsageDescription</key> | ||
<string>This script needs access to your camera to run.</string> | ||
<key>NSContactsUsageDescription</key> | ||
<string>This script needs access to your contacts to run.</string> | ||
<key>NSHomeKitUsageDescription</key> | ||
<string>This script needs access to your HomeKit Home to run.</string> | ||
<key>NSMicrophoneUsageDescription</key> | ||
<string>This script needs access to your microphone to run.</string> | ||
<key>NSPhotoLibraryUsageDescription</key> | ||
<string>This script needs access to your photos to run.</string> | ||
<key>NSRemindersUsageDescription</key> | ||
<string>This script needs access to your reminders to run.</string> | ||
<key>NSSiriUsageDescription</key> | ||
<string>This script needs access to Siri to run.</string> | ||
<key>NSSystemAdministrationUsageDescription</key> | ||
<string>This script needs access to administer this system to run.</string> | ||
<key>WindowState</key> | ||
<dict> | ||
<key>bundleDividerCollapsed</key> | ||
<true/> | ||
<key>bundlePositionOfDivider</key> | ||
<real>0.0</real> | ||
<key>dividerCollapsed</key> | ||
<false/> | ||
<key>eventLogLevel</key> | ||
<integer>2</integer> | ||
<key>name</key> | ||
<string>ScriptWindowState</string> | ||
<key>positionOfDivider</key> | ||
<real>256</real> | ||
<key>savedFrame</key> | ||
<string>332 -13 700 672 0 0 1920 1057 </string> | ||
<key>selectedTab</key> | ||
<string>result</string> | ||
</dict> | ||
</dict> | ||
</plist> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
APPLaplt |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
Notes/Open Note URL.app/Contents/Resources/description.rtfd/TXT.rtf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf600 | ||
{\fonttbl} | ||
{\colortbl;\red255\green255\blue255;} | ||
{\*\expandedcolortbl;;} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tell application "Safari" | ||
tell window 1 | ||
tell current tab | ||
do JavaScript "window.getSelection().anchorNode.parentElement.closest('a,button').click()" | ||
end tell | ||
end tell | ||
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# macOS automation scripts | ||
|
||
A collection of my macOS automation scripts (AppleScript and JXA). | ||
|
||
|
||
### Copy Mail message URL | ||
|
||
Copies local URLs to messages in Apple Mail for quick referencing. URLs look like below and work both on macOS and iOS: | ||
|
||
``` | ||
message://%[email protected]%3e | ||
``` | ||
|
||
## Notes | ||
|
||
### Open Note URL / Copy Note URL | ||
|
||
Apple Notes doesn’t provide URLs that work reliably across devices. I link to my notes using the following URLs format | ||
|
||
``` | ||
shortcuts://run-shortcut?name=NoteURL&input=1582228319 | ||
``` | ||
|
||
This format works both on macOS (via these scripts) and iOS (via custom shortcuts) and relies on note creation date, which is | ||
extremely reliable and unlikely to change. | ||
|
||
### Generate Vocabulary Update | ||
|
||
Whenever I see an unknown English word, I add it to a note in "🇬🇧English" folder. This script combine these separate notes into a single list that I can load into my space repetition software. | ||
|
||
## Safari | ||
|
||
## Open Highlighted Link | ||
|
||
Safari doesn’t automatically focus elements highlighted via search by page (like Chrome or Firefox). However, it can be done with a bit of AppleScript. [Read more](https://temochka.com/blog/posts/2018/12/18/navigating-the-web-safari.html) on my blog. | ||
|
||
## Safari tab to OmniFocus | ||
|
||
I could never figure out how to quickly add a Safari web page to OmniFocus (so it puts the page title into task and URL as a note) so I wrote this shortcut. Works for me! |
Binary file not shown.