Skip to content

Instantly share code, notes, and snippets.

😆

Kevin Funderburg kevin-funderburg

Block or report user

Report or block kevin-funderburg

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
@kevin-funderburg
kevin-funderburg / insert-dynamic-handler-description.applescript
Last active May 17, 2019
Insert a dynamically made Script Debugger clipping at the beginning of the current handler to describe said handler.
View insert-dynamic-handler-description.applescript
(*
===============================================================================
Insert Dynamic Handler Description
===============================================================================
Version: 1.0 Updated: 05/16/19 19:31:26 CST
By: Kevin Funderburg
PURPOSE:
@kevin-funderburg
kevin-funderburg / monthly-cleanups.applescript
Last active May 16, 2019
Clean up old files in ~/Downloads or ~/Desktop.
View monthly-cleanups.applescript
(*
===============================================================================
Monthly Cleanup
===============================================================================
Version: 1.10 Updated: 05/15/19 21:48:10 CST
By: Kevin Funderburg
PURPOSE:
View safari-duplicate-tab.applescript
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 / mail-make-message-url.applescript
Created May 15, 2019
Very useful, makes a direct link to the current message.
View mail-make-message-url.applescript
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 / close-document-without-saving.applescript
Created May 15, 2019
Close front document of front app without saving.
View close-document-without-saving.applescript
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 / close-document-with-saving.applescript
Created May 15, 2019
Close front document of front app with saving.
View close-document-with-saving.applescript
tell application "System Events" to set frontapp to name of first process whose frontmost is true
tell application frontapp
tell front document
close saving yes
end tell
end tell
@kevin-funderburg
kevin-funderburg / close-all-documents-without-saving.applescript
Created May 15, 2019
Close all documents of front app without saving.
View close-all-documents-without-saving.applescript
tell application "System Events" to set frontapp to name of first process whose frontmost is true
tell application frontapp to close every document without saving
@kevin-funderburg
kevin-funderburg / close-all-documents-with-saving.applescript
Created May 15, 2019
Save and close all open documents of front app.
View close-all-documents-with-saving.applescript
tell application "System Events" to set frontapp to name of first process whose frontmost is true
tell application frontapp to close every document with saving
@kevin-funderburg
kevin-funderburg / close-unsaved-documents-of-front-app.applescript
Created May 15, 2019
Closes all the un-saved documents of the front app.
View close-unsaved-documents-of-front-app.applescript
-- Note: This works in all the apps I’ve tried it in, so there may be others it doesn't
tell application "System Events" to set frontapp to name of first process whose frontmost is true
tell application frontapp
activate
repeat with i from (count of documents) to 1 by -1
set thisDocument to document i
try
if path of (get properties of thisDocument) = missing value or name of thisDocument contains "Untitled" then
@kevin-funderburg
kevin-funderburg / paste-safari-title-with-link.applescript
Last active May 15, 2019
Very useful, pastes the title of the front Safari window with the link to the page embedded.
View paste-safari-title-with-link.applescript
You can’t perform that action at this time.