Ping test

Hello, i’m trying to do a script able to verify ping test.

i write from recently… i would start by this easy software:

tell application "Terminal"
	tell application "System Events" to keystroke "ping -c 5 -t 5 [url=][/url]"
	tell application "System Events" to key code "52"
end tell

The problem is that when i open this script as application, my Finder go in crash. It’s a bug or it’s the script?

Greetings from Italy

this is the script:

do shell script "ping -c5 -t5 [url=][/url]"
display dialog result buttons {"OK"} default button 1

Hi LightSoul94. Welcome to MacScripter.

You’ve posted your query in our Code Exchange forum, which, as explained in the sticky post linked at the top of the forum’s topic list, is for sharing working code with others.

Our forum for questions about scripting is AppleScript | Mac OS X. I’ll see if I can get one of the Administrators to transfer this thread there.

Hey There,

Let’s not use System Events when AppleScript will do. :slight_smile:

set _cmd to "ping -c 5 -t 5 [url=][/url]"
tell application "Terminal"
	do script _cmd in front window
end tell

ah… ok i ask sorry i didn’t understand… :frowning:

No worries. Asking questions is how you get closer to understanding. :wink: