Advertisement
anderes

OBEL: Ping & TraceRoute routines

Feb 6th, 2018
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ~v_button/IPbutton colorReleasedFace: 254 topBevel: 7  bottomBevel: 8;    
  2.   ~v_button/IPbutton setLabelColor: 255;
  3.   ~v_button/IPbutton setLabel: \"Ping\";
  4.  
  5.   ~v_button/IPtrace colorReleasedFace: 254 topBevel: 7  bottomBevel: 8;    
  6.   ~v_button/IPtrace setLabelColor: 255;
  7.   ~v_button/IPtrace setLabel: \"Trace\";
  8.  
  9. method Trigger onmsg: msg
  10. begin
  11. | IPget mongo |
  12.   IPget = self getText;
  13.   mongo = \"CMD /C  ping -a -n 6 \" << IPget;
  14.   System spawn: mongo;
  15.  ^true
  16. end
  17.  
  18.     IconToolTipText = "Ping-a-doodle" ;
  19.       ActionList = (
  20.          Action = (
  21.             Trigger = (
  22.                TriggerName = "LeftMouseButtonRelease" ;
  23.                ObelCode = "' SCCSid is \"@(#)Button.obel    6.1 3/1/96\" '
  24.  
  25. method Trigger onmsg: msg
  26. begin
  27.  
  28. | IPget mongo  rtuB  descB |
  29.   IPget = ~v_rt_text/IPbox getText;
  30.  
  31.   (IPget == \"localhost\")                          'e.g., Sta145'
  32.      ifTrue:  
  33.        [ IPget = ~v_rt_text/RTUbox getText;
  34.          ~v_rt_text/IPbox  setFGColor: 128;    
  35.        ];
  36.  
  37.   (IPget == \"pccrealtime\")                            'e.g., Sta85'
  38.      ifTrue:  
  39.        [ IPget = ~v_rt_text/RTUbox getText;
  40.          ~v_rt_text/IPbox  setFGColor: 128;    
  41.        ];
  42.  
  43.   mongo = \"CMD /C  tracert \" << IPget;
  44.   System spawn: mongo;
  45.  
  46.  ^true
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement