This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--The most current version of SmartPerspective is now in a GitHub repo. (https://github.com/brandonpittman/OmniFocus/blob/master/SmartPerspective.applescript) | |
on run | |
open_perspective() | |
end run | |
on open_perspective() | |
tell application "OmniFocus" | |
tell default document | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "BBEdit" to set theFile to file of document 1 | |
tell application "Finder" to set theFolder to (container of file theFile) as alias | |
set theUnixPath to POSIX path of theFolder | |
tell application "iTerm" | |
make new terminal | |
tell the first terminal | |
-- launch a default shell in a new tab in the same terminal | |
launch session "Default Session" | |
tell the last session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property noteLink : missing value | |
tell application "System Events" | |
set theDialog to display dialog "Get Link of selected note or choose other note?" buttons {"Get Selected", "Choose Other"} default button {"Get Selected"} | |
end tell | |
--Get Markdown formatted info from Selected Note | |
if button returned of theDialog is "Get Selected" then | |
tell application "Evernote" | |
set Evernote_Selection to selection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
set appName to "%filltext:name=appName%" | |
set appID to id of application appName | |
do shell script "/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier -title " & appName & " -sender " & appID & " -message '%filltext:name=theMessage%'" | |
end try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Finder" | |
try | |
if get selection is not {} then set selection to {} | |
end try | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Change "f" to a list of movies you want to watch. | |
f = "/Users/brandonpittman/Dropbox/Documents/Markdown/- Movies.md" | |
# Change "coin_db" to your coin(.rb) script. | |
coin = "/Users/brandonpittman/Dropbox/Documents/Code/Shell Scripts/coin" | |
# Import to coin. | |
coin_output = File.readlines(f).each { |line| `"#{coin}" a "#{line}"` } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set iconFile to POSIX file "/System/Library/CoreServices/Finder.app/Contents/Resources/Finder.icns/" | |
tell application "Finder" | |
set theFiles to get selection | |
set theCount to count every item of theFiles | |
if theCount is 0 then | |
display alert "No files are currently selected." as warning | |
return | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global theFilePath, fileName, notifyMSG | |
on run | |
tell application "Finder" | |
if selection is not {} then | |
set sel to get selection | |
if (count sel) is 1 then | |
set notifyMSG to "1 file was " | |
else | |
set notifyMSG to (count sel) & " files were " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "BBEdit" | |
if not (front text document exists) then make new text document | |
if contents of front text document is "" then set contents of front text document to "#!/usr/bin/env ruby\n\n" | |
set source language of text document 1 to "Ruby" | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "BBEdit" | |
if not (front text document exists) then make new text document | |
if contents of front text document is "" then set contents of front text document to "#!/bin/bash\n\n" | |
set source language of text document 1 to "Unix Shell Script" | |
end tell |