Autorun scripts is a feature of SPCoder that allows you to automatically execute some scripts when SPCoder starts.

By default SPCoder has 3 autorun scripts:
Base Imports Script – It contains some import statements so IronPython engine can communicate with SharePoint object model
Base Script – It contains definition of some IronPython utility classes. For example the out object that writes to output window is defined here.
Base AutoConnect Script – It contains a code for connecting to a SPSite. You can use to tell SPCoder to connect to the SPSite on startup. By default this line is commented, so you need to uncomment it and perhaps change the url of the SPSite to connect to.

In order to view an autorun script you need to activate autorun scripts window, select the script and click View button. This is the screenshot of Base Import Script:

autorun_1

If you want to create your own autorun script, just open new code window, write the code and save it as autorun using the button in main window’s toolbar.

autorun_2

autorun_3

autorun_4

After saving the script, you will notice that autorun scripts form contains additional entry with your new script. Next time you start SPCoder, the script will be executed.

Other features:


Main window | Explorer | Code editor | Describer | Properties | Autorun | Context | Log | Output

Last edited Jan 3, 2014 at 4:37 PM by tomdam, version 3