Write to tag based on a Boolean vale

Hey guys, so I have this Boolean tag that comes on meaning Press change over has started, when the bit goes off I want to grab the time it went off and store it, so I create a check-box component and an label component and a custom tag called date. in my check-box component I made a custom property called date and in the expression window I used "now()’ so basically that time is always running. Now in script editor under mouse clicked event handler I used the following code:

value = event.source.parent.getComponent('CheckBox').Date

if (event.source.selected == 0):
	system.tag.writeToTag('Press Lines/Press 1/ChangeOver_Date', value)

I have the tag value bind to the label. every time I select the box nothing happens so thats great and when I un-select it the time stamp changes and thats great as well. Now I need this to happen when the tag value changes. I pretty much did all this to test and make sure date is changed when the bit goes off now I need to apply this to a tag. should I change the PropertyChange or StateChange under event handler?
using 7.7.4 version

I would put this in a gateway tag change script or on the tag’s built in event scripts(if you are running a newer version of Ignition)

Not sure what version you’re running but the new tag events (inside a tag) are pretty freakin awesome.

I’ve been using them for similar instances.

docs.inductiveautomation.com/di … ge+Scripts

Still using 7.7.4, Wanted to wait a bit longer before having to update to version 8.0
Got another question, so when my ChangeOver bit turns off the Press job is ready to go and I want to start a timer and have it count till that ChangeOver bit comes back on since that mean the next job is getting ready to go in this way I can figure out how long a job was in the press line, now I know I can use a timer component and bind the running property to the ChangeOver bit and have it start counting when the bit goes off now how should I approach having it stop counting when the bit comes on?