Author Topic: HOSTNAME of PC using Liquid UI  (Read 5112 times)

Rahul Gera

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 88
    • View Profile
HOSTNAME of PC using Liquid UI
« on: July 17, 2018, 12:39:56 PM »
Purpose: To identify the HOSTNAME of PC using Liquid UI Script.

Compatibility:
Liquid UI for Desktop version 1.2.339.0 and above
Liquid UI Server version 3.5.583.0 and above

system variable _hostname is used to get the desired result.

Below Liquid UI Script provide an intuitive screen design to get the hostname of the current PC
** SAP EASY ACCESS Screen **


Liquid UI Script:
function GetHostName(param){
   var hostparam = param.h_param;
   if(hostparam == "hostname"){
      set("V[z_hostname]",_hostname);
      println("\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n System Variable: "+_hostname+"\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
      println("\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n Liquid UI variable: "+z_hostname+"\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
   } else{
      set("V[z_hostname]","");
   }
}

del('X[IMAGE_CONTAINER]');
if(isBlank(z_hostname)){
   box([0,0],[10,100], "Hostname");
   pushbutton("G[Hostname]+[3,10]", "Get Hostname", "?",{"process":GetHostName, "using":{"h_param":"hostname"}});
}
if(!isBlank(z_hostname)){
   box([0,0],[10,100], "Hostname");
   text("G[Hostname]+[4,10]","HostName of this machine is: "+z_hostname);
   pushbutton("G[Hostname]+[3,10]", "Clear Hostname", "?",{"process":GetHostName, "using":{"h_param":"clear"}});
}
« Last Edit: July 17, 2018, 12:46:59 PM by Rahul Gera »