docu4 Last Step:

Including this fuction in "normal" YCP-Script with user interface

Write a file /tmp/test_ping.ycp:

{

          map hosts = SCR(`Execute(.ping, ["www.suse.de"]);
//	                        ^
//	                        | Read needs a `

	  string output = sformat("Host: www.suse.de is %2 ",
	                           lookup(hosts, "www.suse.de") );

   UI(``{
          OpenDialog(`Label(  output  ));
          UserInput();
          CloseDialog();
        });
}


Eingabe: /usr/lib/YaST2/bin > ./y2base /tmp/test_ping.ycp qt ^^^ Ausgabe: A popup ...



<< Back  Next>>