# Project script not running in Client Startup Script

**URL:** <https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584>\
**Category:** Ignition\
**Created:** [August 11, 2020, 6:26am UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584 "2020-08-11T06:26:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yin.cheng](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yin.cheng](https://forum.inductiveautomation.com/u/yin.cheng)\
**Post date:** [August 11, 2020, 6:26am UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/1 "2020-08-11T06:26:33Z")

</div>

Hi, I have created a project script in the following path:  
Under Scripting-\>Project Library-\>project-\>customStartUp  
Under project.customStartUp i have defined as follow:  
def tagChecks():  
if system.tag.read(“tag”).value == 1 :  
system.nav.openWindow(‘screen1’)  
else:  
system.nav.openWindow(‘screen2’)

And then i go to Client Event Scripts-\>Startup script:  
project.customStartUp.tagChecks()

However when i start a runtime, the script doesnt seem to be working as neither screen1 or screen 2 appear during the startup.

May i know where have i gone wrong?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 11, 2020, 12:05pm UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/2 "2020-08-11T12:05:12Z")

</div>

Look in your diagnostic console. Such problems often show up as a syntax error that prevented loading of the script.

---

<div class="post-metadata">

**Author:** ![yin.cheng](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yin.cheng](https://forum.inductiveautomation.com/u/yin.cheng)\
**Post date:** [August 12, 2020, 3:57am UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/3 "2020-08-12T03:57:10Z")

</div>

Hi pturmel,

I looked into the diagnostic console and i saw:  
11:48:12.916 [ProjectDownloader] ERROR Scripting.ScriptManager.Filling - Warning: collision at system.util.modifyTranslation  
11:48:12.917 [ProjectDownloader] ERROR Scripting.ScriptManager.Filling - Warning: collision at system.util.translate  
11:48:12.922 [ProjectDownloader] ERROR Scripting.ScriptManager.Filling - Warning: collision at system.util.initialize

However when i tried to run project.customStartUp.tagChecks() in designer’s Script Console, it was working, the correct screen was opened in the designer.

I am not sure why system.util… was required?..

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 12, 2020, 11:57am UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/4 "2020-08-12T11:57:00Z")

</div>

Those “collision” errors in the diagnostic console are a harmless IA bug. Was there no other error in the client? (Startup doesn’t run in the designer.)

---

<div class="post-metadata">

**Author:** ![yin.cheng](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yin.cheng](https://forum.inductiveautomation.com/u/yin.cheng)\
**Post date:** [August 12, 2020, 12:24pm UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/5 "2020-08-12T12:24:45Z")

</div>

No, there’s no other error.

In fact, i have also tried implementing directly on the startup script:  
if system.tag.read("[Filling]FILLING\_SYSTEM/dummy").value == 1 :  
system.nav.openWindow(‘Filling System/screen1’)  
system.nav.centerWindow(‘Filling System/screen1’)

I have ensured that the bit is 1 throughout. But during startup the popup screen is not showing.  
By the way, I am using Ignition Edge 8.0.13

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 12, 2020, 12:37pm UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/6 "2020-08-12T12:37:05Z")

</div>

Scatter some print statements through your code to show the values you are getting at various points, and to show whether the logic gets to certain spots. Look for the output in the client’s diagnostic console.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [August 12, 2020, 12:44pm UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/7 "2020-08-12T12:44:31Z")

</div>

> [@yin.cheng](#):
>
> I am using Ignition Edge

Do you have the scripting (think it's called 'compute') add-on module?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 12, 2020, 1:05pm UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/8 "2020-08-12T13:05:22Z")

</div>

Not required for client event scripts in Vision.

---

<div class="post-metadata">

**Author:** ![yin.cheng](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yin.cheng](https://forum.inductiveautomation.com/u/yin.cheng)\
**Post date:** [August 14, 2020, 3:39am UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/9 "2020-08-14T03:39:20Z")

</div>

Hi, I don’t have this add-on module installed.

---

<div class="post-metadata">

**Author:** ![yin.cheng](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yin.cheng](https://forum.inductiveautomation.com/u/yin.cheng)\
**Post date:** [August 14, 2020, 3:44am UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/10 "2020-08-14T03:44:58Z")

</div>

I have tried this on the startup script:

print ‘beginning of script’

if system.tag.read(“tag”).value == 1 :  
system.nav.openWindow(‘screen1’)  
print’open window’  
system.tag.write(“writetag”, 1)  
print ‘tag write function’  
else :  
system.nav.openWindow(‘screen1’)  
print ‘else function’

print ‘end of script’

On the diagnostic console:  
11:37:25.472 [ProjectDownloader] ERROR Scripting.ScriptManager.Filling - Warning: collision at system.util.modifyTranslation  
11:37:25.565 [ProjectDownloader] ERROR Scripting.ScriptManager.Filling - Warning: collision at system.util.translate  
11:37:25.567 [ProjectDownloader] ERROR Scripting.ScriptManager.Filling - Warning: collision at system.util.initialize  
11:37:26.647 [AWT-EventQueue-0] INFO vision.App - Starting Up…  
**beginning of script**  
**open window**  
**tag write function**  
**end of script**

On the tag browser, writetag has changed from 0 to 1. But it seems that it was not recorded on the diagnostic.  
I have also opened up the menu and windows bar to check all the screens that are currently being opened, but ‘screen1’ is not there as well…

---

<div class="post-metadata">

**Author:** ![yin.cheng](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@yin.cheng](https://forum.inductiveautomation.com/u/yin.cheng)\
**Post date:** [August 14, 2020, 6:56am UTC](https://forum.inductiveautomation.com/t/project-script-not-running-in-client-startup-script/37584/11 "2020-08-14T06:56:34Z")

</div>

Hi All

Im so sorry, it is due to my negligence.  
The popup screen that i was trying to display, had a internalFrameDeactivated script action whereby it will close this screen when the window loses focus.

During normal operation, the popup screen would display, and only after i clicked somewhere else on the screen, the screen would then be closed automatically.  
I assumed that it would behave the same during startup.

However I realised that the screen seems to be closed automatically during the startup, without appearing first and wait for a ‘lose focus’ instead.  
It is just assuming that it has lost its focus during the startup?..  
(The screen has the highest layer number and I did not click anywhere else during startup)
