The Scripting Explorer
The Scripting Explorer can be launched by clicking on the Scripting Explorer tool
on the Scripting ribbon. The
Scripting Explorer allows you to organize, find, and launch
macros, reports, and Apps.
Organization of Macros in the Scripting Explorer
The Scripting Explorer provides two levels of organization: macros can be organized into Modules that can be further grouped by Project.
You can add new projects and new modules according to your requirements.
The Scripting Explorer Context Menus
The ability to cut, copy, add, delete, rename, launch, and otherwise manage projects, modules, and macros in the Scripting Explorer is accomplished through the Scripting Explorer context menus.
Each level of the organization structure has a context menu that contains the appropriate set of user options. For example, there is a context menu for projects, there is a context menu for modules, and there is a context menu for macros.
The "My Projects" Context Menu
Right-click on "My Projects" in the Scripting Explorer panel to show the top-level context menu. It includes the following options.
Add New Project: Click on this option to add a new project to the Scripting Explorer. When the New Project dialog box appears, type over the default name with the desired name for the new project, and click Save. The new project appears in the Scripting Explorer tree.
Add Existing Module...: Click on this option to add an existing project to the Scripting Explorer tree. An existing project is that is a project that was previously created and is already stored on your hard drive. When you click on this option, the Select Project dialog box appears. Navigate the existing project file (*.ipp file) that you want to add to the Scripting Explorer tree, select it, and click Open.
The Project Context Menu
Right-click on a project under "My Projects" to show the macro project context menu. It includes the following options.
Add New Module: Click on this option to add a new module to the project you right-clicked on. When the New Module dialog box appears, type over the default name with the desired name for the new module, and click Save. The new module appears appended to the list of modules for that project in the Scripting Explorer tree
Add Existing Module...: Click on this option to add an existing module to the currently-selected project. An existing module is that is a module that was previously created and is already stored on your hard drive. When you click on this option, the Select Module dialog box appears. Navigate the existing module file (*.vb file) that you want to add to the currently-selected project, select it, and click Open.
Remove Project: Click this option to remove the currently-selected project from the Macro Explorer tree. Removing the project in this way does not delete it from the hard drive.
Rename: Click this option to rename the currently-selected project. When you click Rename, the name space for the project becomes editable. Simply type over the existing name with a new name.
The Module Context Menu
Right-click on a module in the Scripting Explorer window to show the module context menu. It includes the following options.
Record New Macro: Click this option to begin a recording session. This is the same as clicking on the Record Macro tool on the Scripting tab.
Set as Recording Target: Click on this option to make the currently-selected module the recording target. New macros are automatically stored in the recording target.
Edit Code Module: Click this option to launch the Scripting Workbench and open the currently-selected module for editing.
Remove From Project: Click this option to remove the currently-selected module from the project it is currently a member of. Removing a module in this way does not delete it from the hard drive.
Cut: This option removes the currently-selected module from the project it is currently a member of, and it copies it to the Windows Clipboard. Once copied, you can right-click on the target project for the cut module, and use the Paste command to add it to that project.
Copy: This option copies the currently-selected module to the Windows Clipboard. Once copied, you can right-click on another project and use the Paste command to add it to that project.
Delete: This option deletes the currently-selected module from your hard drive.
Rename: Click this option to rename the currently-selected module. When you click Rename, the name space for the module becomes editable. Simply type over the existing name with a new name.
The Macro Context Menu
Right-click on a macro in the Scripting Explorer window to show the macro context menu. It includes the following options.
Run: Click on this option to launch the select macro.
Step In: Click this option to launch the selected macro in debug mode in the Scripting Workbench application. In debug mode, you can step through each of the macro's statements, one at a time. When you click this option, the Scripting Workbench is launched and the first statement of the macro is shown highlighted in yellow. Click on the Step Over tool (found on the Scripting Workbench's Script tab) to step through the statements. Every time you click the Step Over tool, the next statement in the macro is highlighted in yellow and that statement is executed in Image-Pro. Click the Step Out tool to quit the debug mode.
Show in Macro Panel: Click this option to display the macro designer view of the currently-selected macro. The macro designer panel displays a graphical representation of the macro's command sequence. The graphical representation makes it easy to interact with the script at a high level. Click here for more information.
Edit Code Module: Click this option to launch the Scripting Workbench and open the currently-selected macro for editing.
Rename: Click this option to rename the currently-selected macro. When you click Rename, the name space for the macro becomes editable. Simply type over the existing name with a new name.
The History View
The "History" option in the Scripting Explorer appears inside the panel at the top of the panel. The "History" option is useful for several purposes. With it, you can:
- Review actions
you have recently taken in Image-Pro.
The history panel is a log of every user action taken since Image-Pro was last opened. - Discover the
scripting language expressions for operations you might want to use in
a macro you are writing.
In this case, you can open the history panel and see the scripting language expression for an operation as soon as you execute it. - Create macros
out of operations you have done recently but did not record at the time.
The context menu for the history panel includes an option to automatically create a macro out of the user actions currently selected in the history panel.
To open the History panel:
Right-click on "History" in the Scripting Explorer panel to reveal the History context menu.
Click on Show In Macro Panel to display the history of Image-Pro actions in the Scripting Explorer window. The History panel will be displayed; each Image-Pro action that has been executed is represented in the history panel according to its Scripting toolbox notation.
See also:
- For more information, click in the top right corner of the Image-Pro application window and click on Image-ProScripting Help.