Skip to content

Instantly share code, notes, and snippets.

View kevin-funderburg's full-sized avatar
😆

Kevin Funderburg kevin-funderburg

😆
View GitHub Profile
@kevin-funderburg
kevin-funderburg / close-document-without-saving.applescript
Created May 15, 2019 21:58
Close front document of front app without saving.
tell application "System Events" to set frontapp to name of first process whose frontmost is true
tell application frontapp
tell front document
close saving no
end tell
end tell
@kevin-funderburg
kevin-funderburg / mail-make-message-url.applescript
Created May 15, 2019 22:03
Very useful, makes a direct link to the current message.
use scripting additions
tell application "Mail"
set selectedMessages to selection
set theMessage to item 1 of selectedMessages
set messageid to message id of theMessage
set urlText to "message://" & "%3c" & messageid & "%3e"
set the clipboard to urlText
end tell
@kevin-funderburg
kevin-funderburg / safari-duplicate-tab.applescript
Created May 15, 2019 22:05
Duplicate current Safari tab.
tell application "Safari"
tell front window
set theURL to URL of current tab
set current tab to make new tab with properties {URL:theURL}
end tell
end tell
@kevin-funderburg
kevin-funderburg / monthly-cleanups.applescript
Last active May 16, 2019 02:58
Clean up old files in ~/Downloads or ~/Desktop.
(*
===============================================================================
Monthly Cleanup
===============================================================================
Version: 1.10 Updated: 05/15/19 21:48:10 CST
By: Kevin Funderburg
PURPOSE:
@kevin-funderburg
kevin-funderburg / insert-dynamic-handler-description.applescript
Last active May 17, 2019 01:11
Insert a dynamically made Script Debugger clipping at the beginning of the current handler to describe said handler.
(*
===============================================================================
Insert Dynamic Handler Description
===============================================================================
Version: 1.0 Updated: 05/16/19 19:31:26 CST
By: Kevin Funderburg
PURPOSE:
# initialization file (not found)