Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


9.4.3 IsExistService (check whether a service exists)

Purpose

Checks whether a service exists and returns True or False.

Syntax
IsExistService(ServiceInfoName)
Argument
ServiceInfoName

Specify the service information name or service name to check. Write a character string or a variable that stores this value.

Description

The IsExistService command checks whether a service has been registered. The command returns True if the service has been registered, or False if not.

Service information refers to an object that encapsulates information about the service. Although you can specify a service name instead, the service information name is better.

Example
' Delete the JP1/Script service if it exists.
ServiceSetValue("JSService", Name::"JP1_Script")
If  IsExistService("JSService")  Then
  ServiceDelete("JSService")
End
JP1/Script version

Supported from JP1/Script 01-00.