# Indirect tag for a mouse event in event handlers

**URL:** <https://forum.inductiveautomation.com/t/indirect-tag-for-a-mouse-event-in-event-handlers/5038>\
**Category:** Ignition\
**Created:** [August 21, 2012, 3:01pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-for-a-mouse-event-in-event-handlers/5038 "2012-08-21T15:01:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amr123](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@amr123](https://forum.inductiveautomation.com/u/amr123)\
**Post date:** [August 21, 2012, 3:01pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-for-a-mouse-event-in-event-handlers/5038/1 "2012-08-21T15:01:14Z")

</div>

Can a indirect tag be used for a mouse event in the event handlers?

I have tried many ways with no success.

Please help!

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [August 21, 2012, 3:04pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-for-a-mouse-event-in-event-handlers/5038/2 "2012-08-21T15:04:51Z")

</div>

Sure, you can address tags indirectly in scripting. Here is an example:`var = event.source.parent.propVar
value = system.tag.read("Path/to/%s/tag" % var)`You can see in this example we are sticking the var variable in the path. You can replace any part of the path.

---

<div class="post-metadata">

**Author:** ![amr123](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@amr123](https://forum.inductiveautomation.com/u/amr123)\
**Post date:** [August 21, 2012, 4:03pm UTC](https://forum.inductiveautomation.com/t/indirect-tag-for-a-mouse-event-in-event-handlers/5038/3 "2012-08-21T16:03:20Z")

</div>

Awsome! I just got off the phone with Dave and that is what he said too! ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")

My code:

tagpath = str(event.source.parent.Device) + “/C/6/State”  
system.tag.write(tagpath,0)
