Skip to content

Instantly share code, notes, and snippets.

try
tell application "Firefox"
activate
end tell
delay 1
tell application "System Events"
set activeApp to (get name of first process where it is frontmost)
repeat 300 times
tell application "Firefox"
activate
-- user input (from 1 to 21)
set SmallSize to 3
set BigSize to 15
-- end of user input
-- tested version: System Preferences 14.0
try
if application "System Preferences" is running then
set prefRunning to 1
else
set prefRunning to 0
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_95</name>
<url type="shell">
osascript -e '
tell application "System Events"
tell process "Finder"
set frontmost to true
delay 0.2
if (menu item "Show Toolbar" of menu 1 of menu bar item "View" of menu bar 1) exists then
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_83</name>
<url type="shell">
osascript -e '
set sName to "83"
tell application "System Events"
set info to system info
set userName to short user name of info
set Source to "/Users/" & userName & "/Desktop"
set Dest to "/Users/" & userName & "/Desktop/sweep"
set Source2 to POSIX file Source
set Dest2 to POSIX file Dest
try
tell application "Finder"
set selection to every item of folder Source2
set sel1 to the selection
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_96</name>
<url type="shell">
osascript -e '
tell application "System Events"
keystroke "w" using option down
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_96</name>
<url type="shell">
osascript -e '
tell application "System Events"
keystroke "w" using option down
-- requirement: set shortcut in 'MercuryMover' for Move to Option + W
-- user input (up to 9 names)
set nameList to {"", "", "", "", "", "", "", "", ""}
-- user input (up to 9 keys)
set key1 to ""
set key2 to ""
set key3 to ""
set key4 to ""
set key5 to ""
set key6 to ""
set Replace_Me to "abc"
-- user input (up to 10 names)
set nameList to {"", "", "", "", "", "", "", "", "", ""}
-- user input (up to 10)
set SizPos1 to Replace_Me
set SizPos2 to Replace_Me
set SizPos3 to Replace_Me
set SizPos4 to Replace_Me
set SizPos5 to Replace_Me
set SizPos6 to Replace_Me
tell application "System Events"
set activeApp to (get name of first process where it is frontmost)
end tell
delay 0.03
set Replace_Me to "abc"
-- user input (up to 20) - based on active app name
set input1 to Replace_Me
set input2 to Replace_Me
set input3 to Replace_Me
set input4 to Replace_Me