Forum Discussion

ringraham's avatar
ringraham
Contributor
9 years ago
Solved

Add a script file from one project to another project...

OK, I know this can be done as I have done it before, but my searches are not finding the information I need. I have a script file in one project called (example) AppControl.scs. Notice the extension here is .scs and NOT .sj. Now I want to use this same script file in several other projects with ALL of them pointing to the same copy. This will allow me to make a change to the one being referenced so all of the projects will see this change.

 

When I navigate into a project/folder where I want to add the script (.scs file), I right click and select "Add Existing Item". But the only thing it seems to allow is adding .sj files. If I try to "trick" it by double-clicking on the "AppControl.scs" file, it opens what appears to be another folder that is empty. But if I change the "Files of type:" to "All Files (*.*)", it shows a AppControl.scs.tcVis. I have tried to select this, but it comes back and tells me that it is NOT a .sj file and won't add it.

 

What am I doing wrong??  Thanks!

  • You project is set up for JScript as it's scripting language and you're trying to add a C++ script.

     

    Test complete will not let you mix and match. 

4 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    You project is set up for JScript as it's scripting language and you're trying to add a C++ script.

     

    Test complete will not let you mix and match. 

    • ringraham's avatar
      ringraham
      Contributor

      This was the issue. Thanks very much for pointing this out.

      • ringraham's avatar
        ringraham
        Contributor

        After doing some more research, I found that all of my scripts are C# scripts. I can see the language (C# in all cases) for my scripts in the editor's status bar. What I cannot figure out is, if my project is setup for JScript, why did it let me create all of these C# scripts?  From what I have read, there is no way to change the project's script type, but why does it let you do this in the first place?

         

        Unless anyone else has another suggestion, it looks like I will have to create a new project and copy my scripts there.

         

        Thanks all for the help.