Skip to content

Instantly share code, notes, and snippets.

View JMichaelTX's full-sized avatar

JMichaelTX JMichaelTX

View GitHub Profile
@JMichaelTX
JMichaelTX / revealPFItemInFinder.applescript
Last active February 7, 2021 21:04
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
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 / Evernote Mac File Import.AppleScript
Last active December 21, 2020 15:02
• Import Finder Selected Files to Evernote Mac • User will be prompted for Tags
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 / Copy EN Note Link (Classic) AS.applescript
Last active June 10, 2020 05:10
[EN] Classic - Evernote Mac - Put Classic Note Link on Clipboard as Rich Text using Note Title -- AppleScript
@JMichaelTX
JMichaelTX / Add Prefix Suffix to Note Titles.applescript
Created April 17, 2017 23:15
Evernote Mac -- Add Prefix or Suffix to Selected Note Titles
(*
===============================================================================
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 / EN Mac Create Note from Text in Delimiters.applescript
Last active May 8, 2019 22:12
Evernote Mac AppleScript to Create Summary Note from Extracted Text in Delimiters (EN Mac AS)
(*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[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 / Main.css
Last active August 29, 2017 08:25 — forked from chrisphenry/Main.css
Safari 7 & 9 - Customise Web Inspector font
/*Customise Safari Web Inspector font*/
/*(tested on Safari 7.0.1 on OS X Mavericks)*/
/* Tested on Safari 9.1 (11601.5.17.1) on OSX 10.11.4 as of 2016-05-08 */
/*
JMichaelTX NOTE:
- This process was written for Safari 7 (Mavericks)
- I found it worked fine with Safari 9.1 (11601.5.17.1) on OSX 10.11.4, with just a few simple changes (noted below)
*/
@JMichaelTX
JMichaelTX / Set Evernote Mac Font and Text Size using AppleScript.AppleScript
Last active June 13, 2017 01:56
Set Evernote Mac Font and Text Size using AppleScript
property ptyScriptName : "Set EN Mac Font Name and Size"
property ptyScriptVer : "2.0"
property ptyScriptDate : "2017-06-12"
property ptyScriptAuthor : "JMichaelTX"
property LF : linefeed
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
my enSetFontAndSize("Courier New", "14")
@JMichaelTX
JMichaelTX / Get & Set Functions for KM Variables JXA.js
Created February 11, 2016 01:34
JXA Functions to Get and Set Keyboard Maestro (KM) Variables using JavaScript for Automation (JXA)
//=====================================================================
function setKMVar(pstrName, pstrValue) {
//=====================================================================
var app = Application.currentApplication()
app.includeStandardAdditions = true
var appKM = Application("Keyboard Maestro Engine")
var oVars = appKM.variables
@JMichaelTX
JMichaelTX / Script Timer AS.applescript
Last active March 1, 2016 21:47
AppleScript Script #Timer using ASObjC
###——————————————————————————————————————————————
# timer(pAction) Calculate and Log Execution Time
#
# Ver 1.1 2016-02-21
#
# REF: The base ASObjC code was provided by Shane Stanley
#
# HOW TO USE:
# • You may want to run the script at least 3 times
# • The first run may be high
@JMichaelTX
JMichaelTX / trimThis Function AS.applescript
Last active February 26, 2016 03:19
AppleScript Trim Function / Handler Using ASObjC (Shane Stanley)
###BEGIN~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# trimThis() Trim (remove) Characters from Left and/or Right of String
#
# Ver 1.1 2016-02-25
# AUTHOR: Shane Stanley
# (minor revisions by JMichaelTX)
# REF: MacScripter / Trim [Remove Spaces]
# http://macscripter.net/viewtopic.php?pid=182209#p182209
# PARAMETERS:
# • pstrCharToTrim : A list of characters to trim, or true to use default