Keith Joubert logo - home.

Home
Contact

Binary Search
Sort Multiple Columns
Filing Functions
Extracting Excel data
Read and Write .csv files
Show Progress Messages
Send Automatic Email
Running under .hta
Setting Folder Attributes
Long-script warnings
Desktop Shortcut

 

 
LONG  SCRIPT  WARNING

Using Javascript to do intensive calculations, or file operations, can result in Internet Explorer popping-up the long-script warning.
 
The warning may pop-up several times during heavy processing times (large files, long arrays, encoding, etc) and as it is very annoying, it is advisable to edit the registry.  This necessity is due to the nanny approach taken by Microsoft to try to protect your PC from malevolent internet applications.  As one would run such applications on an individual PC or an intranet, there are no such dangers.

The registry change is simple.  However Microsoft gives the following wise caveat (abbreviated slightly by the author):

This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

HowTo Back-up & Restore The Windows Registry

To change this time-out value in Internet Explorer 4.0, 5.0, 6, or 7, follow these steps: 1. Using a Registry Editor such as Regedt32.exe (you'll find this under Control Panel &/or with Search), open this key:

HKEY_CURRENT_USER\Software\Microsoft\InternetExplorer\Styles

Note If the Styles key is not present, create a new key that is called Styles. 

2. Create a new DWORD value called "MaxScriptStatements" under this key and set the value to the desired number of script statements.

By default the key doesn't exist. If the key has not been added, Internet Explorer 4 defaults to 5,000,000 statements executed as the trigger for the time-out dialog box.

Author's note: Here are some PC typical settings used with success: 

Ab typical registry entry. This value worked well for me (Vista)

With these changes, because the Internet Explorer 4.0, 5.0, 6, and 7 time-out is based on the number of script statements executed, the time-out dialog box will not display during ActiveX control or database-access delays.  Nevertheless, endless loops in script will still be detected, which is what one wants.

TopTop