Power Scripts for Confluence returns "cannot load SIL content from file"
Asked by Nancy Bonanno:

Does anyone use Power Scripts for Confluence? It looks like the answer to a prayer but I installed it and copied a test script but when I add the SIL "macro" and run it, it just says "cannot load SIL content from file". Maybe I haven't configured something correctly but I don't know what.


Answers:
author: Nancy Bonanno
body: I GOT IT TO WORK! First, I'm an idiot and my program were in the folders "silprograms/**examples"**but the program is configured to look in just "silprograms."

Second, I finally found this youtube video which demonstrated the script I needed, and it's a bit different than the example that comes with the tool. Using the video, I was able to twiddle the program and add labels to my child pages.

[https://www.youtube.com/watch?v=nM0a8JM2T2E\&list=PLKTAla3ZrW8mMmYvgOVf3UPXU8V4nc-xj\&index=4](https://www.youtube.com/watch?v=nM0a8JM2T2E&list=PLKTAla3ZrW8mMmYvgOVf3UPXU8V4nc-xj&index=4)

Thank you everyone.


author: Ivan Lima
body: Hey [@Nancy Bonanno](/t5/user/viewprofilepage/user-id/3537740), did you take a look at [Scripted macros](https://confluence.cprime.io/display/PSCONF/Scripted+macros)? I would follow the steps for [ScriptMacro](https://confluence.cprime.io/display/PSCONF/ScriptMacro) so that you can get the hang of it.

If you are getting something like the screenshot below, your subfolder or files' name may be incorrect. Other than that, I don't see any other reason.  

![Screen Shot 2020-06-18 at 11.22.55 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/99495i2DFC8F85501BA826/image-dimensions/447x176?v=v2 "Screen Shot 2020-06-18 at 11.22.55 AM.png")

If you want to run the script once, you can run it from [SIL Manager](https://confluence.cprime.io/pages/viewpage.action?pageId=6560092). However, if you associate the script to a ScriptMacro, for example, every time you visit the page it will trigger the script.

Cheers,  
IL.

comments: author: Nancy Bonanno
body: Yes! I'm getting the same error as your attachment. In what way would my subfolder or file names be wrong? I just installed and left defaults. Home directory is "silprograms"... I do have the name of script correct. Any ideas?


author: Nancy Bonanno
body: I don't really need it to be something that stays on the page. Just a program that runs once and adds a label to a bunch of pages. I've tried running it from the SIL Manager and it says "success" but nothing happens. I assume I'm not replacing the variables correctly. If I could just see some working examples, I could probably figure it out!


author: Ivan Lima
body: If you can provide us with some screenshots, from your SIL manager, macro, etc., it will help the community to assess it.

Normally, when you land to one of those pages I mentioned before, you will see a chat (*bottom right*) that you can ask them to help you as well.


author: Nancy Bonanno
body: I appreciate your time and interest! Here is what I just sent to their support:

You know, I really just think I need a kickstart on how to use your tool.  
I need to add a label to a bunch of child pages just once. In the test scenario, I'm using my personal space (nb7149), the parent page ("Home page") and the children ("Child Page 1", "Child Page 2", "Child Page 3")  
I installed Power Scripts and left all the default configurations.

![config.png](https://community.atlassian.com/t5/image/serverpage/image-id/99643i275DD8887BF98782/image-dimensions/365x275?v=v2 "config.png")  
I took your example **AddLabelsToChildren** and made **TestAddLabels**. I'm not sure which variables need to be replaced and with what, though. Here is what I have at the moment.

![testprogram.png](https://community.atlassian.com/t5/image/serverpage/image-id/99644i4DDE36222D442B8C/image-dimensions/421x310?v=v2 "testprogram.png")

<br />

Right now, if I run this from the Manager, it returns the word Done but doesn't add any labels.If I add it to a macro on the Home page, it says "Cannot load SIL content from manager."  

Questions: Can I just run this script right here instead of adding it to a macro? Or do I need to add it to the macro on the Home Page?

If I run it from the Manager, how would it know which Space to add the labels to?

What do I put in the first line for "pages = "...the name of the home page? The space and the home page?

Do I need to replace PKey with something and if so, what?

Thanks for any and all help.


Tags: confluence-server

power-scripts

server