Skip to content

Instantly share code, notes, and snippets.

@btisdall
Created August 8, 2011 15:27
Show Gist options
  • Save btisdall/1131953 to your computer and use it in GitHub Desktop.
Save btisdall/1131953 to your computer and use it in GitHub Desktop.
Ben's cobbled together ping from a list applescript
activate
set chosenListItem to choose from list ¬
{"1.2.3.4", "5.6.7.8", "some.public.hostname"} ¬
with title ¬
"Ping" with prompt ¬
"Select host" default items ¬
"10.5.0.254" OK button name ¬
"OK" cancel button name ¬
"Cancel" multiple selections allowed false ¬
with empty selection allowed
do shell script "ping -q -c 5 " & chosenListItem
set theResult to the result
display alert theResult
set the clipboard to theResult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment