Home > OS >  Microsoft VBScript runtime error error '800 a01a8' lack of object: 'objExplorer. Docu
Microsoft VBScript runtime error error '800 a01a8' lack of object: 'objExplorer. Docu

Time:09-18


'% RunPerInstance
'@
'@ DESCRIPTION
'@ the Create input files for code - V
'@
'@ the USAGE
'@ After completing a 3 d analysis, type "mpi2codev" in the command line. No parameter is men.
'@
'@ INTERFACE FILES
'@ Interface file is saved "according to code V input format and the extension. The name is int.
'@ Code V File version Supported Code V version 9.8.1
'@
'@ @
Option Explicit
The Function InputBox1 (prompt)
Dim Res
Res=InputBox (prompt)
Then If Len (Res)=0
MsgBox (" Script is aborted by the user ")
Err, Raise vbObjectError + 1, "User Entry", "the Script is aborted by the User"
End the If
InputBox1=Res
End the Function
The Function SmoothArray (CountArray ValArray, MaxI, MaxJ, I, j, Count)
Dim Res, k, Val
Res=0
The Count=0
Val=0
If (CountArray (I, j) & gt; 0) Then
Res=ValArray (I, j)/CountArray (I, j)
SmoothArray=Res
Return
End the If
If (iK=I + 1
The Count=CountArray (k, j) + Count
Val=ValArray (k, j) + Val
If (j> 1) Then
The Count=CountArray (k, j - 1) + Count
Val=ValArray (k, j - 1) + Val
End the If
If (jThe Count=CountArray (k, j + 1) + Count
Val=ValArray (k, j + 1) + Val
End the If
End the If
K=I
If (j> 1) Then
The Count=CountArray (k, j - 1) + Count
Val=ValArray (k, j - 1) + Val
End the If
If (jThe Count=CountArray (k, j + 1) + Count
Val=ValArray (k, j + 1) + Val
End the If
If (i> 1) Then
K=1
I -The Count=CountArray (k, j) + Count
Val=ValArray (k, j) + Val
If (j> 1) Then
The Count=CountArray (k, j - 1) + Count
Val=ValArray (k, j - 1) + Val
End the If
If (jThe Count=CountArray (k, j + 1) + Count
Val=ValArray (k, j + 1) + Val
End the If
End the If
If (Count> 0) Then
Res=Val/Count
End the if
SmoothArray=Res
End the Function
The Function Atan2 (y, x)
If X> 0.0 Then
Atan2=Atn (y/x)
Else If (x<0) Then
If (y> 0) Then
Atan2=Atn (y/x) + 3.1415926
The Else
Atan2=Atn (y/x) to 3.1415926
End the If
Else If (y> 0) Then
Atan2 3.1415926/2.0=
Else If (y<0) Then
Atan2=3.1415926/2.0 -
The Else
Atan2=0.0
End the If
End the If
End the If
End the If
End the Function
Sub Main
Dim Synergy, PlotMgr StudyDoc, Node1, IndpValues, node_1, p_1, Coord, queryValues
Dim SynergyGetter
On the Error Resume Next
Set SynergyGetter=GetObject (CreateObject (" WScript. Shell "). ExpandEnvironmentStrings (SAInstance "% %"))
On Error GoTo 0
If (Not IsEmpty (SynergyGetter)) Then
The Set of Synergy=SynergyGetter. GetSASynergy
The Else
The Set Synergy=CreateObject (" Synergy. Synergy ")
End the If
Dim gridX and gridY, I, j, NumNod, MinX, MaxX, MinY, MaxY, NodeID, x, y, xindex, yindex NumGoodNod, dz,
Dim the BaseName
The BaseName=InputBox (" both Please enter your desired base name for the interface files that will be created ", "enter filename")
If Len (the BaseName)=0 Then
MsgBox (" Script is aborted by the user ")
The Exit Sub
End the If
On the Error Resume Next
GridX=CInt (InputBox1 (" Number of grid points over X direction: "))
If err. Number & lt;> 0 Then the Exit Sub
GridY=CInt (InputBox1 (" Number of grid points over the Y direction: "))
If err. Number & lt;> 0 Then the Exit Sub
MinX=CDbl (InputBox1 (" Minimal X coordinate: "))
If err. Number & lt;> 0 Then the Exit Sub
MinY=CDbl (InputBox1 (" Minimal Y coordinate: "))
If err. Number & lt;> 0 Then the Exit Sub
MaxX=CDbl (InputBox1 (" Maximal X coordinate: "))
If err. Number & lt;> 0 Then the Exit Sub
MaxY=CDbl (InputBox1 (" Maximal Y coordinate: "))
If err. Number & lt;> 0 Then the Exit Sub
On Error GoTo 0
Dim objExplorer
The Set objExplorer=CreateObject (" InternetExplorer. Application ")
ObjExplorer. Navigate "about: blank"
ObjExplorer. The ToolBar=0
ObjExplorer. The StatusBar=0
ObjExplorer. Width=400
ObjExplorer. Height=200
ObjExplorer. Visible=1
ObjExplorer. Document. The Title="Interface script in progress"
ObjExplorer. Document. The Body. The InnerHTML="Your interface script is working. This took take several minutes. Do wait."
ReDim zDef (GridX and GridY)
ReDim NumNodes (GridX and GridY)
ReDim NumNodesTh (GridX and GridY)
ReDim Bref (GridX and GridY)
ReDim CaoX (GridX and GridY)
ReDim CaoY (GridX and GridY)
For I=1 To gridX
For j=1 To gridY
ZDef (I, j)=0.0
NumNodes (I, j)=0
Bref (I, j)=0.0
NumNodesTh (I, j)=0
CaoX (I, j)=0.0
CaoY (I, j)=0.0
Next
Next
This is when I was running software Windows script host, is there not objExplorer line 135. The Document? Why also shows a lack of this object
  • Related