# Opening a window on property change

**URL:** <https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473>\
**Category:** Ignition\
**Created:** [May 14, 2013, 8:09pm UTC](https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473 "2013-05-14T20:09:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![onestank](https://avatars.discourse-cdn.com/v4/letter/o/ba9def/32.png) [@onestank](https://forum.inductiveautomation.com/u/onestank)\
**Post date:** [May 14, 2013, 8:09pm UTC](https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473/1 "2013-05-14T20:09:25Z")

</div>

I am trying to open and center a window when this timer starts running.

If event.source.running = 1:  
system.nav.openWindow (‘EvacuationFlag’)  
system.nav.centerWindow (‘EvacuationFlag’)

Error states:  
parse error for event handler “propertyChange”  
SyntaxErrorL (“mismatched input ‘event’ expenting NEWLINE”,(",1,3,'If event.source.running=1:‘n’))

I am not sure what this error is trying to tell me. Hopefully yall can tell what I am doing wrong.

Thanks

Ryan

---

<div class="post-metadata">

**Author:** ![CPowell](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@CPowell](https://forum.inductiveautomation.com/u/CPowell)\
**Post date:** [May 14, 2013, 8:15pm UTC](https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473/2 "2013-05-14T20:15:01Z")

</div>

You have a syntax error is all.

If event.source.running == 1:

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![onestank](https://avatars.discourse-cdn.com/v4/letter/o/ba9def/32.png) [@onestank](https://forum.inductiveautomation.com/u/onestank)\
**Post date:** [May 14, 2013, 8:19pm UTC](https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473/3 "2013-05-14T20:19:32Z")

</div>

I tried  
If event.source.running == 1:  
system.nav.openWindow (‘EvacuationFlag’)  
system.nav.centerWindow (‘EvacuationFlag’)

same error

---

<div class="post-metadata">

**Author:** ![onestank](https://avatars.discourse-cdn.com/v4/letter/o/ba9def/32.png) [@onestank](https://forum.inductiveautomation.com/u/onestank)\
**Post date:** [May 14, 2013, 8:20pm UTC](https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473/4 "2013-05-14T20:20:44Z")

</div>

sorry didn’t copy well  
If event.source.running == 1:  
(tab) system.nav.openWindow (‘EvacuationFlag’)  
(tab) system.nav.centerWindow (‘EvacuationFlag’)

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [May 14, 2013, 8:32pm UTC](https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473/5 "2013-05-14T20:32:00Z")

</div>

Try using a lowercase i for the “if” statement. Also, when posting code, it’s a good idea to use the code tags, makes it more readable:

`if event.source.running == 1:
	system.nav.openWindow ('EvacuationFlag')
	system.nav.centerWindow ('EvacuationFlag')`

---

<div class="post-metadata">

**Author:** ![onestank](https://avatars.discourse-cdn.com/v4/letter/o/ba9def/32.png) [@onestank](https://forum.inductiveautomation.com/u/onestank)\
**Post date:** [May 14, 2013, 10:36pm UTC](https://forum.inductiveautomation.com/t/opening-a-window-on-property-change/6473/6 "2013-05-14T22:36:47Z")

</div>

That was it. Thank you folks. I guess I have inadvertently always used lower case.
