|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: |
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal HWND1 As Long, ByVal HWND2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SetActiveWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Declare Function GetWindowRect Lib "user32.dll" (ByVal hwnd As Long, lpRect As RECT) As Long
Declare Function SetCursorPos Lib "user32.dll" (ByVal X As Integer, ByVal Y As Integer) As Integer
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Const WM_SETTEXT = &HC
Private Const WM_GETTEXT = &HD
Private Const WM_GETTEXTLENGTH = &HE
Private Const BM_CLICK = &HF5
Sub FileDwnld()
Set xlapp = CreateObject("excel.application")
xlapp.Visible = False
Dim hwnd As Long, HWND1 As Long, HWND2 As Long, HWND3 As Long, HWND4 As Long, HWND5 As Long, HWNDCont As Long, HWNDCont1 As Long
Dim Textlen As Long, FSO As Object, Portfolio As Object
Dim Texte As String, Txt As String, I As Integer, J As Integer, K As Integer
Dim tRECT As RECT
HWNDCont = 9999
While HWNDCont <> 0
For I = 1 To 12
hwnd = FindWindow("#32770", "File Download")
If hwnd > 0 Then
For J = 1 To 30
HndB = FindWindowEx(hwnd, 0, "Button", "&Open")
If HndB > 0 Then
GetWindowRect HndB, tRECT
With tRECT
X = .Left + (.Right - .Left) / 2
Y = .Top + (.Bottom - .Top) / 2
End With
SetForegroundWindow hwnd
SetCursorPos X, Y
'Delay 0.3
DoEvents
SendMessage HndB, BM_CLICK, 0, 0
Exit For
Else
'Delay 0.2
End If
Debug.Print "J", J
Next J
Exit For
Else
'Delay 0.5
End If
Debug.Print "I", I
Next I
For K = 1 To 5
hwnd = 0
HWND1 = 0
HWND2 = 0
HWND3 = 0
HWND4 = 0
HWND5 = 0
hwnd = FindWindow("#32770", "File Download")
If hwnd > 0 And HWNDCont1 <> hwnd Then
HndB = FindWindowEx(hwnd, 0, "Button", "&Open")
HWND1 = FindWindowEx(hwnd, 0, "DUIViewWndClassName", vbNullString)
HWND2 = FindWindowEx(HWND1, 0, "DirectUIHWND", vbNullString)
HWND3 = FindWindowEx(HWND2, 0, "FloatNotifySink", vbNullString)
HWND4 = FindWindowEx(HWND3, 0, "Combobox", vbNullString)
HWND5 = FindWindowEx(HWND4, 0, "Edit", vbNullString)
'filePath = "G:\aLXE-Pricing\provident\provident.csv"
'Txt = filePath
'deletes it if it already exists
'If Len(Dir(Txt)) > 0 Then Kill Txt
'Returns the new name and path
'SendMessageByString HWND5, WM_SETTEXT, Len(Txt), Txt
'Txt = ""
'Click the save button
SendMessage HndB, BM_CLICK, 0, 0
Exit For
Else
HndB = FindWindowEx(hwnd, 0, "Button", "&Open")
If HndB <> 0 Then
GetWindowRect HndB, tRECT
With tRECT
X = .Left + (.Right - .Left) / 2
Y = .Top + (.Bottom - .Top) / 2
End With
SetForegroundWindow hwnd
SetCursorPos X, Y
'Delay 0.3
DoEvents
SendMessage HndB, BM_CLICK, 0, 0
Exit For
End If
'Delay 0.5
End If
Debug.Print "K", K
Next K
HWNDCont = FindWindow("#32770", "File Download")
Wend
xlapp.Visible = True
End Sub
|
Advertisement
| Hall of Fame |