Skip to content

Instantly share code, notes, and snippets.

View JMichaelTX's full-sized avatar

JMichaelTX JMichaelTX

View GitHub Profile
@JMichaelTX
JMichaelTX / OpenEvernoteNote_Word_VBA.bas
Created January 24, 2016 01:12
Open Evernote Classic (local) Link in MIcrosoft Word 2011 Mac Using Word VBA
Private Declare Function system Lib "libc.dylib" (ByVal command As String) As Long '*** system docs here: http://pubs.opengroup.org/onlinepubs/9699919799/ Sub OpenURL(pURL As String) '================================================================ ' OpenURL Sub Procedure ' ' VER: 1.0 DATE: 2016-01-23 ' ' PURPOSE: Open any URL (including custom protocols) using Mac system "open" command ' ' REQUIRES: ' This function at top of module: ' Private Declare Function system Lib "libc.dylib" (ByVal command As String) As Long ' ' REF: ' 1. How to Use the system() function from the standard C library in a VBA Macro ' http://stackoverflow.com/a/12320294/915019 ' BY: Robert Knight '================================================================ Dim result As Long Dim CMDStr As String CMDStr = "open " & pURL result = system(CMDStr) Debug.Print Str(result) E
@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 / (EN) Set Author of Selected Notes AS.scpt
Last active January 22, 2016 05:00
Evernote AppleScript to Set author property of Selected Notes (AS)
(*
===============================================================================
Set Author of Selected Notes
===============================================================================
VER: 1.0 LAST UPDATE: 2016-01-21
PURPOSE:
• Set the Author field in all selected Notes
@JMichaelTX
JMichaelTX / (EN) How to Make Tag a Child Tag of a Parent Tag JXA.js
Last active January 15, 2016 16:58
[EN] Move a Tag to be a Child of a Parent Tag [JXA] - Evernote Mac, JavaScript for Automation
/*
⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶
[EN] How to Make Tag a Child Tag of a Parent Tag [JXA]
⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶⩶
DATE: Fri, Jan 15, 2016
AUTHOR: JMichaelTX (in most forums)
Find any bugs/issues or have suggestions for improvement?
Post below, or contact me via PM or at blog.jmichaeltx.com/contact/
REF:
@JMichaelTX
JMichaelTX / JXA_PersistentProperties.js
Last active March 16, 2021 13:27 — forked from RobTrew/JXA_PersistentProperties.js
Persistent 'properties' for OS X JavaScript for Applications (JXA) Forked from Rob Trew
(function () {
'use strict';
// OSX JavaScript for Applications lacks the persistent 'properties'
// of AppleScript (in which global variables and properties persist between script runs)
// but we can, of course, serialise to JSON or plist at the end of a script
// parsing it at the start of the next run.
// Here is one approach to persistence between script runs
// using JSON.stringify() and JSON.parse()
@JMichaelTX
JMichaelTX / JXA Resources.md
Last active March 31, 2024 04:38
JavaScript for Automation (JXA) Resources

JXA Resources

Revised: 2019-11-28 16:16 GMT-6

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.

I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.

@JMichaelTX
JMichaelTX / ASObjC Progress Bar AS.scpt
Created January 14, 2016 04:52
DEMO & Functions for Real Progress Bar using ASObjC in AppleScript
(*
==============================================================================
PURPOSE: Show how to display real Progress Bar using ASObjC Runner app
• Redesigned to use FUNCTIONS
VER: 1.1.2 DATE: Mon, May 18, 2015
AUTHOR: JMichaelTX
Please post comment any bugs/issues/questions or suggestions for improvement
@JMichaelTX
JMichaelTX / JXA Alert Function.md
Last active March 18, 2024 11:33
JXA Alert Function - JavaScript for Automation

JXA Alert Function
See code below.

JMichaelTX JXA Gists
Because there is so little JavaScript for Automation (JXA) code that is published, I plan to publish as much as I can that will hopefully be of help to others learning JXA.

Much of what I publish will be based on the work of others, and I always try to cite those references in the code header. If I have failed to properly credit your code, please post a comment, and I will correct my Gist.

Your JXA Code
If you have example code you'd like to share, please post a link to your code. After having searched and evaluated various options for posting/sharing code, i have concluded that Github Gists is the best.

@JMichaelTX
JMichaelTX / How to Display Progress Bar Using ASObjC Runner JXA.js
Last active January 13, 2016 21:34
[PROGRESS] How to Display Progress Bar Using ASObjC Runner [JXA] JavaScript for Automation
/*
==============================================================================
PURPOSE: Show how to display real Progress Bar using ASObjC Runner app in JXA
• Redesigned to use FUNCTIONS
VER: 2.0 DATE: Tue, Jan 12, 2016
AUTHOR: JMichaelTX
Please PM me with any bugs/issues/questions