I’m using “first seen” to launch some elements when (and only when) a target image is first detected. I can do this with Actions but not with Scripting.
Here’s a simple example using Actions. A red plane appears on first seen; a green box appears on seen. Both red and green disappear when not seen. Therefore:
- When target is first seen, BOTH appear
- When target is lost, BOTH disappear
- When target is seen the second time, ONLY the green box appears.
FirstSeen_WithActions_WORKS.zpp (233.3 KB)
I can’t figure out how to do this with Scripting; I haven’t managed to locate documentation on how to implement “first seen” in the code. Mostly, I’ve tried substituting “first seen” or “firstseen” where I would have put “seen” or “notseen” in other code. So far, no luck:
FirstSeen_WithScripts_DOESNT_WORK.zpp (233.2 KB)
Can anyone help me integrate what seems like straightforward functionality into my code? I think it must be quite simple, but multiple attempts continue to fail… Thanks.