Skip to content

Instantly share code, notes, and snippets.

@macgeeky
Created May 1, 2012 20:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macgeeky/2571102 to your computer and use it in GitHub Desktop.
Save macgeeky/2571102 to your computer and use it in GitHub Desktop.
kopierURL()
tell application "Safari" to activate
test()
-- metoder --
on kopierURL()
tell application "System Events"
activate application "Google Chrome"
keystroke "l" using {command down}
keystroke "c" using {command down}
end tell
end kopierURL
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
on test()
if appIsRunning("Safari") then
tell application "Safari"
add reading list item (the clipboard)
quit
end tell
else
delay 4
tell application "Safari"
add reading list item (the clipboard)
quit
end tell
end if
end test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment