Advertisement
Guest User

Untitled

a guest
Aug 15th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set a to display dialog "Choose action:" buttons {"Ping", "Install mods", "Cancel"}
  2. if button returned of a is "Ping" then
  3.     set temp to display dialog "Choose what to ping" buttons {"MC server", "Google", "Cancel"} default button 1
  4.     if button returned of temp is "MC server" then
  5.         set server to display dialog "Insert server adress" default answer "nanajuu.dip.jp" buttons {"Ping", "Cancel"} default button 1
  6.         set ping_result to (do shell script "ping -c 10 " & text returned of server & "|grep \"round-trip\"") as text
  7.         display dialog ping_result buttons {"OK"}
  8.     else
  9.         set ping_result to (do shell script "ping -c 10 google.ru |grep \"round-trip\"") as text
  10.         display dialog ping_result buttons {"OK"}
  11.     end if
  12. else
  13.     do shell script "cd ~
  14.         mkdir mctemp
  15.         cd mctemp
  16.         jar xf ~/library/application\\ support/minecraft/bin/minecraft.jar
  17.         cp -fR ~/mods ~/mctemp
  18.         jar uf ~/library/application\\ support/minecraft/bin/minecraft.jar ./
  19.         cd ~
  20.         rm -rf ~/mods/*
  21.         rm -rf ~/mctemp"
  22.     say "success" using "Bells"
  23.     display dialog "Success!" buttons {"OK"}
  24. end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement