回复 3楼 yuk_yu
Public Sub PutBrowserFile()
Dim iHnwd As Long, iEdit As Long, iOpen As Long
Dim vTemp As String
Dim iniFile
Aii = 0
iHnwd = FindWindow(vbNullString, "Open")
If iHnwd > 0 Then
GetChildWindow (iHnwd)
iEdit = FindInArrString("*--EDIT-*")
iOpen = FindInArrString("*&OPEN*")
If iEdit > 0 And iOpen > 0 Then
vTemp = "C:\20150314009.csv"
Sleep (1 * 1000)
Call SendMessage(iEdit, WM_SETTEXT, 0, vTemp)
Sleep (1 * 1000)
Call SendMessage(iOpen, &HF5, 0, 0)
Sleep (2 * 1000)
End If
End If
End Sub
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
Case 1
Set AA = Attach
If Not AA Is Nothing Then
With Session
.findById("wnd[0]/tbar[1]/btn[5]").press
.findById("wnd[0]/tbar[1]/btn[25]").press
DoEvents
‘开始调用,但会出现部件挂起,独立运行两段程序都没问题
.findById("wnd[0]/tbar[1]/btn[8]").press
.findById("wnd[1]/tbar[0]/btn[0]").press
End With
End If
Case 2
Case 3
End Select
End Sub