Method: IsPlaying for Cursor
- Updated2024-09-12
- 2 minute(s) read
DIAdem VIEW > Methods > Method: IsPlaying for Cursor
Method: IsPlaying for Cursor
Specifies whether the cursor moves automatically along the active curve in the active area, or whether the video runs in the active area.
To start the video, click Play or Repeat Play on the DIAdem VIEW toolbar, or use the methods Play or RePlay in a script.
bIsPlaying = Object.IsPlaying()
| Object | Cursor Object with this method |
| bIsPlaying | Boolean The IsPlaying method returns the value TRUE while the video is running, otherwise FALSE. |
The following example executes the user command DisplayCursor when the cursor moves:
| VBScript | Python |
View.Events.OnCursorChanged = "DisplayCursor"
The DisplayCursor.vbs script displays the current cursor settings in a textbox while the video is running:
| VBScript | Python |
Sub DisplayCursor(oCursor) Dim Text If oCursor.IsPlaying Then Text = Text & "Mode : " & oCursor.Mode & vbCrLf Text = Text & "Type : " & oCursor.Type & vbCrLf Text = Text & "X1 : " & oCursor.X1 & vbCrLf Text = Text & "Y1 : " & oCursor.Y1 & vbCrLf Text = Text & "X2 : " & oCursor.X2 & vbCrLf Text = Text & "Y2 : " & oCursor.Y2 & vbCrLf Text = Text & "dX : " & oCursor.dX & vbCrLf Text = Text & "dY : " & oCursor.dY & vbCrLf Text = Text & "P1 : " & oCursor.P1 & vbCrLf Text = Text & "P2 : " & oCursor.P2 & vbCrLf oCursor.Sheet.Areas(2).DisplayObj.Text = Text End If End Sub