display dialog "Select the amount of processor cores of your Mac, exclude Hyper-threading." buttons {"2", "4", "+"} with title "OS X Hardware Stress Test"
set the button_pressed to the button returned of the result
if the button_pressed is "2" then
display dialog "Dual Core Stress Test is ready to run. This test will run for 5 minutes." buttons {"Run", "Quit"} with title "OS X Hardware Stress Test"
if the button returned of the result is "Run" then
do shell script "open /Applications/Utilities/Terminal.app"
delay 2
tell application "System Events"
keystroke "k" using command down
keystroke "yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null"
key code 36
delay 300
keystroke "c" using control down
keystroke "k" using command down
end tell
do shell script "killall Terminal"
end if
else if the button_pressed is "4" then
display dialog "Quad Core Stress Test is ready to run. This test will run for 5 minutes." buttons {"Run", "Quit"} with title "OS X Hardware Stress Test"
if the button returned of the result is "Run" then
do shell script "open /Applications/Utilities/Terminal.app"
delay 2
tell application "System Events"
keystroke "k" using command down
keystroke "yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null"
key code 36
delay 300
keystroke "c" using control down
keystroke "k" using command down
end tell
do shell script "killall Terminal"
end if
else
display dialog "Select the amount of processor cores of your Mac, exclude Hyper-threading." buttons {"6", "8", "12"} with title "OS X Hardware Stress Test"
set the button_pressed to the button returned of the result
if the button_pressed is "6" then
display dialog "Six Core Stress Test is ready to run. This test will run for 5 minutes." buttons {"Run", "Quit"} with title "OS X Hardware Stress Test"
if the button returned of the result is "Run" then
do shell script "open /Applications/Utilities/Terminal.app"
delay 2
tell application "System Events"
keystroke "k" using command down
keystroke "yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null"
key code 36
delay 300
keystroke "c" using control down
keystroke "k" using command down
end tell
do shell script "killall Terminal"
end if
else if the button_pressed is "8" then
display dialog "Eight Core Stress Test is ready to run. This test will run for 5 minutes." buttons {"Run", "Quit"} with title "OS X Hardware Stress Test"
if the button returned of the result is "Run" then
do shell script "open /Applications/Utilities/Terminal.app"
delay 2
tell application "System Events"
keystroke "k" using command down
keystroke "yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null"
key code 36
delay 300
keystroke "c" using control down
keystroke "k" using command down
end tell
do shell script "killall Terminal"
end if
else
display dialog "Twelve Core Stress Test is ready to run. This test will run for 5 minutes." buttons {"Run", "Quit"} with title "OS X Hardware Stress Test"
if the button returned of the result is "Run" then
do shell script "open /Applications/Utilities/Terminal.app"
delay 2
tell application "System Events"
keystroke "k" using command down
keystroke "yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null & yes HackTeam > /dev/null"
key code 36
delay 300
keystroke "c" using control down
keystroke "k" using command down
end tell
do shell script "killall Terminal"
end if
end if
end if
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.