Using Your Liquid UI Products > WS aka Web Scripts (Attended RPA for SAP)

HOSTNAME of PC using Liquid UI

(1/1)

Rahul Gera:
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"}});
}

Navigation

[0] Message Index

Go to full version