#! /usr/bin/rebol -qs
Rebol [
    File: %ping.r
    Date: 06-July-2006
    Title: "Rebol Ping"
    Version: 1.0.
    Author: "François Jouen"
    Rights: {Copyright © EPHE 2006}
    Purpose: {Basic ping version using call}
    library: [
        level: 'beginner
        platform: 'all
        type: 'tool
        domain: [shell tcp ]
        tested-under: all plateforms
        support: none
        license: 'BSD
        see-also: none
    ]
    
]

  
secure [
	net allow
	shell allow
]

		
; include our binary image into script    
img: load 64#{
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQH/wAARCABWAGQDASIAAhEBAxEB/8QAHQAAAgIDAQEBAAAA
AAAAAAAAAAkHCAUGCgMEAv/EAEMQAAEEAwAABQIBBwgGCwAAAAQCAwUGAQcIAAkS
ExQRFRYXGFRXlrXUGSM2OHZ3ldEKGjRHh8YhIiQlKESSk5TV1v/EAB0BAAEDBQEA
AAAAAAAAAAAAAAkABwgCAwQFBgr/xAA4EQACAwEAAQQBAwICBQ0AAAACAwEEBQYH
AAgREhMUFSEJIhcjFjE1N1ZBUWFidXaSlLG0tdTV/9oADAMBAAIRAxEAPwDkd5g5
g1dtTVzNutzM8/Lvz0uDnIMvkEZsYHIzbDbbDY2c/X65W4tbi3FqW4rGFYbwhCLD
/mM6H/QrT+0bv8N43Ty99dXi2c9DykBWZQ2GYuNlEJnlspBropaFBOZFMsMgsSFE
Izh4dKWST2nFulBsISp4sZt20UwPWKx8ddu2zoeqMEOIbS7Nb51Dh/CckCsPPIiI
65SE8W2JgtggrEfEmPNCq9/2lIUj1Si5fovbdncvhJ67qfFNLo4oIDSoa3Uc8jc/
XyEsNDsxuiOhNyQ+DmvFaXyP90L+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zPNS2/uzZgWxNwa61pfAKglb+ptaSI88nWWtbC40oZy8pqb0uWHf
rukX6JCkdj5tEHEEPGPw1cj0vDMBHg8Yt2lV0araV1UWKj/pFiuRGKrCwYDCr2QA
hixUf9Pw3KbvvVvVTdTuJfUe5LKhMwn7KY1LIgoByGsRYSRDIw2vYSQPrWF/P3RZ
Qxdiu0Qehq3LAx1mX8yTZc/JFzE5UIWYljnMOmyUnOTpxxTiUIaQsgol1x53KGm2
2ketefQ02htH0QhKcY7+UMu36vat/iMt/n4PB4cir5R72jWr0qXR2qlOohNWpUq1
6FetVrV1ipFeuhVQFIQhQApKVAK1rEQAREYiGif4K8UWXOs2ePq2LFhrHvsP0dpr
nuacsa5zWaRMa1pyRsYZEZmREUzJTMn8oZdv1e1b/EZb/Pwfyhl2/V7Vv8Rlv8/B
4PF//FryN/xXo/8Ahqf/AFvVr/APxD/wTQ/87r//AKP/AEf+v/PPr6JzzDrNbali
kXPVFOtECAR93p6zJ22R8/rS2tEoOBu2sbTCSMZYKTZQpBpox1UTIIhp1bTTNoh5
0ZlhhqX1ecFum06qq+tNyaw1lt2Wpfx3artqTJutV25BSwDKWYu4Q14qVljJavbA
AbwphVzqz0BJyQmcsy6T3C5h+VPB4bqxEWtbV3HAEae48Leu9KwrBfugJAWhYq1h
VULSsBIhd0YRF6+CaoXbFgalWEufj5NHAyaOHlLcjKzQJOfUdcuXRo1yL7/pKrL9
iy9FIDk2JpLaNVDGvYlKze4meED5xnTctbKxsHopqM6uvOvmY0XV0nuKUmWa1rRE
WJkVudq2uaW/WaB+UY/1KVMbbmK9K7NkWWhBXLS2y0/guyf+sHdC/qM0z/8AKu//
AN/4PB4XrY+kqbv2vM7029sbcVhjoyHmtkW2YtsjFw2CsRceRLFLIUIFk4gotTLC
cpbwt99bjmUqXn0YVhCTweDwvS9f/9k=
}

;depends on the computer 0S (by default Unix-like)

countos: "c"
; makes ping to the host
ping: does [
	buffer: copy ""
	clear result/text
	show result
	commande: join "ping " ["-" countos " " count/text " " ipadr/text]
	bt/text: join "Ping " ipadr/text
	show  bt
	; call external call
	call/output commande buffer
	bt/text: "Ping " 
	show  bt
	append result/text buffer
	; for Unices OS
	n: to-integer length? buffer
	if n = 0 [append result/text "Network Error"]
	show  result
]



mainwin: layout [
origin  5x5
space 5x5
across
at 10x10 label 200 "Host"  left  
ipadr: field 100 to-string system/network/host-address
at 10x40 label 200 "Counts" left count: field 100 "2" 
at 10x70 label 200 "Operating System" os_ch: toggle "Unix" "Windows"  [ either os_ch/data [countos: "n"][countos: "c"]]

at 325x10 bt: button "Ping" 100x86 img [ping]
space 0x0
at 10x100 result: area 400x300 wrap
sl: slider 16x300 [scroll-para result sl]
at 325x400 button  "Quit"  [Quit]
]

view center-face MainWin