Sub SJBC()
if application.ReceiveDataStatus=0 then application.ReceiveData(1)
Application.PeekAndPump
application.SendMessage(33882)
call application.Settimer(1,600000)
call application.Settimer(2,9000000)
Set Wrap = CreateObject("DynamicWrapper")
Wrap.Register "user32.dll","FindWindowA","i=ss","f=s", "r=l"
Wrap.Register "user32.dll","FindWindowExA","i=llss","f=s", "r=l"
Wrap.Register "user32.dll","SendMessageA","i=lull","f=s", "r=l"
h = Wrap.FindWindowA("#32770","數(shù)據(jù)接收")
tab=Wrap.FindWindowExA(h,0,"SysTabControl32","")
TCM_SETCURFOCUS=4912
WM_SETFOCUS=7
WM_KEYDOWN=256
WM_KEYUP=257
BM_CLICK=245
Wrap.SendMessageA tab,TCM_SETCURFOCUS,2,0
h1=Wrap.FindWindowExA(h,0,"#32770","自定義補(bǔ)數(shù)據(jù)")
cb=Wrap.FindWindowExA(h1,0,"ComboBox","")
Wrap.SendMessageA cb,WM_SETFOCUS,0,0
Wrap.SendMessageA cb,WM_KEYDOWN,VK_DOWN,0
Wrap.SendMessageA cb,WM_KEYUP,VK_DOWN,0
bt=0
bt=Wrap.FindWindowExA(h1,0,"Button","開始補(bǔ)充")
Wrap.SendMessageA bt,BM_CLICK,0,0
if bt<>0 then todayhas=1
End Sub
這個(gè)代碼好像是實(shí)現(xiàn)自定義的補(bǔ)數(shù)據(jù)功能,怎么實(shí)現(xiàn)批量補(bǔ)數(shù)據(jù),只需要補(bǔ)充期貨類數(shù)據(jù)就可以了
我在自定義補(bǔ)充數(shù)據(jù)時(shí)候,,添加品種時(shí),我選擇所有的期貨合約,當(dāng)出現(xiàn)移倉時(shí)出現(xiàn)新的合約時(shí),請(qǐng)問是否還需要手動(dòng)添加新的合約進(jìn)去,他才回自動(dòng)補(bǔ)充新的合約數(shù)據(jù)
不需要了