Just wondering if anybody has come across any issues using very large vbs scripts? Mine is just about to top 1000 lines and it got me wondering if I should be concerned.
I may be wrong but as far as I can figure out you can only have 1 script per applet, is this correct?
I have not found a size limitation to the vbscript files. The largest I have used are over 10 000 lines of code. I have also found that in the pc environment, the following link is useful: http://forums.esri.com/Thread.asp?c=34&f=1180&t=87072 This is quite handy if you have developed a library of routines that you would like to use in several projects (for ex. routines for reading and writing xml files)
The short version is this:
' "Include" routine for Windows VBScript Sub Include(sIncludeFileName) On Error Resume Next Dim pFSO, fInclude, sScript Set pFSO = CreateObject("Scripting.FileSystemObject") If pFSO.FileExists(sIncludeFileName) Then Set fInclude = pFSO.OpenTextFile(sIncludeFileName) sScript = fInclude.ReadAll fInclude.Close ExecuteGlobal sScript End If Set pFSO = Nothing Set fInclude = Nothing End Sub
I have not found a size limitation to the vbscript files. The largest I have used are over 10 000 lines of code. I have also found that in the pc environment, the following link is useful: http://forums.esri.com/Thread.asp?c=34&f=1180&t=87072 This is quite handy if you have developed a library of routines that you would like to use in several projects (for ex. routines for reading and writing xml files)
The short version is this:
' "Include" routine for Windows VBScript Sub Include(sIncludeFileName) On Error Resume Next Dim pFSO, fInclude, sScript Set pFSO = CreateObject("Scripting.FileSystemObject") If pFSO.FileExists(sIncludeFileName) Then Set fInclude = pFSO.OpenTextFile(sIncludeFileName) sScript = fInclude.ReadAll fInclude.Close ExecuteGlobal sScript End If Set pFSO = Nothing Set fInclude = Nothing End Sub