<< Prev        Next >>

ID : 5281

StatusByName

Function

To return the status of a task. Unlike Status command, you can use a formula for task name.

Syntax

StatusByName (task name)

Guaranteed entry

Task name 
Designate a task name by String Type data. Refer to "How to Designate a Task Name."

Return value

Return the status of a task designated at task name by integer type data.

Description

At the time of program execution, evaluate a formula designated as a task name and create the task name dynamically to return the status. This is useful to acquire the statuses of multiple tasks with sequential name.

Except format, other behaviors are the same as Status.

Related Terms

Status, others are the same as Status.

Attention

  • Refer to Status.
  • If a specified task is not found, "81500029: Failed to find a file." is displayed.

Example

In the following example, acquire the 9 (Pro2 to Pro10) tasks' statuses.

'!TITLE "Acquire a Task Status Using a Formula"
'Pro1.pcs
Sub Main 
	TakeArm Keep = 0
	Dim n As Integer
	'Create task name Pro2 to Pro10 using a formula and acquire their statuses
	For n = 2 To 10
		PrintDbg"Pro" & n & " = " & StatusByName("Pro" & n)
	Next
		
End Sub

ID : 5281

<< Prev        Next >>