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
uniqueFilePath('~/Library/Preferences/com.apple.finder.plist') | |
function uniqueFilePath(parentFolderPath, fileName, suffix) { | |
/* | |
Only for use with JavaScript for Automation (JXA) | |
Generates a unique path by appending a number | |
to the end of the file name. |
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
-- Create a new Log Manager instance | |
set LOGGER to newLogManager("~/Desktop/LogManagerTest.log") | |
tell LOGGER | |
-- Test by sending 30,000 messages; this should cause the auto archive feature to trigger | |
repeat 10000 times | |
infoLog("This is an informational message") | |
errorLog("This is an error") | |
debugLog("This is a debug message") |
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
(* | |
Allows the user to grab a screen selection and places a scaled version on the clipboard. | |
*) | |
on run | |
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
-- Kill current Firefox process, if any | |
try | |
do shell script "killall firefox" | |
end try | |
-- Delete data | |
do shell script "rm -rf ~/Library/Application\\ Support/Firefox" | |
do shell script "rm -rf ~/Library/Caches/Firefox" | |
do shell script "rm -rf ~/Library/Caches/Mozilla" | |
do shell script "rm -rf ~/Library/Preferences/org.mozilla.firefox.plist" |
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
on run | |
(* | |
iOS QuickTime Viewer | |
Version 0.2 | |
AppleScript to assist a user to view an iOS devices’ screen | |
on a Mac using QuickTime Player | |
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
/* Open with Apple’s Script Editor in OS X 10.10 or later and set language to JavaScript */ | |
function run(argv) { | |
try { | |
// Create a new Quatermain instance | |
var qm = new Quatermain() | |
// Make sure Safari is running |
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 gADMIN_USER | |
global gADMIN_PASSWORD | |
on run | |
try | |
-- Check system requirements | |
if requireMinimumSystemVersion("10.12.4") is false then return | |
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 thePatterns to "/(r\\s*\\d\\s*\\d\\s*[-\\s]*\\d\\s*\\d\\s*\\d\\s*\\d\\s*\\d)/i" | |
set theStrings to "R17-11517 r17-11518 r17-11519 R17-11518 R17-11519" | |
repeat 7 times | |
set thePatterns to thePatterns & return & thePatterns | |
set theStrings to theStrings & return & theStrings | |
end repeat |
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
use framework "Foundation" | |
use scripting additions | |
set thePatterns to "(r\\s*\\d\\s*\\d\\s*[-\\s]*\\d\\s*\\d\\s*\\d\\s*\\d\\s*\\d)" | |
set theStrings to "R17-11517 r17-11518 r17-11519 R17-11518 R17-11519" | |
repeat 7 times | |
set thePatterns to thePatterns & return & thePatterns | |
set theStrings to theStrings & return & theStrings | |
end repeat |
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
(* | |
AppleScript: Count FileMaker Variables | |
Processes FileMaker scripts or script steps on the clipboard | |
and displays how many times each variable is used | |
----------------------------------------------------------------------------------- | |
Copyright (c) 2018 by Adrian Nier (http://adriannier.de) |
OlderNewer