The E-Studio applications will automatically search for any package files installed on your machine. By default, E-Studio will search in the location of any professionally installed packages) and the My Experiments folder (i.e., My Experiments\Packages). If additional folders are specified as PackageFile Search Folders under the Packages options in E-Studio, they will also be searched.
PackageFile Search Folders
When the E-Studio application is launched, it will automatically search for package files in the user packages folder (i.e. ...My Experiments\Packages). This is the default location specified as PackageFile Search Folders under the Packages options in E-Studio (accessed via Tools…Options in E-Studio for the “Just For Me (Per User)” folder. In addition, the location of any Certified Package Files that have been installed will appear in the “For Everyone (Per Machine)” folder. You may add additional search folders by first clicking the Browse button to navigate to a folder location and then selecting the ‘Add’ button. E-Studio will search in the all folders that are shown in both the “For Just Me” and “For This Computer” settings.
All package files must be placed in a valid location as specified under the PackageFile Search Folders options. Additional search folders can be added if packages files will be stored in locations other than the default locations.
When a location is specified under the PackageFile Search Folders options, E-Studio will search the specified folder and one level of sub-folders.
For example, if C:\Packages is specified under the PackageFile Search Folders options, E-Studio will search for package files in C:\Packages\PST, but not in C:\Packages\PST\Files, since the latter is two sub-folder levels from the search folder specified.
Search locations can be specified for everyone (i.e., all users), or only for the current user. E-Studio will search for package files in the default locations first, then in the locations specified for all users, and finally in locations specified for only the current user.
If a package file will require resources (e.g., images, sounds, etc) to be present on a machine, the package file must be capable of checking to ensure that these resources are available. Checking for resource files can be done using executable E-Basic script in the InitPackages component or within a routine.
Resource availability can be verified by checking a specific key within the Registry, or by checking each file individually. Files can be checked individually using the FileExists function in E-Basic. For example, if a specific bitmap file was required by the package file, the following script could be entered into a routine, and the routine could be called at the start of an E-Prime experiment using a PackageCall object:
If Not FileExists("C:/Packages/PST/Logo.bmp") Then
'Insert script to handle the absent file.
In this example, script would be used to handle the resource file not being found on the machine. This could involve using a default (e.g., blank) image file, or terminating the experiment altogether.
Package File Loading Errors
If an error occurs when E-Studio attempts to load a package file after being launched, no error message will be presented within the application. Instead, the error will be written to the E-Studio. log file that is created when E-Studio launches, if the option to create the E-Studio.log file has been enabled.
|Invalid search path.||Verify that the locations specified as PackageFile Search Folders under the Packages options in E-Studio are valid.|
|Corrupt package file.||The package file must be recreated or recovered from a backup copy.|
|Icon associated with the package file cannot be found.||Verify that the file used as the icon for the package file is located on the machine and in the same folder as the package file.|
|Two package files with identical names were encountered.||E-Studio will check the GUID of each package file. If they are not identical, the package file E-Studio attempted to load first will be used.|
Previous Article: PACKAGEFILE: Opening and Saving PackageFiles