Ask a Question

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

SOLVED
ringraham
Contributor

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!

1 ACCEPTED SOLUTION

Accepted Solutions
cunderw
Community Hero

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

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. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

4 REPLIES 4
cunderw
Community Hero

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

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. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

View solution in original post

ringraham
Contributor

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

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

ringraham
Contributor

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

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.

ringraham
Contributor

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

Well, the plot thickens. I thought the earlier response (that I accepted) was right as I did note it was a JScript project and the scripts were all C#. However, after attempting to fix this, I come to find out that there is no C# project.

 

Using the "Create a New Project" wizard, I started off to create a project specifically for my C# scripts. However, the last screen, which is the one where you pick your scripting language, only shows {{VBScript}, {JScript}, {DelphiScript}, {ConnectedApps Script}}. If you look at the info provided for a JScript project, it specifically says, and I quote, "Java like scripting syntax (similar to the C++ and C# syntax). OK, so it says "similar". But I don't see an option for C# scripts. So what should I use? And more importantly, how can I go about including scripts from other projects into my current project!?

 

I'm getting a little frustrated with trying to do something that seems like it should be pretty simple, but appears to actually be difficult to do. Any other suggestions would be greatly appreciated.

 

Thanks.

 

-Ron

cancel
Showing results for 
Search instead for 
Did you mean: