Mac OS 8.6: Out of Memory Running An AppleScript

Running Mac OS 8.6, the following AppleScript that addresses the Desktop Printer Manager results in the error "Desktop Printer Manager got an error: Out of memory":

set the DTP_name to "your printer's name"
tell application "Desktop Printer Manager"
set the default printer to desktop printer the DTP_name
end tell

This same script works fine on other versions of the OS, such as Mac OS 8.5.
Note: Desktop Printer Manager is the scripting extension that allows control of Desktop Printers from AppleScript.

Workaround:
Increasing the memory set aside for the Desktop Printer Manager should resolve this issue. To increase memory allocation follow the steps listed below.

WARNING:
The instructions in this article refer to using ResEdit to alter system software. Apple Computer, Inc., is not liable for any damage done to software through the use of ResEdit to alter the software. ResEdit is supported by APDA. For contact information on APDA, search the Tech Info Library under "APDA".

Steps to increase memory allocation:

1. Open ResEdit.

2. Open the file Desktop Printer Manager (located in System Folder: Scripting Additions: Desktop Printer Manager).

3. Double-click on the SIZE resource.

4. Double-click on ID -1.

5. Scroll to the bottom of the window, to the "Size" and "Min size" boxes.

6. Increase the memory allocated for each, from 131072 to 200000.

7. Quit ResEdit; save changes.

8. Run your script and it no should longer display the out of memory error.
Published Date: Feb 18, 2012