Skip to content

Instantly share code, notes, and snippets.

JMichaelTX JMichaelTX

Block or report user

Report or block JMichaelTX

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JMichaelTX
JMichaelTX / JXA Resources.md
Last active Oct 2, 2019
JavaScript for Automation (JXA) Resources
View JXA Resources.md

JXA Resources

Revised: 2017-06-24 11:21 PM CT

NOTICE:

This page has been transferred to JXA Resources in the JXA Wiki of group.io. All further updates will be made there, and this GitHub Gist page will eventually be removed.

JXA

This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.

View 1 Mods to AppleScript formatICUDate by JMichaelTX.md

MODS BY JMichaelTX on Sat, Feb 27, 2016

AppleScript Handler: on formatDate(pDate, pFormat)

  1. Changed record-style parameters to single-field parameters
  2. Added block to handle date parameter as a string, including International format (YYYY-MM-DD)
  3. Added handler/function: convertIntlDate(pDateStr)
@JMichaelTX
JMichaelTX / Copy & Get Selection to Clipboard JXA.js
Last active Sep 11, 2019
Copy & Get Selection to Clipboard using JavaScript for Automation (JXA) [Ver 1.1.1]
View Copy & Get Selection to Clipboard JXA.js
'use strict';
var app = Application.currentApplication()
app.includeStandardAdditions = true
var mySelection = copySelection("Safari", 1)
mySelection
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function copySelection(pAppName, pTimeLimitSec) {
@JMichaelTX
JMichaelTX / revealPFItemInFinder.applescript
Last active Jul 8, 2019
Here is a handler I use to reveal in Finder the item currently selected in Path Finder. Often I need to do something in the Finder window, so I have added a pause until the Finder window name is the same as the Path Finder window name. Revised to Ve
View revealPFItemInFinder.applescript
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on revealPFItemInFinder()
--–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
(* VER: 2.1 2018-03-19
PURPOSE: Reveal Item in Finder that is Selected in Path Finder
RETURNS: alias of item selected in both Finder and Path Finder
AUTHOR: JMichaelTX
--–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
@JMichaelTX
JMichaelTX / EN Mac Create Note from Text in Delimiters.applescript
Last active May 8, 2019
Evernote Mac AppleScript to Create Summary Note from Extracted Text in Delimiters (EN Mac AS)
View EN Mac Create Note from Text in Delimiters.applescript
(*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[EN] Extract Text in Delimiters (AS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VER: 1.3 LAST UPDATE: 2016-06-13
PURPOSE:
• Extract text in delimited from all Notes in Specified Notebook
@JMichaelTX
JMichaelTX / Evernote Mac File Import.AppleScript
Last active May 8, 2019
• Import Finder Selected Files to Evernote Mac • User will be prompted for Tags
View Evernote Mac File Import.AppleScript
property ptyScriptName : "Import Selected Files Selected in Finder into Evernote with Tags"
property ptyScriptVer : "3.1" -- Add support for Tag Input
property ptyScriptDate : "2018-10-12"
property ptyScriptAuthor : "JMichaelTX"
property version : ptyScriptVer
property LF : linefeed
property ptyENicon : path to resource "Evernote.icns" in bundle (path to application "Evernote")
(*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@JMichaelTX
JMichaelTX / Create Internet Location File from EN Note.applescript
Last active Mar 19, 2019
Create an .inetloc File to open Evernote Note in Evernote Mac app using AppleScript.
View Create Internet Location File from EN Note.applescript
property ptyScriptName : "Create Internet Location File from EN Note"
property ptyScriptVer : "2.0"
property ptyScriptDate : "2018-03-29"
property ptyScriptAuthor : "JMichaelTX"
(*
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REQUIRED:
1. macOS 10.11.6+
2. Mac Applications
@JMichaelTX
JMichaelTX / Add Prefix Suffix to Note Titles.applescript
Created Apr 17, 2017
Evernote Mac -- Add Prefix or Suffix to Selected Note Titles
View Add Prefix Suffix to Note Titles.applescript
(*
===============================================================================
Add Prefix or Suffix to Selected Note Titles
===============================================================================
VER: 1.0 LAST UPDATE: 2017-04-17
AUTHOR: JMichaelTX
USE AT YOUR OWN RISK.
This script has had only VERY LIMITED TESTING.
@JMichaelTX
JMichaelTX / Get List of Finder Tags.applescript
Last active Jan 31, 2019
Get Finder Tag list from plist file. By @ShaneStanley
View Get List of Finder Tags.applescript
(*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get List of Finder Tags
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DATE: 2018-03-19
AUTHOR: ShaneStanley with minor mod by JMichaelTX
REF:
• How Can I get a List of All Finder Tags?
• Late Night Software Ltd.,
• http://forum.latenightsw.com/t/how-can-i-get-a-list-of-all-finder-tags/1192/2?u=jmichaeltx
@JMichaelTX
JMichaelTX / Copy EN Note Link (Classic) AS.applescript
Last active Nov 15, 2018
[EN] Classic - Evernote Mac - Put Classic Note Link on Clipboard as Rich Text using Note Title -- AppleScript
View Copy EN Note Link (Classic) AS.applescript
You can’t perform that action at this time.